Confirmed users
355
edits
Nalexander (talk | contribs) |
Nalexander (talk | contribs) |
||
| Line 214: | Line 214: | ||
== Localization == | == Localization == | ||
http://developer.android.com/guide/topics/resources/localization.html | Strings used in Firefox need to be localized into ALL THE LANGUAGES. Here's how to add a string. | ||
* Add the string as an entity to <tt>./strings/sync_strings.dtd.in</tt>. These are the actual strings that get localized, and should never be changed after landing. If you do need to make a change, make a new string entity, and do not change or delete any previous ones. For example: | |||
<!ENTITY sync.title.success.label 'Setup Complete'> | |||
* Add the entity to <tt>./strings/strings.xml.in</tt>. For example: | |||
<string name="sync_title_success">&sync.title.success.label;</string> | |||
* Run the preprocess script to generate the strings for use: | |||
$ ./preprocess.sh | |||
Using ANDROID_PACKAGE_NAME org.mozilla.fennec_ncalexan. | |||
Using MOZ_APP_DISPLAYNAME FxSync. | |||
Using MOZ_APP_VERSION 0. | |||
Using MOZ_ANDROID_SHARED_ID org.mozilla.fennec_ncalexan.sharedID. | |||
Using MOZ_ANDROID_SHARED_ACCOUNT_TYPE org.mozilla.fennec_ncalexan_sync. | |||
Preprocessing makes the string available in <tt>/res/values/strings.xml</tt>. Once preprocessed, strings can be accessed from resource XML files: | |||
<TextView android:text="@string/sync_title_success" /> | |||
and Java code: | |||
String string = context.getString(R.string.sync_title_sucess); | |||
It's definitely a good idea to look over the [http://developer.android.com/guide/topics/resources/localization.html Android Localization guide]. | |||
== Schemas == | == Schemas == | ||