diff --git a/build-android-with-native.py b/build-android-with-native.py index 21be4e9ce..d5c5c5d75 100755 --- a/build-android-with-native.py +++ b/build-android-with-native.py @@ -517,8 +517,8 @@ for arch in ARCHS: change_env(ORIGINAL_ENVIRON) if COMPILE_APK: - #create locales.txt - create_locales.write_locales(create_locales.get_all_language_codes()) + # create locales.txt + # create_locales.write_locales(create_locales.get_all_language_codes()) syscall('rm -f bin/*.apk', shell=True) syscall('ant debug') syscall('ls -lh bin/*.apk', shell=True) diff --git a/create-locales.py b/create-locales.py index 6728cc6b8..1957d09db 100644 --- a/create-locales.py +++ b/create-locales.py @@ -2,10 +2,10 @@ import os def get_all_language_codes(): - # Get the path of the res folder + # Get the path of the res folder res_path = os.path.join(os.getcwd(),'res') - # Get all the ISO 639-1 language codes from the suffix of the value folders + # Get all the ISO 639-1 language codes from the suffix of the value folders files = [f.split('values-')[1] for f in os.listdir(res_path) if f.startswith('values-')] # Append the English Locale to the list, since the default values folder, (the english) values folder @@ -16,7 +16,7 @@ def get_all_language_codes(): def write_locales(locales): - # Create a CSV file with all the langauge codes in the assets folder + # Create a CSV file with all the langauge codes in the assets folder with open(os.path.join(os.getcwd(), 'assets', 'locales.txt'), 'w') as f: f.write(',\n'.join(locales)) diff --git a/src/org/kiwix/kiwixmobile/LanguageUtils.java b/src/org/kiwix/kiwixmobile/LanguageUtils.java index bb9164ae5..287ec48c5 100644 --- a/src/org/kiwix/kiwixmobile/LanguageUtils.java +++ b/src/org/kiwix/kiwixmobile/LanguageUtils.java @@ -1,6 +1,7 @@ package org.kiwix.kiwixmobile; import android.content.Context; +import android.graphics.Color; import android.graphics.Typeface; import android.os.Handler; import android.util.AttributeSet; @@ -88,11 +89,11 @@ public class LanguageUtils { // Change the font of all the TextViews and its subclasses in our whole app by attaching a custom // Factory to the LayoutInflater of the Activity. - // The Factory is called on each element name as the xml is parsed and we can therefore modify the parsed - // Elements while the content is being parsed. - // A Factory can only be set once on a LayoutInflator. And since we are using the support Library, + // The Factory is called on each element name as the xml is parsed and we can therefore modify + // the parsed Elements. + // A Factory can only be set once on a LayoutInflater. And since we are using the support Library, // which also sets a Factory on the LayoutInflator, we have to access the private field of the - // LayoutInflater, that handles this restriction via the Java's reflection API + // LayoutInflater, that handles this restriction via Java's reflection API // and make it accessible set it to false again. public void changeFont(LayoutInflater layoutInflater) {