Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fixes in translation generation (itstool) #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nelson6e65
Copy link
Contributor

This will fix issues on including unnecessary strings to be translated, like in monsters/*.xml (#299)

  • 1️⃣ Ignore strings that should not be translated from XML files (_monsters_), by adding ITS rules. Only "name" attribute/element are collected for translation.
    Rules for Monsters are in monsters/_monsters.its file, and can be used by running:
$ itstool monsters/monster*.xml -o "monsters.pot" -i "monsters/_monsters.its"
  • 2️⃣❓ Insert ITS rules directly in *.xml files to do not use -i command line option. Then, translatable strings can be collected just by runnig:
$ itstool monsters/monster*.xml -o "monsters.pot"

Feedbacks

  • Is it really needed 2️⃣ or 1️⃣ is enough? (Check nelson6e65@f386992).
    I think 2️⃣ is unnecessary, and with only 1️⃣ the *.xmls kept simple and untouched. But I don't know how @4144 collect the strings exactly.

This avoid including unnecesary strings to be translated.
Only the NAME of monster must to be translatable.

Usage:
  Via "-i" command-line option.
    Just run this command:

      $ itstool monsters/monster*.xml -o "monsters.pot" -i "monsters/_monsters.its"

  Using XLink href attribute in *.xml files.
    - Add this line after root node (monsters) to ALL monster files:

      <its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its"    xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="_monsters.its" xlink:type="simple"/>

    - Then run:

      $ itstool monsters/monster*.xml -o "monsters.pot"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant