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

helper script i18n.sh could notify about fuzzy translations #59

Closed
saschagottfried opened this issue Apr 29, 2015 · 6 comments
Closed

Comments

@saschagottfried
Copy link

I use docs/examples/i18n.sh a couple of days. I works like a charm. Everything is working fine and the script output is like:

Extract messages
Update translations
....... done.
....... done. 
Compile message catalogs

But sometimes a translation is not showing up. After a bit of investigation I almost always find that small word fuzzy in the translation files (*.po).

After running the script I would like to be informed about fuzzy translations. It was pretty easy to change that. Just add --statistics to the call to msgfmt:

msgfmt --statistics -o "${po%.*}.mo" "$po"

Now a very useful summary with quantitative information is appended:

Extract messages
Update translations
....... done.
....... done.
Compile message catalogs
39 translated messages.
34 translated message, 1 fuzzy translation, 4 untranslated messages.

Given that little bit of more information I know exactly that there are fuzzy translations and can fix them immediately if I want.

disko pushed a commit to disko/Kotti that referenced this issue Sep 26, 2015
to possible fuzzy translations; see wichert/lingua#59
Additionally now we print file being currently compiled so that we know which statistic is
for which language.
Added '--no-wrap' option to invocation of `msgmerge` to avoid wrapping original
msgids. Wrapping needlessly "mangles" original msgids.
Please note that both options were lost during migration to lingua 3.6.1 in commit
Kotti@285bad5
disko added a commit to disko/Kotti that referenced this issue Sep 26, 2015
* feature/reduce_db_queries:
  Re-enable failing assert.  Fixed with ``reorder_on_append``.
  Revert "Remove assert that fails for no reason on Postgres."
  Upgrade Babel to 2.1.1.
  Add ``kotti.modification_date_excludes`` configuration option.
  Remove assert that fails for no reason on Postgres.
  Add changenotes.
  Add ``kotti.modification_date_excludes`` configuration option.
  Prevent some SQLAlchemy warnings that have been present since SQLAlchemy 1.0.
  Order conf_defaults and conf_dotted alphabetically.
  Upgrade requirements to their latest respective version.
  Added '--statistics' option to invocation of `msgfmt` to bring attention to possible fuzzy translations; see wichert/lingua#59 Additionally now we print file being currently compiled so that we know which statistic is for which language. Added '--no-wrap' option to invocation of `msgmerge` to avoid wrapping original msgids. Wrapping needlessly "mangles" original msgids. Please note that both options were lost during migration to lingua 3.6.1 in commit Kotti@285bad5
  Add missing FK indices on tags_to_contents.
  Fix migration step (culumns must be a list of column names).
  Add changenotes.
  Add "missing" foreign key indices (with corresponding migration step).
  Don't query the ``principals`` table for roles (they're not stored there as separate records).
  Use eager / joined loading for local_groups.  Use the (already loaded) ``Node.local_groups`` relationship instead of DB queries where possible.
  Add caching for default root node getter.
disko added a commit to disko/Kotti that referenced this issue Sep 27, 2015
* release/1.2.0: (35 commits)
  Bump version.
  Make waitress listen on all interfaces in development.ini.  Resolves Kotti#371.
  Use unicode instead of strings in test (prevents SQLAlchemy warnings).
  Make scaffold use the name of project as the name of application.  Closes Kotti#457.
  Make kotti_tinymce a requirement in the scaffold.  Fixes Kotti#447.
  Add myself.
  Reorder children on append.
  Re-enable failing assert.  Fixed with ``reorder_on_append``.
  Revert "Remove assert that fails for no reason on Postgres."
  Upgrade Babel to 2.1.1.
  Upgrade Babel to 2.1.1.
  Add ``kotti.modification_date_excludes`` configuration option.
  Remove assert that fails for no reason on Postgres.
  Add changenotes.
  Add ``kotti.modification_date_excludes`` configuration option.
  Prevent some SQLAlchemy warnings that have been present since SQLAlchemy 1.0.
  Order conf_defaults and conf_dotted alphabetically.
  Upgrade requirements to their latest respective version.
  Added '--statistics' option to invocation of `msgfmt` to bring attention to possible fuzzy translations; see wichert/lingua#59 Additionally now we print file being currently compiled so that we know which statistic is for which language. Added '--no-wrap' option to invocation of `msgmerge` to avoid wrapping original msgids. Wrapping needlessly "mangles" original msgids. Please note that both options were lost during migration to lingua 3.6.1 in commit Kotti@285bad5
  Prevent some SQLAlchemy warnings that have been present since SQLAlchemy 1.0.
  ...
disko added a commit to disko/Kotti that referenced this issue Sep 27, 2015
* origin/testing: (35 commits)
  Bump version.
  Make waitress listen on all interfaces in development.ini.  Resolves Kotti#371.
  Use unicode instead of strings in test (prevents SQLAlchemy warnings).
  Make scaffold use the name of project as the name of application.  Closes Kotti#457.
  Make kotti_tinymce a requirement in the scaffold.  Fixes Kotti#447.
  Add myself.
  Reorder children on append.
  Re-enable failing assert.  Fixed with ``reorder_on_append``.
  Revert "Remove assert that fails for no reason on Postgres."
  Upgrade Babel to 2.1.1.
  Upgrade Babel to 2.1.1.
  Add ``kotti.modification_date_excludes`` configuration option.
  Remove assert that fails for no reason on Postgres.
  Add changenotes.
  Add ``kotti.modification_date_excludes`` configuration option.
  Prevent some SQLAlchemy warnings that have been present since SQLAlchemy 1.0.
  Order conf_defaults and conf_dotted alphabetically.
  Upgrade requirements to their latest respective version.
  Added '--statistics' option to invocation of `msgfmt` to bring attention to possible fuzzy translations; see wichert/lingua#59 Additionally now we print file being currently compiled so that we know which statistic is for which language. Added '--no-wrap' option to invocation of `msgmerge` to avoid wrapping original msgids. Wrapping needlessly "mangles" original msgids. Please note that both options were lost during migration to lingua 3.6.1 in commit Kotti@285bad5
  Prevent some SQLAlchemy warnings that have been present since SQLAlchemy 1.0.
  ...
@piotr-dobrogost
Copy link

Why was it put in the example only and not in the script? Having no information on fuzzy translations gives bad user experience.

@rnixx
Copy link
Contributor

rnixx commented Oct 9, 2015

What do you mean with "in the example only and not in the script"?

BTW - this one is a good change
Kotti/Kotti@b14133c#diff-8eee0084a940ff710b60a5704fb951b5R38
you might open a pull request.

@piotr-dobrogost
Copy link

Sorry, I had impression i18n.sh script is part of project's source which apparently is not the case (it lives only in examples). As to the change you showed I have plan to make PR with this and other changes restoring some features of Babel's python scripts.

@rnixx
Copy link
Contributor

rnixx commented Oct 9, 2015

Actually it's just a - even if very well working - example how one can do things with lingua ;)

@piotr-dobrogost
Copy link

Btw, what was the reason to "lump" all steps into one shell script and not to have four python scripts as in Babel?

@rnixx
Copy link
Contributor

rnixx commented Oct 9, 2015

The reason is that I only have to remember one script instead of four. It's the lowest barrier I can think of for new users (UPDATE and for me)

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

No branches or pull requests

3 participants