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

PO files generation #157

Closed
putnik opened this Issue Jan 10, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@putnik

putnik commented Jan 10, 2013

Now setup.py generate_pot create/update files with only 12 messages.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Jan 12, 2013

Member

This area is not really my forte, but I'll happily accept patches and guidance...

I dusted off my memory about what python setup.py build_pot is doing and I realized now what we need to do (I didn't actually know this until reading the code now).

All of the strings needing translation should be marked with N_('the string'). The first step is we should add a null translation marker in cola/core.py:

def N_(message):
    return message

... and then all the UI strings should use N_('the string') so that they are picked up.

Do you know which process is best for translators? Should I be generating a .pot file and checking it into the repo after the strings have been marked? I should probably read up on it some more.

Member

davvid commented Jan 12, 2013

This area is not really my forte, but I'll happily accept patches and guidance...

I dusted off my memory about what python setup.py build_pot is doing and I realized now what we need to do (I didn't actually know this until reading the code now).

All of the strings needing translation should be marked with N_('the string'). The first step is we should add a null translation marker in cola/core.py:

def N_(message):
    return message

... and then all the UI strings should use N_('the string') so that they are picked up.

Do you know which process is best for translators? Should I be generating a .pot file and checking it into the repo after the strings have been marked? I should probably read up on it some more.

@davvid davvid closed this in ece7de6 Feb 26, 2013

davvid added a commit that referenced this issue Feb 26, 2013

app: simplify translation setup
We will be using i18n.N_() everywhere so we no longer need to monkey-
patch Qt's translate().

This is a pre-requisite for fixing #157.

Signed-off-by: David Aguilar <davvid@gmail.com>

davvid added a commit that referenced this issue Feb 26, 2013

i18n: mark strings for translation
Mark all strings for l10n using N_('...').
"python setup.py build_pot" now generates .po files
with these messages.

Closes #157

Reported-by: Sergey Leschina <mail@putnik.ws>
Signed-off-by: David Aguilar <davvid@gmail.com>
@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Feb 26, 2013

Member

I've marked all strings using N_("the string"). When I run python setup.py build_pot it now creates .po files with lots of messages. What's the normal workflow? Do I check in the generated .pot file?

Member

davvid commented Feb 26, 2013

I've marked all strings using N_("the string"). When I run python setup.py build_pot it now creates .po files with lots of messages. What's the normal workflow? Do I check in the generated .pot file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment