#31 Translations for portal messages

PFE
closed
nobody
2014-12-25
2013-02-17
gnosygnu
No

v0.2.5 includes translatable messages for XOWA lables (EX: Bookmarks; View HTML). These messages will be included in the respective /xowa/user/anonymous/lang/xowa/lang.gfs file.

If you are multi-lingual, and would like to contribute a translation, please add a translation to the wiki page: https://sourceforge.net/p/xowa/wiki/XOWA%20Translations%20%28portal%29/

Thanks.

Instructions

To create a new language, do the following

  • Start at "// en {"

  • Copy everything until "// }"

  • Paste it into a new section

  • Change the en to your language code. This is often the subdomain of Wikipedia. For example, for French, the code is "fr" (from fr.wikipedia.org).

  • Localize the text for each line

    • The text part begins after the first "|"
      For example, the text for the line "xowa-portal-exit|Exit" is "Exit"

    • Accesskey text is usually blank. If it is blank, please leave it blank, unless you feel a localization is necessary.

    • If you need a special character, see the following escape codes

      • "\|": pipe; EX: "Before the pipe\|After the pipe"

      • "\n": new line; EX: "Line 1\nLine 2"

  • If you would like a mention in the XOWA change log for your contribution, add another line at the bottom specifying nick, date and change
    EX: "// gnosygnu;2013-02-14;created english"

Terms

Your contribution is subject to the terms listed below. If you are uncomfortable with either of them, then I ask that you refrain from contributing.

  • All contributions are provided under the Create Commons 3.0 CC BY NC SA: http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US

  • All contribution credits are entirely discretionary. I reserve the right to redact credit if the nickname contains offensive content, espouses political views, advertises goods/services, or seems otherwise unsuitable. Email addresses/domain names/real names are discouraged. If a nickname is considered to be unsuitable, then credit will be attributed to "anonymous".

