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

Update POTFILES.in/skip for missing translations #918

Merged
merged 3 commits into from Oct 17, 2019

Conversation

romjerome
Copy link
Contributor

@romjerome romjerome commented Sep 30, 2019

Fix translations being missed in some files by updating POTFILES.in/skip

@codecov-io
Copy link

codecov-io commented Sep 30, 2019

Codecov Report

Merging #918 into maintenance/gramps51 will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           maintenance/gramps51     #918      +/-   ##
========================================================
- Coverage                 41.92%   41.85%   -0.08%     
========================================================
  Files                      1066     1066              
  Lines                    144874   145682     +808     
========================================================
+ Hits                      60745    60977     +232     
- Misses                    84129    84705     +576
Impacted Files Coverage Δ
gramps/plugins/tool/reorderids.py 0% <0%> (ø) ⬆️
gramps/plugins/graph/gvrelgraph.py 0% <0%> (ø) ⬆️
gramps/plugins/graph/gvhourglass.py 0% <0%> (ø) ⬆️
gramps/gui/configure.py 0% <0%> (ø) ⬆️
gramps/plugins/graph/gvfamilylines.py 0% <0%> (ø) ⬆️
gramps/plugins/export/exportftree.py 92.02% <0%> (+2.3%) ⬆️
gramps/plugins/test/exports_test.py 91.04% <0%> (+2.53%) ⬆️
gramps/plugins/export/exportvcalendar.py 93.18% <0%> (+2.7%) ⬆️
gramps/plugins/export/exportgeneweb.py 84.81% <0%> (+3.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7e2e09...a9cb623. Read the comment docs.

@Nick-Hall Nick-Hall added the bug label Sep 30, 2019
@romjerome
Copy link
Contributor Author

Note, if "Full" string is not translated, the hardcoded string will be stored on 'place_format.xml' file without "en" lang code.

Maybe 'fmt.language' might be used for a 'place_format.xml' file update or as key filter?
My current inherited (5.0-> 5.1.0 -> 5.1.1) 'place_format.xml' file looks like:

<place_formats>
  <format language="" levels=":" name="Full" reverse="False" street="0"/>
  <format language="fr" levels="0:p+1" name="Nouveau" reverse="False" street="1"/>
</place_formats>

I suppose that now (with a complete translation for my locale), it will be something like:

<place_formats>
  <format language="fr" levels=":" name="Complet" reverse="False" street="0"/>
  <format language="fr" levels="0:p+1" name="Nouveau" reverse="False" street="1"/>
</place_formats>

@romjerome
Copy link
Contributor Author

Ah, to create a new 'place_format.xml' just ignores the lang code!
My new file now looks like:

<place_formats>
  <format language="" levels=":" name="Complet" reverse="False" street="0"/>
</place_formats>

Maybe at least set a format language for avoiding handling issues in the future?

@sam-m888 sam-m888 added this to the v5.1 milestone Oct 3, 2019
@sam-m888
Copy link
Member

@romjerome Is this good to go, your comments while related don't impact this PR right? You can raise an issue if you need regarding pace_formal.xml

@romjerome
Copy link
Contributor Author

@sam-m888 it is indirectly related!
I was not able to understand the hardcoded string on 'place_format.xml' file,
maybe because translated strings on 'gramps/gen/display/place.py'
were skiped?

While entry on localized files is not translated (e.g., during devel stage)
we can generate an harcoded "Full" string on 'place_format.xml' file,
even now after adding the reference on POTFILE.in file (e.g., locales without
a translation for the "Full" string). Sure it should be a new PR.

Note, the entry already exists on translation template:

#: ../gramps/gen/plug/docgen/treedoc.py:63
msgid "Full"
msgstr ""

So, it could be a minor additionnal issue for most locales and users with an updated translation, otherwise "Full" will be hardcoded for the branch (5.1 -> 5.1.0, 5.1.1, 5.1.2 ,etc ...)

@romjerome
Copy link
Contributor Author

romjerome commented Oct 13, 2019

By renaming (or a temp remove) 'POTFILES.skip', then by running:
$ intltool-update -m, we can see a second file ignored/hidden!
gramps/plugins/tool/removespaces.glade

add missing 'removespaces.glade' reference
@sam-m888 sam-m888 changed the title Update POTFILES.in Update POTFILES.in/skip for missing translations Oct 16, 2019
@sam-m888
Copy link
Member

sam-m888 commented Oct 16, 2019

@sam-m888 sam-m888 merged commit 5e9d79a into maintenance/gramps51 Oct 17, 2019
@sam-m888 sam-m888 deleted the romjerome-patch-2 branch October 17, 2019 00:42
sam-m888 added a commit to sam-m888/gramps that referenced this pull request Oct 17, 2019
@sam-m888
Copy link
Member

Thank you

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