This ticket covers localizing XOWA in your language.
If you'd like to translate XOWA messages to your language, you can do so in either of two ways:
(1) Using LibreOffice / OpenOffice (easier to review, but requires LibreOffice)
- Download the attached xowa_api.ods spreadsheet
- Open it in LibreOffice / CalcOffice
- You will get a warning about macros. There is one macro for replacing strings (see below). You can either enable macros, or keep them disabled.
- Check if a tab exists for your language code. This will have the same letters as the first part of your Wikipedia domain. For example, English Wikipedia is "en.wikipedia.org" and its language code is "en"
- If a tab doesn't exist, make a copy of the "en" tab.
- Overwrite the English word(s) with the translated word(s) from your language.
(2) Using a text editor (harder to review, but works with any text editor)
- Use the en.gfs in your XOWA package (/xowa/user/anonymous/lang/xowa/en.gfs)
- Open it up in a text editor like Notepad++ or JEdit
- Translate all word(s) after the first pipe
- For example, for the line "xowa-portal-exit|Exit" you'd translate "Exit" to your language
- If you need a special character, use the following escape codes (no quotes)
- For the pipe character ("|"), use "\u007C"
- For a new line ("\n"), use "\u000A"
When you're done you can either upload your file to this ticket, or send it to <gnosygnu at="" gmail.com=""> as an attachment.</gnosygnu>
Regarding the 5 different types of categories
- Name: The "Name" is a short term that will show up in either the menu or the HTML page
- Tip: The "Tip" is a longer term that will either show up as a tooltip (if available) or on Help:Options/Shortcuts
- Letter: The "Letter" is a single character that is used as a shortcut on the main menu
- Shortcut: The "Shortcut" is currently not supported. When it is supported, it will be used to provide a default shortcut for the language. For example, in English, "Ctrl + Q" is the shortcut for "Quit", but "Q" was selected because it is the first letter of the word "Quit". Other languages may have different conventions.
- Image: The "Image" is currently not supported except for English. It applies to the image that shows on the menus. It is intended to be used for rare situations wherein the default image may not be applicable in the user's language. For example, the "Font" images show the letter "A" which will not be relevant to non-Latin languages.
The remainder of this ticket has other comments related to previous translation releases. Feel free to read them to get some historical understanding, or add to the comment below.
REM ***** BASIC *****
Public Function ReplaceMacro(sText As String, sFind As String, sRepl As String) As String
If (Len(sText)) = 0 Then
ReplaceMacro = ""
Exit Function
End If
Dim rv As String
rv = Replace(sText, sFind, sRepl)
ReplaceMacro = rv
End Function
The l10n-files for Firefox are below http://mxr.mozilla.org/l10n-central/source/, but I'm not sure whether this will help you much. --Schnark
Sorry. Forgot to reply to this yesterday.
I took a quick look, and it looks like I'd have to pull the needed file from each directory. This would be difficult. Also, as you pointed out below, some of these translations may not be relevant.
I'll revisit later, but for now, it looks like Firefox won't be able to help...
Last edit: gnosygnu 2013-02-23
You can't use the tooltips from Firefox directly, e.g. the German tooltip for "bookmark" says "Lesezeichen für diese Webseite setzen" which is "Bookmark this webpage". --Schnark
Okay. Thanks for looking into the German translations.
It looks like some translating will be necessary. I've amended the instructions above.
Diff:
Diff:
I did some research and I couldn't find equivalent only for "Enter address". For bookmark tooltip I found in DE "Lesezeichen für diese Seite hinzufügen" (without "web" word). For rest are also good equivalents. Here are places where are Firefox equivalents to XOWA:
// XOWA NAMES
['xowa-window-go_bwd_btn-tooltip',
'xowa-window-go_fwd_btn-tooltip',
'xowa-window-url_btn-tooltip',
'xowa-window-bmk_add_btn-tooltip',
'xowa-window-search_box-tooltip',
'xowa-window-search_btn-tooltip',
'xowa-window-find_box-tooltip',
'xowa-window-find_fwd_btn-tooltip',
'xowa-window-find_bwd_btn-tooltip'];
// I10N NAMES
['backButton.tooltip',
'forwardButton.tooltip',
'goEndCap.tooltip',// https://mxr.mozilla.org/l10n-central/search?string=goEndCap.tooltip&find=browser.dtd&findi=&filter=^[^\0]%24&hitlimit=&tree=l10n-central
'bookmarkPageCmd2.label',// https://mxr.mozilla.org/l10n-central/search?string=bookmarkPageCmd2.label&find=&findi=&filter=^[^\0]%24&hitlimit=&tree=l10n-central
'searchtip',// https://mxr.mozilla.org/l10n-central/search?string=searchtip&find=search.properties&findi=&filter=^[^\0]%24&hitlimit=&tree=l10n-central
'searchEndCap.label', // https://mxr.mozilla.org/l10n-central/search?string=searchEndCap.label&find=searchbar.dtd&findi=&filter=^[^\0]%24&hitlimit=&tree=l10n-central
'search.placeholder', // https://mxr.mozilla.org/l10n-central/search?string=search.placeholder&find=search-panel.dtd&findi=&filter=^[^\0]*%24&hitlimit=&tree=l10n-central
'next.tooltip',
'previous.tooltip'];
// I10N FILES:
['browser.dtd', // https://mxr.mozilla.org/l10n-central/source/en-GB/browser/chrome/browser/browser.dtd#128
'browser.dtd', // ----------||----------
'navigator.dtd',
'browser.dtd',
'browser.dtd',
'search.properties',
'searchbar.dtd',
'search-panel.dtd',
'findbar.dtd', // https://mxr.mozilla.org/l10n-central/source/en-GB/toolkit/chrome/global/findbar.dtd#10
'findbar.dtd'];// ----------||----------
Last edit: treck 2013-02-23
Hey! Thanks!! That was incredibly helpful! It'll be perfect for compiling the translations across all languages. Great work!
I've updated Polish as per below, and I'll incorporate the rest over the next few builds.
Thanks again!
// pl {
xowa-window-go_bwd_btn-tooltip|Przejdź do poprzedniej strony
xowa-window-go_fwd_btn-tooltip|Przejdź do następnej strony
xowa-window-url_box-tooltip|
xowa-window-url_btn-tooltip|Przejdź do strony o podanym adresie
xowa-window-search_box-tooltip|Szukaj w Specjalna:AllPages
xowa-window-search_btn-tooltip|Szukaj
xowa-window-find_close_btn-tooltip|Zamknij pasek wyszukiwania
xowa-window-find_box-tooltip|
xowa-window-find_fwd_btn-tooltip|Znajdź następne wystąpienie ostatnio szukanej frazy
xowa-window-find_bwd_btn-tooltip|Znajdź poprzednie wystąpienie ostatnio szukanej frazy
xowa-window-prog_box-tooltip|
xowa-window-info_box-tooltip|
// }
// credits:piotryx;2013-02-24;created
~~~~
// de {
xowa-window-go_bwd_btn-tooltip|Eine Seite zurück
xowa-window-go_fwd_btn-tooltip|Eine Seite vor
xowa-window-url_box-tooltip|Adresse eingeben
xowa-window-url_btn-tooltip|In der Adresszeile eingegebene Adresse laden
xowa-window-search_box-tooltip|Titelsuche mit alphabetischer Liste aller Seiten
xowa-window-search_btn-tooltip|Suchen
xowa-window-find_close_btn-tooltip|Suchleiste schließen
xowa-window-find_box-tooltip|Suchbegriff eingeben
xowa-window-find_fwd_btn-tooltip|Das nächste Auftreten des Ausdrucks finden
xowa-window-find_bwd_btn-tooltip|Das vorherige Auftreten des Ausdrucks finden
xowa-window-prog_box-tooltip|Fortschrittsmeldungen
xowa-window-info_box-tooltip|Systemmeldungen
// }
// credits:Schnark;2013-02-26;created
// de-ch {
xowa-window-find_close_btn-tooltip|Suchleiste schliessen
// }
// credits:Schnark;2013-02-26;created
~~~~~
Thanks! I'll add it to the de.gfs file as well as the de-ch.gfs.
FYI: I am planning to make user-lang configurable, so a user can choose de-ch if they wish. Note that regardless of the current wiki's lang, user lang is constant throughout the app (so that tooltips will be in English, even if I'm looking at de.wikipedia.org)
I'll stick in another box in the Options screen.
Last edit: gnosygnu 2013-02-27
The tooltips are still English for me in de.wikipedia in XOWA 0.3.0. --Schnark
Sorry about that. I withheld it b/c I didn't want to risk the general v0.3.0 release. It should be in v0.3.1 (along with an option to change the UI user language).
I'm moving this to PFE for now. I should be able to use the firefox links as Schnark / treck provided to help with most of the translations. I'll reassess later this month.