Discussion

  • Anonymous - 2013-02-19

    German translation:

    // de {
    xowa-portal-exit|Beenden
    tooltip-xowa-portal-exit|XOWA beenden
    accesskey-xowa-portal-exit|
    xowa-portal-view_html|HTML
    tooltip-xowa-portal-view_html|HTML-Quelltext dieser Seite anzeigen
    accesskey-xowa-portal-view_html|h
    xowa-portal-bookmarks|Lesezeichen
    tooltip-xowa-portal-bookmarks|Lesezeichen
    accesskey-xowa-portal-bookmarks|
    xowa-portal-bookmarks-add|hinzufügen
    tooltip-xowa-portal-bookmarks-add|Lesezeichen hinzufügen
    accesskey-xowa-portal-bookmarks|
    xowa-portal-bookmarks-show|zeigen
    tooltip-xowa-portal-bookmarks-show|Lesezeichen anzeigen
    accesskey-xowa-portal-bookmarks-show|
    xowa-portal-page_history|Verlauf
    tooltip-xowa-portal-page_history|Verlauf der besuchten Seiten anzeigen
    accesskey-xowa-portal-page_history|
    xowa-portal-options|Einstellungen
    tooltip-xowa-portal-options|XOWA-Einstellungen ändern
    accesskey-xowa-portal-options|
    xowa-portal-version|Version
    xowa-portal-build_time|Build-Zeitpunkt
    // }
    // credits:Schnark;2013-02-18;created
    

    Two translations don't work:

    • xowa-portal-bookmarks
    • xowa-portal-options

    tooltip-xowa-portal-bookmarks-show is missing, you accidently have tooltip-xowa-portal-bookmarks-add twice. I fixed this in my translation already, but you should fix it in the template, too.

    tooltip-xowa-portal-bookmarks seems useless, the tooltip is neither shown nor necessary.

    In German (and probably many other languages) the translations for the bookmarks are too long to show in one line. I think you should instead use two items: "Bookmark this page" and "Show bookmarks", each in a line on its own.

    Still untranslated are the section title "Languages" and "Tier [0-4]", and the names for the different languages. --Schnark

     
    Last edit: gnosygnu 2013-02-20
    • gnosygnu

      gnosygnu - 2013-02-20

      Excellent! Thanks for the translations!

      Two translations don't work:

      Oops. I forgot to substitute the english words in in the xowa.gfs. See excerpt below

      tooltip-xowa-portal-bookmarks-show is missing, you accidently have tooltip-xowa-portal-bookmarks-add twice.

      Good catch. I fixed them now in the wiki template (as well as the code)

      tooltip-xowa-portal-bookmarks seems useless, the tooltip is neither shown nor necessary.

      Okay. Agreed. I was mechanically listing everything, but there's no reason to have a tooltip/accesskey (it should function like the other group headers such as "Navigation" or "Interaction")

      I think you should instead use two items: "Bookmark this page" and "Show bookmarks"

      Yeah, this seemed awkward from a design point of view. I tried putting them on different lines and indenting the text. See excerpt below as well as attachment. I have no particular feelings on this, so feel free to suggest anything else.

          // Search for "<li>Bookmarks" and replace that <li> and the Options <li> underneath.
          <li>~{<>msgs.get('xowa-portal-bookmarks');<>}</li>
          <li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/site/home/wiki/Data:Bookmarks"~{<>msgs.get_html_accesskey_and_title('xowa-portal-bookmarks-show');<>}>~{<>msgs.get('xowa-portal-bookmarks-show');<>}</a></li>
          <li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="xowa:app.gui.main_win.app_bookmarks_add;"~{<>msgs.get_html_accesskey_and_title('xowa-portal-bookmarks-add');<>}>~{<>msgs.get('xowa-portal-bookmarks-add');<>}</a></li>
          <li><a href="/site/home/wiki/Help:Options"~{<>msgs.get_html_accesskey_and_title('xowa-portal-options');<>}>~{<>msgs.get('xowa-portal-options');<>}</a></li>
      

      Still untranslated are the section title "Languages" and "Tier [0-4]",

      Okay. I forgot about these. Languages is "otherlanguages" in the Messages file and is easy to put in.

      Tier and its languages are slightly more difficult. The words are hardcoded into the xowa.gfs, and I'll have to change some of the logic to use Messages. I'll try to include "xowa-lang_group" (Tier) and "xowa-lang-de" (German) and the rest of its ilk for v0.2.6

      BTW: My thoughts for the Language names are as follows:

      • If "xowa-lang-de" exists use it. I'm going to pre-seed all the xowa-lang-* codes in en.gfs with English names, because I find that "German" is much more recognizable to an English speaker than "Deutsch". (This becomes much more so for the non-Latin languages, like Japanese/Chinese). One could argue that if I can not even recognize the Japanese language name, then I probably have no business clicking on the Japanese article. However, I find it interesting to see how different languages/countries portray the same subject (for example: which of Leonardo da Vinci's images does each language show?).

      • If "xowa-lang-de" does not exist, default to the localized language name ("Deutsch" for German)

      This allows de.gfs to assign German names to all its languages (EX: "Englische" for English), while all other pending languages (Swedish, Polish, Thai) will all show "English"

      I don't expect these language names to be localized for quite a while (there are 392 of them, so don't waste your time!). I may expose this as its own separate Options page so that any user who feels like I do can customize it at their discretion (and hopefully forward XOWA their list)

       
      Last edit: gnosygnu 2013-02-20
      Attachments
      • Anonymous - 2013-02-21

        See excerpt below as well as attachment. I have no particular feelings on this, so feel free to suggest anything else.

        I tried this and it looks good. I changed the German translations according to the screen shot to:

        xowa-portal-bookmarks-add|Lesezeichen setzen
        tooltip-xowa-portal-bookmarks-add|Lesezeichen für diese Seite setzen
        xowa-portal-bookmarks-show|Lesezeichen anzeigen
        tooltip-xowa-portal-bookmarks-show|Alle Lesezeichen anzeigen
        

        I don't expect these language names to be localized for quite a while (there are 392 of them, so don't waste your time!).

        Wikipedia uses the translations from CLDR (http://www.unicode.org/cldr/charts/by_type/code_lists.languages.html, there must be an XML file with that content somewhere, too), also for things like {{#language:ii|fr}}, which shows the French name of the language with code ii. --Schnark

         
        • gnosygnu

          gnosygnu - 2013-02-22

          I tried this and it looks good. I changed the German translations...

          Thanks for the confirm. FYI: I'm thinking of rearranging bookmarks. I don't like that bookmarks takes 3 lines (out of 8) and the indenting makes it feel asymmetric.

          I'm planning on doing the following:

          • removing the "Bookmarks" text-only line

          • changing the "Show all bookmarks" anchor to "Bookmarks"

          • removing the "Add bookmark" and adding it to the toolbar (similar to Firefox's "Bookmark this page")

          You can see the mock-up below. What do you think?

          there must be an XML file with that content somewhere, too)

          Thanks for the hint! I did a little searching and found the files here:
          http://cldr.unicode.org/index/downloads and more specifically, http://unicode.org/Public/cldr/22/. The translations are all in /core/common/main.

          I'll scrape the data and include it for a near-future release. I'll need to add a concept of a User language (one that is constant across all wikis). I already see that I'm going to need this for the new button tooltips (i.e.: "Go back" should always read "Go back", regardless of the current language of the wiki)

           
          Last edit: gnosygnu 2013-02-22
          Attachments
  • gnosygnu

    gnosygnu - 2013-07-17
    • labels: i18n; portal --> i18n, portal
    • Milestone: Help XOWA --> PFE
     
  • gnosygnu

    gnosygnu - 2013-07-17

    I'm also moving this to PFE for now. I'll look again at the CLDR link suggested by Schnark. I'll reassess again later.

     
  • gnosygnu

    gnosygnu - 2013-07-17
    • Milestone: --> PFE
     
  • luc

    luc - 2014-05-19

    Hi,
    I tried to find the /xowa/user/anonymous/lang/xowa/lang.gfs to try to contribute with French and Portuguese translation, but could not find the file.

    Where the UI language specific file configuration is located?

    Best regards

     
  • gnosygnu

    gnosygnu - 2014-05-20

    Hey! Thanks for the interest.

    The lang.gfs will be in /xowa/user/anonymous/lang/xowa/. For example, if you've installed XOWA on a Windows machine at C: the language file for English would be:

    • C:\xowa\user\anonymous\lang\xowa\en.gfs

    If you can contribute French / Portuguese translations, that would be great. I'm going to make language translations easier to do from XOWA in the next few releases. In the meantime, you can do the following:

    • Use the template below for translation. Basically anything after the pipe ("|") is the translated word. For example, in the third line, "Exit" should be replaced with the appropriate non-English word.
    • When you're done, you can paste it here, and I'll include it in the next release of XOWA.

    Some basic guidelines:

    • Don't feel like you need to translate all items. Feel free to do as much as you want to.
    • Note that some items are for Wikidata. You would need Wikidata installed to see them.
    • Some items are blank (particularly the shortcuts). It's up to you if you think shortcuts should be translated in the language.

    If you want to try it out on your machine, you can do the following:

    • Find your en.gfs file (C:\xowa\user\anonymous\lang\xowa\en.gfs)
    • Make a backup of your en.gfs file so you can rollback to it in case there are issues.
    • Open the file in a text-editor like Notepad++. Note that all line endings must be \n not \r\n. Also text-encoding must be UTF-8. Notepad++ will do this automatically, as well as most text-editors (but not Notepad or Wordpad or Word)
    • Copy your translations of the entire blob below to the bottom of the file.
    • Save the en.gfs file.
    • Launch XOWA. You should see your translated messages

    Let me know if you need more info.

    Thanks!

    this.messages.load_text(
    <:['
    xowa-portal-exit|Exit
    tooltip-xowa-portal-exit|Exit XOWA
    accesskey-xowa-portal-exit|
    xowa-portal-view_html|View HTML
    tooltip-xowa-portal-view_html|View HTML source for this page
    accesskey-xowa-portal-view_html|h
    xowa-portal-about|About
    tooltip-xowa-portal-about|About XOWA
    accesskey-xowa-portal-about|
    xowa-portal-bookmarks|Bookmarks
    xowa-portal-bookmarks-add|Bookmark this page
    tooltip-xowa-portal-bookmarks-add|Bookmark this page
    accesskey-xowa-portal-bookmarks-add|
    xowa-portal-bookmarks-show|Show all bookmarks
    tooltip-xowa-portal-bookmarks-show|Show all bookmarks
    accesskey-xowa-portal-bookmarks-show|
    xowa-portal-page_history|Page history
    tooltip-xowa-portal-page_history|View history of opened pages
    accesskey-xowa-portal-page_history|
    xowa-portal-options|Options
    tooltip-xowa-portal-options|Change XOWA options
    accesskey-xowa-portal-options|
    xowa-portal-version|version
    xowa-portal-build_time|build time
    xowa-window-go_bwd_btn-tooltip|Go back one page
    xowa-window-go_fwd_btn-tooltip|Go forward one page
    xowa-window-url_box-tooltip|Enter address
    xowa-window-url_btn-tooltip|Go to the address in the Location Bar
    xowa-window-search_box-tooltip|Search using {{ns:Special}}:AllPages
    xowa-window-search_btn-tooltip|Search
    xowa-window-find_close_btn-tooltip|Close Find bar
    xowa-window-find_box-tooltip|Enter phrase to find on this page
    xowa-window-find_fwd_btn-tooltip|Find the next occurrence of the phrase
    xowa-window-find_bwd_btn-tooltip|Find the previous occurrence of the phrase
    xowa-window-prog_box-tooltip|Displays progress messages
    xowa-window-info_box-tooltip|Displays system messages
    menu-xowa.file-text|File
    menu-xowa.file.save_as-text|Save As
    menu-xowa.file.print-text|Print
    menu-xowa.file.exit-text|Exit
    menu-xowa.edit-text|Edit
    menu-xowa.edit.select_all-text|Select All
    menu-xowa.edit.copy-text|Copy
    menu-xowa.edit.find-text|Find
    menu-xowa.view-text|View
    menu-xowa.view.font.increase-text|Font Increase
    menu-xowa.view.font.decrease-text|Font Decrease
    menu-xowa.view.page.read-text|Page Read
    menu-xowa.view.page.edit-text|Page Edit
    menu-xowa.view.page.html-text|Page Html
    menu-xowa.history-text|History
    menu-xowa.history.go_bwd-text|Back
    menu-xowa.history.go_fwd-text|Forward
    menu-xowa.history.show-text|Show
    menu-xowa.bookmarks-text|Bookmarks
    menu-xowa.bookmarks.goto_main_page-text|Show all bookmarks
    menu-xowa.bookmarks.add-text|Bookmark this page
    menu-xowa.bookmarks.show-text|Show all bookmarks
    menu-xowa.tools-text|Tools
    menu-xowa.tools.options-text|Options
    menu-xowa.tools.wikis-text|Wikis
    menu-xowa.tools.wikis.import_from_list-text|Import from list
    menu-xowa.tools.wikis.import_from_script-text|Import from script
    menu-xowa.tools.wikis.maintenance-text|Wiki maintenance
    menu-xowa.help-text|Help
    menu-xowa.help.help-text|XOWA Help
    menu-xowa.help.change_log-text|Change log
    menu-xowa.help.diagnostics-text|Diagnostics
    menu-xowa.help.context_menu-text|Configure menus
    menu-xowa.help.about-text|About XOWA
    menu-xowa.file-shortcut|
    menu-xowa.file.save_as-shortcut|s
    menu-xowa.file.print-shortcut|p
    menu-xowa.file.exit-shortcut|x
    menu-xowa.edit-shortcut|e
    menu-xowa.edit.select_all-shortcut|s
    menu-xowa.edit.copy-shortcut|c
    menu-xowa.edit.find-shortcut|f
    menu-xowa.view-shortcut|v
    menu-xowa.view.font.increase-shortcut|i
    menu-xowa.view.font.decrease-shortcut|d
    menu-xowa.view.page.read-shortcut|r
    menu-xowa.view.page.edit-shortcut|e
    menu-xowa.view.page.html-shortcut|h
    menu-xowa.history-shortcut|s
    menu-xowa.history.go_bwd-shortcut|b
    menu-xowa.history.go_fwd-shortcut|f
    menu-xowa.history.show-shortcut|s
    menu-xowa.bookmarks-shortcut|b
    menu-xowa.bookmarks.goto_main_page-shortcut|m
    menu-xowa.bookmarks.add-shortcut|b
    menu-xowa.bookmarks.show-shortcut|s
    menu-xowa.tools-shortcut|t
    menu-xowa.tools.options-shortcut|o
    menu-xowa.tools.wikis-shortcut|w
    menu-xowa.tools.wikis.import_from_list-shortcut|i
    menu-xowa.tools.wikis.import_from_script-shortcut|s
    menu-xowa.tools.wikis.maintenance-shortcut|s
    menu-xowa.help-shortcut|m
    menu-xowa.help.help-shortcut|h
    menu-xowa.help.change_log-shortcut|l
    menu-xowa.help.diagnostics-shortcut|d
    menu-xowa.help.context_menu-shortcut|c
    menu-xowa.help.about-shortcut|a
    statistics-header-ns|Statistics
    xowa-wikidata-languages|en
    xowa-wikidata-toc|Contents
    xowa-wikidata-labels|Labels
    xowa-wikidata-aliasesHead|Aliases
    xowa-wikidata-descriptions|Descriptions
    xowa-wikidata-links|Links
    xowa-wikidata-claims|Claims
    xowa-wikidata-json|JSON
    xowa-wikidata-language|language
    xowa-wikidata-label|label
    xowa-wikidata-aliases|aliases
    xowa-wikidata-description|description
    xowa-wikidata-wiki|wiki
    xowa-wikidata-link|link
    xowa-wikidata-property|property
    xowa-wikidata-value|value
    xowa-wikidata-references|references
    xowa-wikidata-qualifiers|qualifiers
    xowa-wikidata-east|E
    xowa-wikidata-julian|<sup>jul</sup>
    xowa-wikidata-decade|~{0}0s
    xowa-wikidata-century|~{0}. century
    xowa-wikidata-millenium|~{0}. millenium
    xowa-wikidata-years1e4|~{0}0,000 years
    xowa-wikidata-years1e5|~{0}00,000 years
    xowa-wikidata-years1e6|~{0} million years
    xowa-wikidata-years1e7|~{0}0 million years
    xowa-wikidata-years1e8|~{0}00 million years
    xowa-wikidata-years1e9|~{0} billion years
    xowa-wikidata-bc|~{0} BC
    xowa-wikidata-rank
    xowa-wikidata-deprecated
    xowa-wikidata-normal
    xowa-wikidata-preferred
    xowa-wikidata-links-special
    ']:>
    );
    
     
    Last edit: gnosygnu 2014-05-20
    • luc

      luc - 2014-05-24

      Hey!!

      Thank you for response... Will try to do... (just time problem...)

      Being trying Xowa... Seems very interesting...

      To be very performant as an "offline solution", Could it be evaluated:
      to perform search in all installed wiki (i.e. "innovation" in
      en.wikipedia, fr.wikipedia, pt.wikipedia, ... if those 3 installed)?
      show the languages equivalents of a page (provided by wikipedia)
      (save or show) all the results of a search (i.e. the list of 673 results
      for a search on "innovation" in en.wikipedia.org)
      implementation of the wikipedia "ebook creator" possibility

      some of these feature are provided in another "Offline wikipedia
      browser" (http://aarddict.org/) but they seems less dynamic in term of
      actualisation of source code and wiki dumps.

      Congratulation and best regards. Let you informed about translation progress

      [EDIT: gnosygnu: deleted reply-to content (same as ticket text above)]

      /Luc Quoniam/
      Professeur des Universités
      Tel (mobile): 33 (0) 970 40 5651
      http://quoniam.info

      S'il vous plait, pensez à l'environnement avant d'imprimer ce mail

       
      Last edit: gnosygnu 2014-05-25
      Attachments
  • gnosygnu

    gnosygnu - 2014-05-25

    Thank you for response... Will try to do... (just time problem...)

    No worries. Take your time. XOWA hasn't had French / Portugues translations for 1 and a half years, so another few months won't hurt. ;)

    to perform search in all installed wiki (i.e. "innovation" in
    en.wikipedia, fr.wikipedia, pt.wikipedia, ... if those 3 installed)?

    Two others have asked for this feature also. See: https://sourceforge.net/p/xowa/tickets/294/

    I'll look at it again in the coming weeks. My main reason for hesitation is that a multiple wiki search could be slow. For example, I have 180+ wikis on my system, so searching all wikis is not feasible.

    I'm thinking of adding an option to specify scope:

    • Current wiki only: Only search current wiki (just like today)
    • Language: All wikis in the same language. For example, if you're in frwiki, it will also search in frwiktionary, frwikisource
    • Custom: Wikis specified by user; in your case, it would be: "enwiki; frwiki; ptwiki". I'd have additional logic to search the current wiki first, and then the rest. For example, if you're in ptwiki, it would search ptwiki, then enwiki, then frwiki.
    • All: all wikis (with a warning that this could be very slow)

    show the languages equivalents of a page (provided by wikipedia)

    You can do this today if you install wikidata. You'll need about 12 GB and 2 hours. Specifically:

    • Go to home/wiki/Help:Import/List
    • Click the "latest" link for www.wikidata.org
    • Wait for it to set-up
    • Visit any page after it completes. You'll see an "In other languages" at the bottom of every page. See the attached screenshot.

    (save or show) all the results of a search (i.e. the list of 673 results
    for a search on "innovation" in en.wikipedia.org)

    Ok. Just so you know, all searches go into home/wiki/Special:XowaPageHistory. You'll have the URL to re-execute the search. For example: en.wikipedia.org/wiki/Special:Search/innovation?search=innovation&fulltext=y

    I can add an option to change the default from 100 per page to a user-defined number. You can put in something like 10,000, though the resulting HTML will be very large (and slow to show)

    implementation of the wikipedia "ebook creator" possibility

    Honestly, this is going to be quite involved. The Wikipedia book creator looks quite sophisticated, and I suspect the export to PDF won't be easy. I'll keep it in mind for the future, but it probably won't be for a while.

    Congratulation and best regards. Let you informed about translation progress

    No problem! Thanks for the feedback.

     
  • gnosygnu

    gnosygnu - 2014-07-06
    • status: pfe --> closed
    • Expected release: -->
     
  • gnosygnu

    gnosygnu - 2014-07-06

    Closing the ticket as all translation issues will be handled under https://sourceforge.net/p/xowa/tickets/34/.

     


Anonymous

Cancel  Add attachments





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

Sign up for the SourceForge newsletter:





No, thanks