Skip to content
encukou edited this page Jun 25, 2012 · 1 revision

FAQ

(And questions I wish were frequently asked. And frequent problems, too.)

How do I start?

Read the Transifex section below. If you're not afraid of the command line and you don't trust shaky open-source online services and you're not lazy (all commendable qualities, in fact), you'll notice the Git & Babel section below that.

What's the goal?

Your goal is to make the translation look like veekun was designed from the ground up in your language. If that is not possible with veekun's current infrastructure, it becomes our goal. File a bug in the tracker.

I don't know how to translate this!

Use your imagination. Don't do literal translations, you're not a robot. Use another word or phrase. Use something funny, if it keeps the general meaning.

What if I'm not sure my translation is right? Or my translation is incomplete?

Transifex has a “suggestions” button under each text. Click it and add your iffy/partial translation as a suggestions, then others can review and improve it.

What do I need to watch out for? There are three special things in the veekun texts:

  • %s: Something will be put in each %s's place. It should be obvious what it will be. Be sure to have the same number of %ses in the translation as there is in the English text. You can't reorder the %ses, if you need to do that, yell at somebody on IRC to replace them with {braced_placeholders}.
  • {something}: Something will be put instead of these placeholders. You can reorder these, or even delete them entirely if you need to.
  • [Absorb]{move}, [flinch]{mechanic}, [flung]{move:Fling}: These appear in pokédex data. They're used for links. The part in [brackets] is a label; this will get displayed on the page. The first (or only) part in {braces} is a category. Don't modify the category, keep it English. The part in {braces} after the :colon is the target; this determines where the link will lead. If it's not there, the label will be used for the target. Use the “preferred game language” for the target.
  • context|text Used for cases when two things are the same in English but mean different things. The part before the | doesn't appear on the site, and you can leave it out (along with the |) if you wish.
  • @text Texts and/or translations beginning with @ are used for templates that need to modify (“inflect”) some words depending on the context. These texts use the {bracketed} placeholders from above. What exactly is done depends on the language; if this happens with the English text you can ignore it and leave the @ out of your translation.
  • Whenever you're not sure about something, ask on IRC.

I have a different question!

IRC is there for you!

Guides

Transifex

  • Come to #veekun (on irc.veekun.com) and announce yourself. Hang around while you're translating. This document may not be updated all that often, you'll get more up-to-date info on IRC.
  • Go to http://www.transifex.net/projects/p/spline/resource/spline/ and see if your language is being translated already.
  • (You'll need to register at that site and log in; after you do that go to the above URL again. Note that the e-mail you give to Transifex will be visible in veekun's source repository.)
  • If you see your language, look at it to get an idea about what translations look like (click and select Translate now).
    • If the translation is incomplete, go ahead and complete it.
    • If you don't see your language, click Add translation to add it, then go and start translating.
  • Once you've done with the intro, choose another resource at http://www.transifex.net/projects/p/spline/ and do some real translating :)

Git & Babel (If this confuses you, follow Transifex above!)

  • Come to #veekun (on irc.veekun.com) and announce yourself. Hang around while you're translating. This document may not be updated all that often, you'll get more up-to-date info on IRC.

  • Install a local copy of veekun: http://bugs.veekun.com/projects/veekun/wiki/Documentation

  • Install Babel (pip install babel)

  • Start with the spline module; languages not in spline will not work.

  • Remember this arcane invocation: python setup.py extract_messages --no-location update_catalog compile_catalog. Every time you change something (git pull, translating, or hacking on veekun), you need to run that from the module's root directory it to update the .pot, .po and .mo files. Make an alias if you're a smart wizard.

    • The .pot file is the translation template; it is generated from the source code.

    • The .po files are the actual translation catalogs; it us updated from the .pot, and you're supposed to edit it

    • The .mo files has compiled translations; it is generated from the .po and veekun uses it at runtime.

    • If you don't use --no-location, you will get code locations (e.g. spline/templates/error.mako:4) for every message. Dont commit files with location information, though.

  • If your language doesn't have a translation yet, run python setup.py init_catalog -D <module-name> -l <lang> (lang is the language identifier, usually the two-letter iso639 code)

  • Edit the resulting .po file (should be around i18n/<lang>/LC_MESSAGES/<module-name>.po). You can download some dedicated editor for this.

  • Run the above incantation again to update your translation, then start veekun to check it. When you've done a good chunk, git add the .po, git commit, and git push to your Github fork. Then send a pull request (and you can come on IRC to ask people to pull it!)

Pulling from Transifex (You don't need to read this section. Unless you already know you do.)

  • Transifex has a CLI client, so pip install transifex-client.

  • In each module, tx init

  • Now you can use tx set, or just put something like this in your .tx/config file:

        [spline.spline-pokedex]
        file_filter = splinext/pokedex/i18n/<lang>/LC_MESSAGES/spline-pokedex.po
        source_file = splinext/pokedex/i18n/spline-pokedex.pot
        source_lang = en
    
        [main]
        host = http://www.transifex.net
        See http://help.transifex.net/user-guide/client/client-0.4.html if doesn't work.
        tx pull -a pulls new translations.
    
  • Run python setup.py update_catalog (or the full arcane invocation) to normalize the .po file, for better diffs.

Clone this wiki locally