Android icon indicating copy to clipboard operation
Android copied to clipboard

Write CI to protect app_name

Open TheLastProject opened this issue 1 year ago • 10 comments

app_name shouldn't be translated in most languages and should be kept consistent with title.txt.

Write a small shell script or something for GitHub Actions to ensure they're consistent and to block it from being anything except "Catima" except in a list of languages explicitly on an allowlist.

TheLastProject avatar Oct 16 '24 15:10 TheLastProject

Hi @TheLastProject , I would like to work on this issue. A basic script for GA would be perfect. Please assign me the issue if no one else is working on it. Thanks!

DNotNice avatar Oct 16 '24 20:10 DNotNice

Sure, go for it :)

It might be good to look at or possibly extend https://github.com/CatimaLoyalty/Android/blob/main/.scripts/generate_feature_graphic/generate_feature_graphic.sh as that file already reads title.txt, so you're halfway there in comparing it with app_name in the values directories. But take whatever direction you think works best :)

TheLastProject avatar Oct 16 '24 21:10 TheLastProject

(Actually, that script doesn't run on MRs so it's not sufficient for checking. But parts could maybe be re-used, who knows :))

TheLastProject avatar Oct 16 '24 21:10 TheLastProject

Hi @TheLastProject , I am reading values from title.txt and comparing it with app_name. I just want to confirm if the languages on the allowlist are the ones listed in locale_values inside settings.xml, or if they are mentioned somewhere else.

DNotNice avatar Oct 18 '24 10:10 DNotNice

There's no real allowlist yet as I don't quite know in which languages it is normal to translate the name of the app/trademark, there are just too many languages out there :)

I think to keep it simple let's just say every language that already translated the app name is allowed, so any new ones will fail the CI (and I'll reach out to those translators to make sure or revert until sure) :)

TheLastProject avatar Oct 18 '24 22:10 TheLastProject

Hi! If this issue hasn’t been resolved yet, I’d like to start working on it. Please let me know.

AchilleasKat avatar Jun 24 '25 21:06 AchilleasKat

I've not seen any PR for this issue, given the last discussion was over half a year ago I think we can fairly safely assume it was abandoned. So, go for it :)

TheLastProject avatar Jun 24 '25 21:06 TheLastProject

Thanks! I’ll start working on it.

AchilleasKat avatar Jun 25 '25 19:06 AchilleasKat

@TheLastProject #2645

ProgramminCat avatar Aug 27 '25 19:08 ProgramminCat

This has been improved, but the new script from #2778 doesn't detect everything and could use some cleanup. So I'm leaving this open. Please check the FIXME and TODOs in https://github.com/CatimaLoyalty/Android/blob/main/.scripts/check_app_name.sh for more details.

TheLastProject avatar Nov 06 '25 19:11 TheLastProject