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

i18n workflow: force compile fuzzy #103

Closed
22 of 43 tasks
mb-wali opened this issue Jan 18, 2022 · 9 comments
Closed
22 of 43 tasks

i18n workflow: force compile fuzzy #103

mb-wali opened this issue Jan 18, 2022 · 9 comments
Projects

Comments

@chriz-uniba
Copy link
Contributor

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: (transifex) make a list of modules that invenioRDM - uses #99

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

    • Maybe there is a better way, by fixing fuzzy (when using transifex)?
  • I can/will try to check transifex in the upcoming weeks.

  • I would be happy to get some opinions/experience of the force-use.
    Maybe: @utnapischtim @rekt-hard @zzacharo

  • When discussed point 3. I could try to get the changes in all packages.

@rekt-hard
Copy link
Contributor

rekt-hard commented Aug 23, 2023

  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
Copy link
Contributor

I think earliest end of September I can investigate that.

@chriz-uniba
Copy link
Contributor

chriz-uniba commented Sep 27, 2023

wrt. point 3:

  • as described here i18n workflow: translation files (.mo) are not being created invenio-app-rdm#230

  • and tested and read in the docs:

  • at least, as long as we have the header we get the fuzzy

  • an alternative for this header-fuzzy is to use python setup.py extract_messages --omit-header

  • but then we loose the header information

  • I didn't check whether there are other ways how fuzzy could get in our files

  • the moment a file contains fuzzy this file will not compiled at all anymore - without any warning or error messages (others are complaining about this, too)

  • this makes it hard to detect the issue

  • therefore, using fuzzy in setup.cfg sounds the best way to go, for now:

    [compile_catalog]
    use-fuzzy = True   
    

wrt. point 2:

wrt. point 1:

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

@chriz-uniba
Copy link
Contributor

chriz-uniba commented Sep 27, 2023

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
Copy link
Contributor

chriz-uniba commented Sep 27, 2023

based on this:

have fuzzy:

  • invenio-access
  • invenio-accounts
  • invenio-app-rdm
  • invenio-banners
  • invenio-communities
  • invenio-drafts-resources
  • invenio-formatter
  • invenio-i18n
  • invenio-notifications
  • invenio-oaiserver
  • invenio-oauth2server
  • invenio-oauthclient
  • invenio-pidstore
  • invenio-rdm-records
  • invenio-records
  • invenio-records-permissions
  • invenio-records-resources
  • invenio-requests
  • invenio-search-ui
  • invenio-theme
  • invenio-userprofiles
  • invenio-users-resources
  • invenio-vocabularies
  • invenio-webhooks

no fuzzy but likely no problem:

  • flask-collect-invenio
  • flask-kvsession-invenio
  • invenio-app
  • invenio-assets
  • invenio-base
  • invenio-cache
  • invenio-celery
  • invenio-config
  • invenio-db
  • invenio-jsonschemas
  • invenio-logging
  • invenio-mail
  • invenio-queues
  • invenio-records-files
  • invenio-rest
  • invenio-search
  • invenio-stats

no fuzzy and more likely a problem:

  • invenio-files-rest
  • invenio-github
  • flask-security-invenio
  • invenio-admin
  • invenio-administration
  • invenio-pages
  • invenio-previewer

no fuzzy and maybe a problem:

  • invenio-indexer
  • invenio-records-rest
  • invenio-records-ui

not checked

  • cookiecutter-invenio-rdm
  • cookiecutter-invenio-module
  • marshmallow-utils
  • react-searchkit

chriz-uniba added a commit to chriz-uniba/invenio-records-ui that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-records-rest that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-indexer that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-previewer that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-pages that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-administration that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-admin that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/flask-security-fork that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-github that referenced this issue Oct 4, 2023
chriz-uniba added a commit to chriz-uniba/invenio-files-rest that referenced this issue Oct 4, 2023
@chriz-uniba
Copy link
Contributor

chriz-uniba commented Oct 4, 2023

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
Copy link
Contributor

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

Conclusion:

  • waiting for the PRs to get merged
  • there is the possibility that some packages do not enable translation, although text will get to the user (maybe invenio-stats?). However, it is hard to see, which sentences will be seen by whom.
  • Therefore, we will wait and check in the gui whether untranslated sentences will show up anywhere and fix it then.

chriz-uniba added a commit to chriz-uniba/flask-security-fork that referenced this issue Oct 9, 2023
mb-wali pushed a commit to inveniosoftware/invenio-files-rest that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-github that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/flask-security-fork that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-admin that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-administration that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-records-ui that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-records-rest that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-indexer that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-previewer that referenced this issue Nov 27, 2023
mb-wali pushed a commit to inveniosoftware/invenio-pages that referenced this issue Nov 27, 2023
@chriz-uniba
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
I18N
TODO
Development

No branches or pull requests

4 participants