Temporarily taking out the create_locales.py script. Will merge with the build-android-with-native.py script later.

This commit is contained in:
Rashiq Ahmad 2013-12-16 16:08:48 +01:00
parent babe48e62c
commit cad802a88f
3 changed files with 10 additions and 9 deletions

View File

@ -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)

View File

@ -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))

View File

@ -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) {