翻译 LibreOffice

From The Document Foundation Wiki
Jump to: navigation, search
This page is a translated version of the page Translating LibreOffice and the translation is 30% complete.

Outdated translations are marked like this.
Other languages:
العربية • ‎dansk • ‎Deutsch • ‎English • ‎español • ‎galego • ‎עברית • ‎hrvatski • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎Basa Jawa • ‎한국어 • ‎occitan • ‎中文(简体)‎ • ‎中文(台灣)‎

LibreOffice 的翻译流程很直观。我们建议的翻译方式是通过我们的在线翻译门户 Pootle 进行。采用这种方法,您只需要有网页浏览器,有网络连接,就可以进行翻译。如果您更喜欢离线翻译,也是可以的。在开始翻译之前,如果某种语言还不存在,请先联系 语言团队

2019-11-26 更新: 我们目前正在缓慢过渡到 Weblate,不久的将来会弃用 Pootle. 这是在 Almeria 的 LibOCon 小组会议期间做出的决定。

Update on 2019-11-26: we are slowly transitioning to Weblate and will deprecate Pootle in the near future. The decision was made during the community workshop during LibOCon in Almeria.

截至日期

请见 发布计划 页面。该页面显示了程序源代码被标记为 beta, RC 或“已发布”状态的日期。翻译的截至日期永远是公布的代码标记日期的前2天。

对于每一次源代码构建:

  • 翻译字符串会在星期二从 Pootle 上抓取
  • 抓取到的翻译内容会在源代码打标记之前被提交到git仓库中,每个打标记的截止日期为星期一。

因此,要想让你的翻译更改在源代码中即时体现,请在星期一之前提交更改。

Pootle

TDF Pootle 永远包含最新可翻译的字符串。Pootle 管理员会经常更新这些字符串。

On the right hand side of Pootle home page, you will see a list of projects currently available for translation. Their names are self-explanatory. To localize LibreOffice, you'll have to work on projects called LibreOffice master – UI, LibreOffice master – Help, LibreOffice x.x.x – UI and LibreOffice x.x.x – Help. In general, if you're just starting, it probably makes most sense to work on master, but if you want to fix some nasty L10n bug in the current version of LibO, you can do that in the branch too.

在 master 分支上翻译意味着什么?

The workflow has changed between 4.4 and 5.0, instead of working only on branches, the work can start earlier in between branches by working on master. Once there is a code branch, then it is reflected on Pootle branch and the work done on master is copied to the new created branch:

Regular code workflow:

─────┬─────┬─────┬─────┬─────┬─────> master
     │     │     │     │     └─────> libreoffice-6-3
     │     │     │     └───────────> libreoffice-6-2
     │     │     └────────────────> libreoffice-6-1
     │     └─────────────────────> libreoffice-6-0
     └──────────────────────────> libreoffice-5-4

All branches were once "master", and then were split up to refine stuff. Translations were special project, as basically there was no "in between" updates. Translations did jump from 4-2 to 4-3, from 4-3 to 4-4 without any intermediate updates in between.

Master-based workflow would mean that when libreoffice-5-0 is created, the translations of master will be copied over and reused for that, and master then would be ongoing for libreoffice-5-1. See the whole explanation of Christian in this thread

If you prefer to translate offline, you can download full or partial ZIP archives with PO files (or just separate PO files) from Pootle and use your favourite tool(s) to work on them. You'll find the links in Translate and Overview tabs of the desired language/project combination. Assuming you have the appropriate rights for your language, you should be able to upload PO or ZIP files back anytime (in case of ZIP, you must make sure to keep the initial directory structure intact).

If you need more information on how to use Pootle, see the Pootle Guide. We recommend to look at the Check section, this is important for the quality of the localization.

If, when you update the template against your language in Pootle, you see some strings that pertain to another language, do not translate again the strings, we always keep the previous translation files in Git and are able to restore your previous work or you can upload your own previous files and then update the template again.

You'll notice there are a few more projects available in Pootle. Here's a short overview of them:

  • Terminology: this is a Pootle helper project which makes localization somewhat easier. If the Terminology project is present and not empty in your language, Pootle will show you hints for terms that exist in the Terminology file when you come across those terms while translating other projects.
  • Website: this small project contains localization files that relate to websites. In particular, the mysite file contains our custom strings that appear in libreoffice.org websites (mostly related to the download page experience), the faqs file contains localization of the FAQs module that might (or might not) be used on local websites, extensionssite contains localization for extensions.libreoffice.org, and googleplay contains the strings we use in Google Play store. You don't have to translate all of these files, especially if you know you won't need some of them. Note that many generic things related to the CMS of libreoffice.org are being localized elsewhere. Also, please note that by completing this module, you don't get a "translated website". However, if you want to host a LibreOffice website in your language, you'll most likely want to translate at least the mysite file.

Weblate

For more information about the tool itself, please see https://weblate.org/en/ and its documentation https://docs.weblate.org/en/latest/

TDF runs its own instance here https://weblate.documentfoundation.org/

FAQ

  • When uploading a file, I have an error "Please fix errors in the form. Error in parameter method: This field is required"

- Make sure you have marked one of the fields in the File upload mode area

  • How do I search for a KeyID?

- Make sure you have picked Exact match in the Search type and check Comment strings

  • How do I add members to my language group?

- Currently, only Weblate admins are able to add members to languages groups, either send a mail to the l10n list or to Sophie


POT 和 PO 文件

从源代码提取到的最新 POT 模板文件始终可以在以下位置找到:

PO files for each supported language are stored in the source code repository in the module called 'translations'. This module is maintained by Andras Timar, who will get translations from Pootle (or alternative sources) before each release and will push them to git.

技巧提示

  • You are encouraged to subscribe to l10n@global.libreoffice.org mailing list. Apart from being a support channel for localizers, it's also the medium where important information for translators (such as string updates and deadlines) is announced. You can also ask 'timar' on irc.freenode.net in the #libreoffice-dev channel.
  • You may edit new .ui files using Glade to see them in context. For that install Glade for your distribution (I only know for Linux, so fix it if you know for other distributions) and either a version from master or the last dev build you want to translate.
    • then enter in your terminal:
export GLADE_CATALOG_SEARCH_PATH=/opt/libreofficedev4.2/share/glade/** then enter the path of the file you want to display:
glade /opt/libreofficedev4.2/share/config/soffice.cfg/cui/ui/pageformatpage.ui

LibreOffice Online

There is a test server built from the master branch of LibreOffice and LibreOffice Online and with the latest translations from Weblate. TDF LDAP accounts can be used to log in.

其他的本地化领域

More aspects of LibreOffice localization are covered in the LibreOffice Localization Guide.

Some other aspects are covered in the UI and Help files Content Guide which details what has or has not to be translated, like variables or xml content.