#34 XOWA localizations / translations

PFE
pfe
nobody
2014-07-06
2013-02-22
gnosygnu
No

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.


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
1 Attachments

Discussion

  • Anonymous - 2013-02-22

    If anyone can point me to Firefox's compilation of tooltips for all languages, I'd greatly appreciate it. I tried searching now, but can't turn anything up.

    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

     
    • gnosygnu

      gnosygnu - 2013-02-23

      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
  • Anonymous - 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

     
    • gnosygnu

      gnosygnu - 2013-02-23

      Okay. Thanks for looking into the German translations.

      It looks like some translating will be necessary. I've amended the instructions above.

       
  • gnosygnu

    gnosygnu - 2013-02-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,12 +1,12 @@
     v0.2.6 will include buttons and tooltips (see attachment for preview)
    
    -These tooltips are meant to resemble Firefox as closely as possible.
    +These tooltips are meant to resemble Firefox as closely as possible. However, note that some are different in the context of XOWA. You may need to translate some of them.
    
    -If anyone can point me to Firefox's compilation of tooltips for all languages, I'd greatly appreciate it. I tried searching now, but can't turn anything up.
    +<s>If anyone can point me to Firefox's compilation of tooltips for all languages, I'd greatly appreciate it. I tried searching now, but can't turn anything up.</s>
    
    -In the meantime, you can either translate your language now, or you can pull the tooltips from Firefox by hovering over the relevant box.
    +<s>In the meantime, you can either translate your language now, or you can pull the tooltips from Firefox by hovering over the relevant box.
    
    -Note that the last two messages are not related to Firefox.
    +Note that the last two messages are not related to Firefox.</s>
    
     For instructions, see: https://sourceforge.net/p/xowa/tickets/31/
     For wiki, see: https://sourceforge.net/p/xowa/wiki/XOWA%20Translations%20%28window%29/
    
     
  • gnosygnu

    gnosygnu - 2013-02-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,9 +4,9 @@
    
     <s>If anyone can point me to Firefox's compilation of tooltips for all languages, I'd greatly appreciate it. I tried searching now, but can't turn anything up.</s>
    
    -<s>In the meantime, you can either translate your language now, or you can pull the tooltips from Firefox by hovering over the relevant box.
    +<s>In the meantime, you can either translate your language now, or you can pull the tooltips from Firefox by hovering over the relevant box.</s>
    
    -Note that the last two messages are not related to Firefox.</s>
    +<s>Note that the last two messages are not related to Firefox.</s>
    
     For instructions, see: https://sourceforge.net/p/xowa/tickets/31/
     For wiki, see: https://sourceforge.net/p/xowa/wiki/XOWA%20Translations%20%28window%29/
    
     
  • Anonymous - 2013-02-26

    ~~~~

    // 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

    There is currently no way to get an interface with <code>de-ch</code>-localisation, but just for completeness sake:
    

    // de-ch {
    xowa-window-find_close_btn-tooltip|Suchleiste schliessen
    // }
    // credits:Schnark;2013-02-26;created

    ~~~~~

     
    • gnosygnu

      gnosygnu - 2013-02-27

      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
  • Anonymous - 2013-03-05

    The tooltips are still English for me in de.wikipedia in XOWA 0.3.0. --Schnark

     
    • gnosygnu

      gnosygnu - 2013-03-06

      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).

       
  • gnosygnu

    gnosygnu - 2013-07-17
    • Milestone: Help XOWA --> PFE
     
  • gnosygnu

    gnosygnu - 2013-07-17

    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.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks