Skip to content

Make Commit localizable#16

Merged
sonnyp merged 1 commit intomainfrom
l10n
Aug 11, 2021
Merged

Make Commit localizable#16
sonnyp merged 1 commit intomainfrom
l10n

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?

@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.

@sonnyp sonnyp merged commit 3156916 into main Aug 11, 2021
@sonnyp sonnyp deleted the l10n branch August 11, 2021 11:05
@sonnyp sonnyp mentioned this pull request Aug 11, 2021
@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