Skip to content

Commit

Permalink
Remove unused locale messages (#7190)
Browse files Browse the repository at this point in the history
* Switch to using string literals for locale keys

Various message keys were being specified with a string template
instead of a string literal. They have been switched to use string
literals so that the script for detecting unused messages can find
them.

* Remove unused locale messages

A number of unused locale messages have been removed - probably
leftover from old UI elements that have since been removed.

The `verify_locale_strings` script has been augmented to search the UI
for string literals, and match those against the locale message keys in
the `en` locale. Any messages without a corresponding string literal
are assumed to be unused.

The script has also been updated with an optional `--fix` parameter,
which will automatically delete any unused messages from locales.

148 unused messages were found in this case, out of a total of about
650 messages. Another 70 messages are _potentially_ unused and require
further investigation, but weren't as easy to rule out because they
were found in string literals.

* Remove additional unused locale messages

The following messages were more difficult to rule out because they
were present as string literals in the UI. They do appear to be
unused as locale keys though.
  • Loading branch information
Gudahtt authored Sep 18, 2019
1 parent 624139a commit 48bf2f8
Show file tree
Hide file tree
Showing 59 changed files with 168 additions and 23,299 deletions.
493 changes: 0 additions & 493 deletions app/_locales/am/messages.json

Large diffs are not rendered by default.

499 changes: 0 additions & 499 deletions app/_locales/ar/messages.json

Large diffs are not rendered by default.

496 changes: 0 additions & 496 deletions app/_locales/bg/messages.json

Large diffs are not rendered by default.

496 changes: 0 additions & 496 deletions app/_locales/bn/messages.json

Large diffs are not rendered by default.

476 changes: 0 additions & 476 deletions app/_locales/ca/messages.json

Large diffs are not rendered by default.

348 changes: 0 additions & 348 deletions app/_locales/cs/messages.json

Large diffs are not rendered by default.

481 changes: 0 additions & 481 deletions app/_locales/da/messages.json

Large diffs are not rendered by default.

471 changes: 0 additions & 471 deletions app/_locales/de/messages.json

Large diffs are not rendered by default.

493 changes: 0 additions & 493 deletions app/_locales/el/messages.json

Large diffs are not rendered by default.

503 changes: 2 additions & 501 deletions app/_locales/en/messages.json

Large diffs are not rendered by default.

455 changes: 0 additions & 455 deletions app/_locales/es/messages.json

Large diffs are not rendered by default.

489 changes: 0 additions & 489 deletions app/_locales/es_419/messages.json

Large diffs are not rendered by default.

493 changes: 0 additions & 493 deletions app/_locales/et/messages.json

Large diffs are not rendered by default.

493 changes: 0 additions & 493 deletions app/_locales/fa/messages.json

Large diffs are not rendered by default.

493 changes: 0 additions & 493 deletions app/_locales/fi/messages.json

Large diffs are not rendered by default.

449 changes: 0 additions & 449 deletions app/_locales/fil/messages.json

Large diffs are not rendered by default.

467 changes: 0 additions & 467 deletions app/_locales/fr/messages.json

Large diffs are not rendered by default.

42 changes: 0 additions & 42 deletions app/_locales/gu/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@
"about": {
"message": "વિશે"
},
"accept": {
"message": "સ્વીકારો"
},
"account": {
"message": "એકાઉન્ટ"
},
"add": {
"message": "ઉમેરો"
},
"address": {
"message": "સરનામું"
},
"advanced": {
"message": "વિગતવાર"
},
"available": {
"message": "ઉપલબ્ધ"
},
"back": {
"message": "પાછળ"
},
Expand Down Expand Up @@ -54,12 +42,6 @@
"connect": {
"message": "કનેક્ટ કરો"
},
"connecting": {
"message": "કનેક્ટિંગ..."
},
"continue": {
"message": "આગળ વધો"
},
"copy": {
"message": "કૉપિ કરો"
},
Expand All @@ -69,12 +51,6 @@
"create": {
"message": "બનાવો"
},
"createDen": {
"message": "બનાવો"
},
"customize": {
"message": "કસ્ટમાઇઝ કરો"
},
"delete": {
"message": "કાઢી નાખો"
},
Expand All @@ -93,9 +69,6 @@
"fast": {
"message": "ઝડપી"
},
"fastest": {
"message": "સૌથી ઝડપી"
},
"forgetDevice": {
"message": "આ ઉપકરણને ભૂલી જાઓ"
},
Expand All @@ -119,15 +92,9 @@
"loading": {
"message": "લોડ કરી રહ્યું છે..."
},
"min": {
"message": "ન્યૂનતમ"
},
"next": {
"message": "આગલું"
},
"notFound": {
"message": "મળ્યું નથી"
},
"origin": {
"message": "મૂળ"
},
Expand Down Expand Up @@ -158,18 +125,12 @@
"search": {
"message": "શોધો"
},
"select": {
"message": "પસંદ કરો"
},
"send": {
"message": "મોકલો"
},
"settings": {
"message": "સેટિંગ્સ"
},
"status": {
"message": "સ્થિતિ"
},
"submit": {
"message": "સબમિટ કરો"
},
Expand All @@ -187,8 +148,5 @@
},
"viewAccount": {
"message": "એકાઉન્ટ જુઓ"
},
"warning": {
"message": "ચેતવણી"
}
}
Loading

0 comments on commit 48bf2f8

Please sign in to comment.