Skip to content

Commit

Permalink
VPN-6649: fix translations for cities with special characters (#10029)
Browse files Browse the repository at this point in the history
* VPN-6649 fix translations for cities with special characters

* simply with a regex
  • Loading branch information
mcleinman authored Nov 15, 2024
1 parent db119df commit c9dcb20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions scripts/ci/update_server_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def fetch_server_list():
for city in cities:
# Remove state suffix, capitalize each work, remove spaces.
id = city.split(",")[0].strip().title().replace(" ", "")
# Remove special characters like the `ö` in `Malmö`
id = re.sub(r'[^a-zA-Z]+', '', id)
# Add it to the map
string_map[id] = city

###
Expand Down
6 changes: 3 additions & 3 deletions src/translations/extras/extras.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,6 @@
<trans-unit id="servers.Gothenburg" xml:space="preserve">
<source>Gothenburg</source>
</trans-unit>
<trans-unit id="servers.Malmö" xml:space="preserve">
<source>Malmö</source>
</trans-unit>
<trans-unit id="servers.Stockholm" xml:space="preserve">
<source>Stockholm</source>
</trans-unit>
Expand Down Expand Up @@ -531,6 +528,9 @@
<trans-unit id="servers.Nicosia" xml:space="preserve">
<source>Nicosia</source>
</trans-unit>
<trans-unit id="servers.Malm" xml:space="preserve">
<source>Malmö</source>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit c9dcb20

Please sign in to comment.