Skip to content
gravgun edited this page Mar 6, 2014 · 3 revisions

Before starting a translation, you must agree that your work will be released under the same license as Tint Browser, GPL version 3 (plain English explanation of the license). Also do not forget that a software translation is not a one-shot work, and that new translations may be needed after your initial work. (This does not mean you are forced to keep translating afterwards)

Translations are done in a language-specific XML file. A single translation string look like this :

<string name="Bookmarks">Bookmarks</string>

Where the part in the name parameter is the string key, which you must leave unchanged, and the part between <string …> and </string> is the translated string.

Translation steps

Get the last reference language file

Open and save ("Save as…") this XML document on your computer: https://raw.github.com/Anasthase/TintBrowser/master/res/values/strings.xml

Alternatively, if you want to make Java source edits to Tint in addition to translating – or if you're a hardcore geek –, clone Tint's git repository by following the ["How to build"](How to build) instructions.

Translate

Open the file you downloaded with a decent text editor (hint: Windows Notepad is NOT a decent text editor). Do not change the default encoding (UTF-8) and the default line breaks (Unix style).

Translate every required strings.

Specials cases

String-arrays

Do not translate anything within a <string-array> tag.

Apostrophes

Apostrophes must be preceded by a “\” character.

Example:

<string name="ContextMenuCopyLinkUrl">Copier l\'adresse du lien</string>

Formatted strings

Some strings may contains dynamic values, filled at runtime by the application. The place where the dynamics values are inserted in the string are represented by a %s, %1$s, %2$s, etc… You must include the original %s-type in your translation, at the appropriate place.

Examples:

<string name="SslWarningsHeader">There are problems with the security certificate for this site (%s).</string>
<string name="HttpAuthenticationDialogDialogTitle">Sign in to %1$s - %2$s</string>

When there are several values to dynamically change in a single string, the %s part changes to %1$s, %2$s, and so on. You may change the order of the %s in your translation if it make sense in your language, e.g.

<string name="HistoryBookmarksExportProgressMessage">Exporting item %1$s of %2$s.</string>

becomes

<string name="HistoryBookmarksExportProgressMessage">Out of %2$s, the number %1$s, exported is being.</string>

in Yoda-spoken English.

Misc.

  • Use … (U+2026, horizontal ellipsis) instead of writing three dots (...);

Submit your translation

Open an issue and post your modified file there.