Summary: | Prod Scripty often does not sync translations into JSON files | ||
---|---|---|---|
Product: | [Translations] i18n | Reporter: | Alexander Potashev <aspotashev> |
Component: | general | Assignee: | Albert Astals Cid <aacid> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | luigi.toscano, meven29 |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=473746 | ||
Latest Commit: | https://invent.kde.org/sysadmin/l10n-scripty/-/commit/4aa5a7bc465e2f1454c67bfe67a2dd0eec506f9d | Version Fixed In: | |
Sentry Crash Report: |
Description
Alexander Potashev
2021-04-22 00:26:17 UTC
Sometimes JSON syncing works if at the same time a different .desktop requires an update - and then another piece of code commits and pushes into Git both of the file types: https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/update_translations#L531 (In reply to Alexander Potashev from comment #0) > SUMMARY > Prod Scripty often does not sync translations into JSON files. The piece of > code that handles JSON files cannot commit and push into Git, it only n> considers SVN - see > https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/ > update_translations#L396. > That's not correct - that code does what is supposed to do (update the svn file). The json files are pushed later together with desktop files. Recent example: https://invent.kde.org/office/kmymoney/-/commit/55aa989275a51e0bd115e686b306701e248b18e2 > Because of this problem many JSON files are out of sync, here is one > example: There's translation into Arabic (ar) for "trash > ExtraNames"/"Original Path;Deletion Date" in > https://websvn.kde.org/*checkout*/trunk/l10n-kf5/ar/messages/kio/kio._json_. > po. However it's currently not incorporated into the relevant JSON file > https://invent.kde.org/frameworks/kio/-/blob/master/src/ioslaves/trash/trash. > json. Well, that should be a different issue then. (In reply to Alexander Potashev from comment #1) > Sometimes JSON syncing works if at the same time a different .desktop > requires an update - and then another piece of code commits and pushes into > Git both of the file types: > https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/ > update_translations#L531 Always, not sometimes. The json files of the KIO protocols have a special handling, I think that something may be broken there. (In reply to Luigi Toscano from comment #4) > The json files of the KIO protocols have a special handling, I think that > something may be broken there. Where is that code ? (In reply to Méven Car from comment #5) > (In reply to Luigi Toscano from comment #4) > > The json files of the KIO protocols have a special handling, I think that > > something may be broken there. > > Where is that code ? Should be around for kio extranames https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/filljsonfrompo.py#L64 (In reply to Méven Car from comment #6) > (In reply to Méven Car from comment #5) > > (In reply to Luigi Toscano from comment #4) > > > The json files of the KIO protocols have a special handling, I think that > > > something may be broken there. > > > > Where is that code ? > > Should be around for kio extranames > https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/filljsonfrompo. > py#L64 Don't know how to test: ``` Usage: python filljsonfrompo.py basedir path/to/jsonfile path/to/l10ndir/ l10nmodulename pofilename.po ``` ~/devel/kde/l10n-scripty$ VERBOSE=1 python filljsonfrompo.py /home/tsdgeos/devel/kde/kio /home/tsdgeos/devel/kde/kio/src/kioworkers/trash/trash.json /home/tsdgeos/devel/kde/svn_root/trunk/l10n-kf6 kio kio._json_.po Found translations for dict_keys(['ru', 'pt', 'bg', 'cs', 'sk', 'eo', 'my', 'el', 'is', 'vi', 'sr@latin', 'az', 'en_GB', 'nl', 'id', 'ja', 'sr@ijekavianlatin', 'gl', 'ar', 'zh_CN', 'pt_BR', 'ast', 'be', 'tr', 'sl', 'bs', 'sv', 'lt', 'ko', 'pa', 'et', 'es', 'gd', 'uk', 'ka', 'pl', 'tok', 'ca', 'x-test', 'be@latin', 'fi', 'ta', 'sr', 'ml', 'fr', 'de', 'zh_TW', 'ca@valencia', 'da', 'nn', 'ie', 'eu', 'ia', 'it', 'sr@ijekavian', 'ro', 'tg', 'cy', 'hu']) HOLaA0 None AttributeError: "NoneType" object has no attribute "keys", skipping JSON file /home/tsdgeos/devel/kde/kio/src/kioworkers/trash/trash.json Line 116 is wrong since it fails for all the kio protocols. Seems it's been broken since 2016 ? :D A possibly relevant merge request was started @ https://invent.kde.org/sysadmin/l10n-scripty/-/merge_requests/70 Git commit 4aa5a7bc465e2f1454c67bfe67a2dd0eec506f9d by Albert Astals Cid. Committed on 08/09/2023 at 00:17. Pushed by ltoscano into branch 'master'. Fix filling kio protocols json M +6 -4 filljsonfrompo.py https://invent.kde.org/sysadmin/l10n-scripty/-/commit/4aa5a7bc465e2f1454c67bfe67a2dd0eec506f9d *** Bug 473746 has been marked as a duplicate of this bug. *** |