@@ -25,6 +25,8 @@ is working correctly.
25
25
26
26
## Adding new UI strings
27
27
28
+ <div id =" add-string " />
29
+
28
30
### Adding a string to the translation database
29
31
30
32
To add a new string in the UI, start by
@@ -79,6 +81,26 @@ For example:
79
81
` zulipLocalizations.subscribedToNChannels(store.subscriptions.length) ` .
80
82
81
83
84
+ ## Adding a new language
85
+
86
+ ARB files for new languages are automatically created in pull requests generated
87
+ by [ the update-translations GitHub workflow] ( /.github/workflows/update-translations.yml ) .
88
+ However, this won't make them in the in-app settings UI.
89
+
90
+ On [ Weblate] ( https://hosted.weblate.org/projects/zulip/zulip-flutter/ ) ,
91
+ we can check the percentage of strings translated in each language.
92
+ We use this information to determine if we should start offerring the language
93
+ in the in-app settings UI. For reference, on the web app, we offer a language
94
+ when it is 5% translated. (Search for ` percent_translated ` in the server code.)
95
+
96
+ When a language has a good percentage of strings translated, follow these steps
97
+ to add it:
98
+
99
+ - If the language tag is, for example, 'en-GB', [ add a string] ( #add-string )
100
+ named 'languageEnGb'.
101
+ - Update [ localizations.dart] ( /lib/model/localizations.dart ) to include the new language in
102
+ ` languages ` , following the instructions there.
103
+
82
104
## Hack to enforce locale (for testing, etc.)
83
105
84
106
For testing the app's behavior in different locales,
0 commit comments