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

TETRAEDGE: Prioritize language specific files #5314

wants to merge 1 commit into
base: master
Choose a base branch


Copy link

@BLooperZ BLooperZ commented Sep 7, 2023

This makes language specific files (have current language in path) take precendence over "global" files.
This will allow avoiding overriding game files when making fan translations (I will update the existing hebrew fan translation for this as well).

I also considered adding the following check in the loop afterwards, so if the directory does not contains current language it will not load it:

index b08fab55068..87df9745f6d 100644
--- a/engines/tetraedge/te/te_core.cpp
+++ b/engines/tetraedge/te/te_core.cpp
@@ -233,6 +233,8 @@ Common::FSNode TeCore::findFile(const Common::Path &path) const {

        for (int langtype = 0; langtype < ARRAYSIZE(langs); langtype++) {
                const Common::Path &lang = langs[langtype];
+              if (!lang.toString().contains(language()))
+                    continue;
                for (int i = 0; i < ARRAYSIZE(pathSuffixes); i++) {
                        const char *suffix = pathSuffixes[i];

But then considered perhaps some existing translation might use en as base language, so it should be excluded, and all other options in langs list contains en anyway, so the check will do nothing.

Thank you

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