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

Make Commit localizable #16

Merged
merged 1 commit into from
Aug 11, 2021
Merged

Make Commit localizable #16

merged 1 commit into from
Aug 11, 2021

Conversation

sonnyp
Copy link
Owner

@sonnyp sonnyp commented Aug 9, 2021

No description provided.

@sonnyp
Copy link
Owner Author

sonnyp commented Aug 9, 2021

@pervoj could you have a look see if it makes sense to you?

src/about.js Show resolved Hide resolved
src/welcome.ui Outdated Show resolved Hide resolved
@sonnyp sonnyp force-pushed the l10n branch 2 times, most recently from 9d4ea43 to 87dca1a Compare August 11, 2021 10:09
@pervoj
Copy link
Contributor

pervoj commented Aug 11, 2021

You can also make some simple script (e.g. update-locales.sh) for automatic generation:

#!/bin/bash
xgettext -f po/POTFILES -o po/re.sonny.Commit.pot -cTRANSLATORS --from-code=UTF-8
sed -i "s/Project-Id-Version: PACKAGE VERSION/Project-Id-Version: re.sonny.Commit/" po/re.sonny.Commit.pot
msgmerge -U po/*.po po/re.sonny.Commit.pot

You can run this script before each release and then, for example, create an issue and mention the translator. (dialect-app/dialect#157) This is a simple and effective way to keep the translations up to date in each version.

src/about.js Show resolved Hide resolved
@pervoj
Copy link
Contributor

pervoj commented Aug 12, 2021

I found that you can also update the POT and PO files using Meson commands:

meson compile projectname-pot # for generating POT file
meson compile projectname-update-po # for updating PO files

Source: https://mesonbuild.com/Localisation.html

sonnyp added a commit that referenced this pull request Aug 12, 2021
@sonnyp
Copy link
Owner Author

sonnyp commented Aug 12, 2021

8841d72

Nice catch. I'm always hesitant to rely on meson too much but perhaps it's time I fully embrace it.
On one hand it makes most tasks a breeze and just works, on the other, it hides a lot of what is going on.

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.

2 participants