Loading minui/minui.h +2 −2 Original line number Diff line number Diff line Loading @@ -111,8 +111,8 @@ int res_create_alpha_surface(const char* name, GRSurface** pSurface); // given locale. The image is expected to be a composite of multiple // translations of the same text, with special added rows that encode // the subimages' size and intended locale in the pixel data. See // development/tools/recovery_l10n for an app that will generate these // specialized images from Android resources. // bootable/recovery/tools/recovery_l10n for an app that will generate // these specialized images from Android resources. int res_create_localized_alpha_surface(const char* name, const char* locale, GRSurface** pSurface); Loading tools/recovery_l10n/README.md 0 → 100644 +31 −0 Original line number Diff line number Diff line # Steps to regenerate background text images under res-*dpi/images/ 1. Build the recovery_l10n app: cd bootable/recovery && mma -j32 2. Install the app on the device (or emulator) with the intended dpi. * For example, we can use Nexus 5 to generate the text images under res-xxhdpi. * When using the emulator, make sure the NDK version matches the current repository. Otherwise, the app may not work properly. adb install $PATH_TO_APP 3. Run the app, select the string to translate and press the 'go' button. 4. After the app goes through the strings for all locales, pull the output png file from the device. adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png 5. Compress the output file put it under the corresponding directory. * "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image, which is accepted by Recovery. This also compresses the image file by ~60%. * If you're using other png compression tools, make sure the final text image works by running graphic tests under the recovery mode. pngcrush -c 0 text-out.png $OUTPUT_PNG tools/recovery_l10n/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ <item>erasing</item> <item>no_command</item> <item>error</item> <item>installing_security</item> </string-array> <!-- Displayed on the screen beneath the animated android while the Loading tools/recovery_l10n/src/com/android/recovery_l10n/Main.java +1 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ public class Main extends Activity { case 1: mStringId = R.string.recovery_erasing; break; case 2: mStringId = R.string.recovery_no_command; break; case 3: mStringId = R.string.recovery_error; break; case 4: mStringId = R.string.recovery_installing_security; break; } } @Override public void onNothingSelected(AdapterView parent) { } Loading Loading
minui/minui.h +2 −2 Original line number Diff line number Diff line Loading @@ -111,8 +111,8 @@ int res_create_alpha_surface(const char* name, GRSurface** pSurface); // given locale. The image is expected to be a composite of multiple // translations of the same text, with special added rows that encode // the subimages' size and intended locale in the pixel data. See // development/tools/recovery_l10n for an app that will generate these // specialized images from Android resources. // bootable/recovery/tools/recovery_l10n for an app that will generate // these specialized images from Android resources. int res_create_localized_alpha_surface(const char* name, const char* locale, GRSurface** pSurface); Loading
tools/recovery_l10n/README.md 0 → 100644 +31 −0 Original line number Diff line number Diff line # Steps to regenerate background text images under res-*dpi/images/ 1. Build the recovery_l10n app: cd bootable/recovery && mma -j32 2. Install the app on the device (or emulator) with the intended dpi. * For example, we can use Nexus 5 to generate the text images under res-xxhdpi. * When using the emulator, make sure the NDK version matches the current repository. Otherwise, the app may not work properly. adb install $PATH_TO_APP 3. Run the app, select the string to translate and press the 'go' button. 4. After the app goes through the strings for all locales, pull the output png file from the device. adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png 5. Compress the output file put it under the corresponding directory. * "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image, which is accepted by Recovery. This also compresses the image file by ~60%. * If you're using other png compression tools, make sure the final text image works by running graphic tests under the recovery mode. pngcrush -c 0 text-out.png $OUTPUT_PNG
tools/recovery_l10n/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ <item>erasing</item> <item>no_command</item> <item>error</item> <item>installing_security</item> </string-array> <!-- Displayed on the screen beneath the animated android while the Loading
tools/recovery_l10n/src/com/android/recovery_l10n/Main.java +1 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ public class Main extends Activity { case 1: mStringId = R.string.recovery_erasing; break; case 2: mStringId = R.string.recovery_no_command; break; case 3: mStringId = R.string.recovery_error; break; case 4: mStringId = R.string.recovery_installing_security; break; } } @Override public void onNothingSelected(AdapterView parent) { } Loading