Skip to content

Conversation

tygrysek90
Copy link
Contributor

Auto-comment PR-s touching scripts with explained diff showing changes to KEYS_TO_IGNORE in translation_check.py


Since I found myself helping @tupaschoal with summer cleaning :) of this repository in

A need to observe what is actually hidden in KEYS_TO_IGNORE and - what possible changes are making - the need araised - since it is quite dull to check 100 indexes by hand. Therefore I made script that does alike locally (thus still requires truckload of copy-pasting) - then I thought it could be useful to set it online.

PR as draft, to review idea and ... I am certain I made some mistake/oversight :)


Screenshot to give idea (made with staged files in staged repository for testing, its just showcase)

staged

auto-comment PR-s touching scripts with explained diff showing changes to KEYS_TO_IGNORE in translation_check.py
Copy link

Check results

For details click the build job and expand Run checks on the CI logs.

MissingThe translation is not added to translation file. (e.g. STR_9999 is in en-GB but is not available in given language)

Not neededThe translation file contains entries that are not in en-GB and should be removed (e.g. STR_9999 exists in given language but is not in en-GB)

SameThe translation and source string is exactly the same. (e.g. STR_9999 is Umbrella in both en-GB and given language). This may be desired in some cases (e.g. April is the same in English and German)

Other translations

MissingThe translation is not added to translation file. (e.g. STR_9999 is in en-GB but is not available in given language)

Not neededThe translation file contains entries that are not in en-GB and should be removed (e.g. STR_9999 exists in given language but is not in en-GB)

SameThe translation and source string is exactly the same. (e.g. STR_9999 is Umbrella in both en-GB and given language). This may be desired in some cases (e.g. April is the same in English and German)

ar-EG 278 0 1728
ca-ES 19 0 91
cs-CZ 1 0 150
da-DK 14 0 324
de-DE 12 0 147
en-US 3454 0 1
eo-ZZ 3 0 72
es-ES 9 0 166
fi-FI 98 0 95
fr-CA 3619 0 0
fr-FR 3 0 144
gl-ES 3 0 94
hu-HU 1 0 95
it-IT 21 0 138
ja-JP 98 0 121
ko-KR 1 0 95
nb-NO 187 0 162
nl-NL 12 0 184
pl-PL 61 0 99
pt-BR 1 0 142
ru-RU 1 0 118
sv-SE 9 0 161
tr-TR 516 0 98
uk-UA 182 0 719
vi-VN 26 0 117
zh-CN 9 0 36
zh-TW 45 0 115

@tygrysek90
Copy link
Contributor Author

@tupaschoal Hi!
Could you say what do you think about this idea?
Is it worth pursuing and completing - including auto-expanded diffs for suppress_warning.py, or is this an excessive and overkill?
I could complete it with ease, but I would really like to hear if it is good, or should I let it go?
Thanks in advance :)

@tupaschoal
Copy link
Member

I'm not sure I get all the ideas you're trying do here, would you mind explaining it in another way?

@tygrysek90
Copy link
Contributor Author

I'm not sure I get all the ideas you're trying do here, would you mind explaining it in another way?

@tupaschoal yes - i see that my style of writing PR texts is terrible (i re-read it after myself after two weeks and found i tend to divert from actual topic in writing ... which i am doing once again... facepalm)

The idea is to create an Action (image) script that would:

  • get activated only in case when PR in this repository proposes modification to translation_check.py (or suppress_warning.py)
  • produce output into comment under such PR
    • comment would contain diff-like summary of what is being done
  • the envisioned usefulness of such action is expanding STR_nnnn variables to their full 'meaning' - so the human person reviewing the PR doesn't have to do any extra look-up
  • the secondary envisioned usefulness is to mark STR numbers that are no more present in en-GB.txt, hence the maintainers and reviewers can take according actions

@tupaschoal
Copy link
Member

I see, thanks for explaining @tygrysek90 . For the removal of strings I don't think it is very important, as we often do it ourselves and if we're searching and removing, it should find on the python script too.
As for helping with the lookup, it might be a good time saver. I'll let @Gymnasiast weigh in

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

Successfully merging this pull request may close these issues.

2 participants