mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Temporarily taking out the create_locales.py script. Will merge with the build-android-with-native.py script later.
This commit is contained in:
parent
babe48e62c
commit
cad802a88f
@ -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)
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user