inveniosoftware / invenio-i18n

Invenio internationalization module.
https://invenio-i18n.readthedocs.io
MIT License
5 stars 34 forks source link

i18n workflow: force compile fuzzy #103

Closed mb-wali closed 6 months ago

mb-wali commented 2 years ago

In order to compile fuzzy marked strings, we need to force it. todoso we have to add this line use-fuzzy = True to the [compile_catalog] section of setup.cfg file.

This should be added to the following modules:

Close related issue #inveniosoftware/invenio-app-rdm/issues/230

chriz-uniba commented 1 year ago

Can we check the status of this issue?

  1. based on this list it seems, that we have packages where we force fuzzy and packages, where this is not the case. Is this information still correct?

  2. since this lists is already some days old, I remember, that there were new packages added, what's the status with these? The documentation mentions the fuzzy: https://inveniordm.docs.cern.ch/develop/howtos/i18n/#configuration Related: https://github.com/inveniosoftware/invenio-i18n/issues/99

  3. are we sure that we need/want to force it?

    • Maybe there is a better way, by fixing fuzzy (when using transifex)?
rekt-hard commented 1 year ago
  1. All packages which contain translatable strings should have the config. In the above list, not all packages have translations, which is probably the reason why not everything is checked. We can go through the packages and check.
  2. New packages should have force fuzzy enabled by default. Still should check though.
  3. It would probably require to go back and analyze where the fuzzy is being added and why. Then, we should also check which errors would be caught if we do not force it and if it affects us.
chriz-uniba commented 1 year ago

I think earliest end of September I can investigate that.

chriz-uniba commented 1 year ago

wrt. point 3:

wrt. point 2:

wrt. point 1:

I will try go through all packages and check for the fuzzy and report back.

chriz-uniba commented 1 year ago

Starting with the following:

from Pipfile.lock with invenio-app-rdm "=12.0.0b2.dev35" all packages containing invenio in their name

checked | has fuzzy | okay without fuzzy

chriz-uniba commented 1 year ago

based on this:

have fuzzy:

no fuzzy but likely no problem:

no fuzzy and more likely a problem:

no fuzzy and maybe a problem:

not checked

chriz-uniba commented 1 year ago

wrt 'no fuzzy but likely no problem:'

within each repo searched for _(, format, gettext, I18N, i18next, Trans

result:

flask-collect-invenio:
- found: python 'format'
- but no traces of translation intents

flask-kvsession:
- found _(...) in docs-folder
- but no traces of translation intents

invenio-app:
- found: 'gettext' and 'I18N' in documentation
- found: python 'format' in test_helpers
- but no traces of translation intents

invenio-assets:
- found: 'gettext' and 'I18N' in docs
- found: python 'format'
- but no traces of translation intents

invenio-base:
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-cache:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-celery:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-config:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-db:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-jsonschemas:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-logging:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-mail:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-queue:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents
- .tx/config:9:# TODO: Transifex integration

invenio-records-files:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-rest:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-search:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents

invenio-stats:
- found: python 'format'
- found: 'gettext' and 'I18N' in docs
- but no traces of translation intents
- .tx/config:9:# TODO: Transifex integration
chriz-uniba commented 1 year ago

Additionally found: https://github.com/inveniosoftware/cookiecutter-invenio-module/blob/6decff43538c9e317175bfed33878fe7b0843a53/%7B%7B%20cookiecutter.project_shortname%20%7D%7D/setup.cfg#L80

Conclusion:

chriz-uniba commented 6 months ago

All PRs are merged. For the moment we should be good. Let's close it. @zzacharo