Ticket #3608 (closed defect: fixed)
[PATCH] mc.hint: remove duplicate files
Reported by: | and | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.29 |
Component: | translations | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Remove redundant mc.hint.* files, mc will fallback to default mc.hint file.
Save space and fix RPMlint warning found by OBS Framework (build.opensuse.org).
Attachments
Change History
comment:1 Changed 9 years ago by zaytsev
The problem is that these hint files are automatically imported from Transifex, and it will give them back to you irrespectively of whether they already contain translations, or are just a copy of the master file with no string changes. So, even if this patch is accepted, the files will be added back again during the next release cycle.
If you really care about this, then you should look into mc.hint-fromTransifex.sh and related scripts, and try to fix them such that empty translations are not imported.
By the way, maybe it would make sense to generate POT-file for hints with Travis and publish it so that Transifex can fetch it automatically, like it is now done for mc.pot. After I set up support for Travis and http://source.midnight-commander.org, this shouldn't be too difficult.
Also, while we are at it, unfortunately, the manual pages translation is still broken. There was an attempt by Marco Ciampa to fix this, but I still couldn't find time to see if this works / can be integrated with the build system and Transifex:
https://mail.gnome.org/archives/mc-devel/2015-June/msg00031.html
comment:2 Changed 9 years ago by and
So mc.hint-fromTransifex.sh is a manual task, none in autogen or travis build?
Manual task because of personal user/pass requirement for Transifex?
Transifex pricing?
comment:3 Changed 9 years ago by zaytsev
So mc.hint-fromTransifex.sh is a manual task, none in autogen or travis build?
Yes, see ReleaseGuidelines for more details.
Manual task because of personal user/pass requirement for Transifex?
The way it is currently done indeed requires a personalized account on Transifex, but this is not an unsolvable problem. Maybe it is possible to do as much with the API keys, or else a separate account can be created for a robot.
The main reason is that the updates are made every time before release, and the release process contains many manual steps anyways, so thus far nobody has put the work into fully automating the handling of the translations.
Also, it never seemed desirable to import translations before actually starting the release process.
Transifex pricing?
It is completely free for FOSS projects, we are not paying them anything at all.
You only need to pay if 1) you want to translate closed-sourse content and/or 2) you want to hire professional translators to do the work, instead of relying on translations contributed by volunteers.
comment:4 Changed 9 years ago by zaytsev
If you really care about this, then you should look into mc.hint-fromTransifex.sh and related scripts, and try to fix them such that empty translations are not imported.
By the way, this shouldn't be too complicated. You just need to cmp (or otherwise compare) the incoming files and see if they match the reference one. Only if they are different, then it makes sense to add them to the release.
comment:5 Changed 9 years ago by and
Thanks for input, Yuri. :)
Next question, it is reasonable to include hints messages into normal PO files?
Yet I don't get the point why we handling normal program message locales and hints message locales different.
comment:6 Changed 9 years ago by and
Goal: move mc.hints translations into *.po files to reduce maintainer and packager cost
1) mc.hints re-org
- copy doc/hints/mc.hints to doc/mc.hints
- remove redundant "Hint:" string from each line
2) extend make update-po process
which include following steps:
- create mc.hints tempfile for translatable strings detection
- re-create pofiles.in (autom. xgettext logic)
- re-create mc.pot and *.po files
- mc.pot include results from mc.hints tempfile detection
2b) manual step (if demand as maintainer)
- sync to transifex
- autom. manipulation of mc.pot header on transfer to satisfy transifex
- sync from transifex (use transifex API v2)
- curl api v2 download of *.po files
- git commit po/*.po + pofiles.in + LINGUAS file
3) active new mc.hints usage
- insert "Hint:" string at get_random_hint()
- wrap random hints print with _()
- change make install for mc.hints file
4) cleanup steps
- modify ReleaseGuidelines
- include make update-po & git pointer before make dist
- remark that LINGUAS defines which *.po are really installed
- remove doc/hints directory
- remove xgettext lines from autogen.sh
- tidy up sync-transifex directory
Conditions:
a) tar release archive source
- includes mc.pot + mc.hints + *.po + pofiles.in + LINGUAS file + *.gmo
- no autom. make update-po run
b) git clone source
- included mc.pot + mc.hints + *.po + pofiles.in + LINGUAS file
- autom. make update-po
Questions:
on transifex side: moving mc.hints translations into mc.pot are work expensive?
local: *.po not exist on transifex side, delete local? prefer yes
local: *.po empty of translations, delete local? prefer yes
Suggestion?
I'm willing to do the work, :)
if somebody can help out at transifex side stuff.
comment:8 Changed 9 years ago by zaytsev
Sorry, I've got completely swamped in the last few weeks, so I didn't have time to try to understand and evaluate your proposal yet. I'm not sure I like the idea of merging the hints into mc.pot, but maybe it's a good thing. Need to think about it :-/
comment:16 Changed 4 years ago by zaytsev
- Milestone changed from 4.8.26 to 4.8.27
I removed duplicate hint files manually during the resync with Transifex. Unfortunately, I don't have the time to implement the proper solution that goes into the direction of what has been outlined by and.
comment:18 Changed 2 years ago by zaytsev
- Status changed from new to closed
- Resolution set to fixed
- Milestone changed from Future Releases to 4.8.29
This should be resolved now by my rewrite of hints translation management.