summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-28 18:44:49 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-12-19 15:31:01 +0100
commit74db157b9406594a549a70415668dd6cbe17d1d3 (patch)
treed47451181a77cc1b03a55d63d49a9fecc98eb044
parentgui: stock theme rework (diff)
downloadandroid_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.gz
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.bz2
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.lz
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.xz
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.zst
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.zip
-rw-r--r--Android.mk5
-rw-r--r--data.cpp15
-rw-r--r--find_file.cpp2
-rw-r--r--gui/Android.mk4
-rw-r--r--gui/action.cpp84
-rw-r--r--gui/console.cpp113
-rw-r--r--gui/devices/common/res/languages/en.xml226
-rw-r--r--gui/devices/common/res/languages/es.xml13
-rw-r--r--gui/devices/common/res/languages/fi.xml13
-rw-r--r--gui/gui.cpp59
-rw-r--r--gui/gui.hpp33
-rw-r--r--gui/listbox.cpp18
-rw-r--r--gui/objects.hpp11
-rw-r--r--gui/pages.cpp184
-rw-r--r--gui/pages.hpp21
-rw-r--r--gui/resources.cpp133
-rw-r--r--gui/resources.hpp21
-rwxr-xr-x[-rw-r--r--]gui/theme/common/landscape.xml1062
-rwxr-xr-xgui/theme/common/languages/en.xml666
-rw-r--r--gui/theme/common/languages/es.xml13
-rw-r--r--gui/theme/common/languages/fi.xml13
-rwxr-xr-x[-rw-r--r--]gui/theme/common/portrait.xml1050
-rwxr-xr-x[-rw-r--r--]gui/theme/common/watch.xml1018
-rw-r--r--gui/theme/landscape_hdpi/ui.xml49
-rw-r--r--gui/theme/landscape_mdpi/ui.xml49
-rw-r--r--gui/theme/portrait_hdpi/ui.xml53
-rw-r--r--gui/theme/portrait_mdpi/ui.xml53
-rw-r--r--gui/theme/watch_mdpi/ui.xml6
-rw-r--r--gui/twmsg.cpp129
-rw-r--r--gui/twmsg.h97
-rw-r--r--openrecoveryscript.cpp123
-rw-r--r--partition.cpp188
-rw-r--r--partitionmanager.cpp257
-rw-r--r--partitions.hpp4
-rw-r--r--twinstall.cpp18
-rw-r--r--twrp-functions.cpp45
-rw-r--r--twrp.cpp21
-rw-r--r--twrpDU.cpp7
-rw-r--r--twrpDigest.cpp10
-rw-r--r--twrpTar.cpp241
40 files changed, 4041 insertions, 2086 deletions
diff --git a/Android.mk b/Android.mk
index 33a43d8b4..61435c314 100644
--- a/Android.mk
+++ b/Android.mk
@@ -329,6 +329,11 @@ endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
LOCAL_CFLAGS += -DTW_USE_NEW_MINADBD
endif
+ifneq ($(TW_DEFAULT_LANGUAGE),)
+ LOCAL_CFLAGS += -DTW_DEFAULT_LANGUAGE=$(TW_DEFAULT_LANGUAGE)
+else
+ LOCAL_CFLAGS += -DTW_DEFAULT_LANGUAGE=en
+endif
LOCAL_ADDITIONAL_DEPENDENCIES := \
dump_image \
diff --git a/data.cpp b/data.cpp
index 9f2e6b5cb..6b0f97131 100644
--- a/data.cpp
+++ b/data.cpp
@@ -50,6 +50,7 @@
#include "find_file.hpp"
#include "set_metadata.h"
#include <cutils/properties.h>
+#include "gui/gui.hpp"
#define DEVID_MAX 64
#define HWID_MAX 32
@@ -229,7 +230,7 @@ void DataManager::get_device_id(void) {
}
strcpy(device_id, "serialno");
- LOGERR("=> device id not found, using '%s'\n", device_id);
+ LOGINFO("=> device id not found, using '%s'\n", device_id);
mConstValues.insert(make_pair("device_id", device_id));
return;
}
@@ -616,8 +617,10 @@ void DataManager::SetBackupFolder()
}
}
} else {
- if (PartitionManager.Fstab_Processed() != 0)
- LOGERR("Storage partition '%s' not found\n", str.c_str());
+ if (PartitionManager.Fstab_Processed() != 0) {
+ LOGINFO("Storage partition '%s' not found\n", str.c_str());
+ gui_err("unable_locate_storage=Unable to locate storage device.");
+ }
}
}
@@ -890,6 +893,8 @@ void DataManager::SetDefaultValues()
#endif
mValues.insert(make_pair("tw_mount_system_ro", make_pair("2", 1)));
mValues.insert(make_pair("tw_never_show_system_ro_page", make_pair("0", 1)));
+ mValues.insert(make_pair("tw_language", make_pair(EXPAND(TW_DEFAULT_LANGUAGE), 1)));
+ LOGINFO("LANG: %s\n", EXPAND(TW_DEFAULT_LANGUAGE));
pthread_mutex_unlock(&m_valuesLock);
}
@@ -1033,7 +1038,7 @@ void DataManager::Output_Version(void)
}
FILE *fp = fopen(Path.c_str(), "w");
if (fp == NULL) {
- LOGERR("Unable to open '%s'.\n", Path.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Path)(strerror(errno)));
return;
}
strcpy(version, TW_VERSION_STR);
@@ -1069,7 +1074,7 @@ void DataManager::ReadSettingsFile(void)
{
usleep(500000);
if (!PartitionManager.Mount_Settings_Storage(false))
- LOGERR("Unable to mount %s when trying to read settings file.\n", settings_file);
+ gui_msg(Msg(msg::kError, "unable_to_mount=Unable to mount {1}")(settings_file));
}
mkdir(mkdir_path, 0777);
diff --git a/find_file.cpp b/find_file.cpp
index 78db5343d..7f4191e4a 100644
--- a/find_file.cpp
+++ b/find_file.cpp
@@ -48,7 +48,7 @@ string Find_File::Find_Internal(const string& filename, const string& starting_p
d = opendir(starting_path.c_str());
if (d == NULL) {
- LOGERR("Find_File: Error opening '%s'\n", starting_path.c_str());
+ LOGINFO("Find_File: Error opening '%s'\n", starting_path.c_str());
return "";
}
diff --git a/gui/Android.mk b/gui/Android.mk
index 66883a4fa..84f890ca7 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -28,7 +28,8 @@ LOCAL_SRC_FILES := \
mousecursor.cpp \
scrolllist.cpp \
patternpassword.cpp \
- textbox.cpp
+ textbox.cpp \
+ twmsg.cpp
ifneq ($(TWRP_CUSTOM_KEYBOARD),)
LOCAL_SRC_FILES += $(TWRP_CUSTOM_KEYBOARD)
@@ -107,6 +108,7 @@ ifeq ($(TW_CUSTOM_THEME),)
ifeq ($(TWRP_NEW_THEME),true)
TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/theme/$(TW_THEME)
TWRP_RES := $(commands_recovery_local_path)/gui/theme/common/fonts
+ TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/languages
TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/$(word 1,$(subst _, ,$(TW_THEME))).xml
# for future copying of used include xmls and fonts:
# UI_XML := $(TWRP_THEME_LOC)/ui.xml
diff --git a/gui/action.cpp b/gui/action.cpp
index 46f4575d7..3e27dbb44 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -197,6 +197,7 @@ GUIAction::GUIAction(xml_node<>* node)
ADD_ACTION(cancelbackup);
ADD_ACTION(checkpartitionlifetimewrites);
ADD_ACTION(mountsystemtoggle);
+ ADD_ACTION(setlanguage);
// remember actions that run in the caller thread
for (mapFunc::const_iterator it = mf.begin(); it != mf.end(); ++it)
@@ -340,12 +341,12 @@ int GUIAction::NotifyVarChange(const std::string& varName, const std::string& va
void GUIAction::simulate_progress_bar(void)
{
- gui_print("Simulating actions...\n");
+ gui_msg("simulating=Simulating actions...");
for (int i = 0; i < 5; i++)
{
if (PartitionManager.stop_backup.get_value()) {
DataManager::SetValue("tw_cancel_backup", 1);
- gui_print("Backup Canceled.\n");
+ gui_msg("backup_cancel=Backup Canceled.");
DataManager::SetValue("ui_progress", 0);
PartitionManager.stop_backup.set_value(0);
return;
@@ -381,10 +382,10 @@ int GUIAction::flash_zip(std::string filename, int* wipe_cache)
{
DataManager::SetValue("tw_operation", "Configuring TWRP");
DataManager::SetValue("tw_partition", "");
- gui_print("Configuring TWRP...\n");
+ gui_msg("config_twrp=Configuring TWRP...");
if (TWFunc::Exec_Cmd("/sbin/installTwrp reinstall") < 0)
{
- gui_print("Unable to configure TWRP with this kernel.\n");
+ gui_msg("config_twrp_err=Unable to configure TWRP with this kernel.");
}
}
}
@@ -587,12 +588,12 @@ int GUIAction::mount(std::string arg)
if (!simulate)
PartitionManager.usb_storage_enable();
else
- gui_print("Simulating actions...\n");
+ gui_msg("simulating=Simulating actions...");
} else if (!simulate) {
PartitionManager.Mount_By_Path(arg, true);
PartitionManager.Add_MTP_Storage(arg);
} else
- gui_print("Simulating actions...\n");
+ gui_msg("simulating=Simulating actions...");
return 0;
}
@@ -602,12 +603,12 @@ int GUIAction::unmount(std::string arg)
if (!simulate)
PartitionManager.usb_storage_disable();
else
- gui_print("Simulating actions...\n");
+ gui_msg("simulating=Simulating actions...");
DataManager::SetValue(TW_ACTION_BUSY, 0);
} else if (!simulate) {
PartitionManager.UnMount_By_Path(arg, true);
} else
- gui_print("Simulating actions...\n");
+ gui_msg("simulating=Simulating actions...");
return 0;
}
@@ -615,7 +616,7 @@ int GUIAction::restoredefaultsettings(std::string arg __unused)
{
operation_start("Restore Defaults");
if (simulate) // Simulated so that people don't accidently wipe out the "simulation is on" setting
- gui_print("Simulating actions...\n");
+ gui_msg("simulating=Simulating actions...");
else {
DataManager::ResetDefaults();
PartitionManager.Update_System_Details();
@@ -636,7 +637,7 @@ int GUIAction::copylog(std::string arg __unused)
TWFunc::copy_file("/tmp/recovery.log", dst.c_str(), 0755);
tw_set_default_metadata(dst.c_str());
sync();
- gui_print("Copied recovery log to %s.\n", DataManager::GetCurrentStoragePath().c_str());
+ gui_msg(Msg("copy_log=Copied recovery log to {1}.")(DataManager::GetCurrentStoragePath()));
} else
simulate_progress_bar();
operation_end(0);
@@ -733,7 +734,7 @@ int GUIAction::overlay(std::string arg)
int GUIAction::queuezip(std::string arg __unused)
{
if (zip_queue_index >= 10) {
- gui_print("Maximum zip queue reached!\n");
+ gui_msg("max_queue=Maximum zip queue reached!");
return 0;
}
DataManager::GetValue("tw_filename", zip_queue[zip_queue_index]);
@@ -747,7 +748,7 @@ int GUIAction::queuezip(std::string arg __unused)
int GUIAction::cancelzip(std::string arg __unused)
{
if (zip_queue_index <= 0) {
- gui_print("Minimum zip queue reached!\n");
+ gui_msg("min_queue=Minimum zip queue reached!");
return 0;
} else {
zip_queue_index--;
@@ -925,7 +926,7 @@ int GUIAction::screenshot(std::string arg __unused)
chmod(path, 0666);
chown(path, uid, gid);
- gui_print("Screenshot was saved to %s\n", path);
+ gui_msg(Msg("screenshot_saved=Screenshot was saved to %s")(path));
// blink to notify that the screenshow was taken
gr_color(255, 255, 255, 255);
@@ -933,7 +934,7 @@ int GUIAction::screenshot(std::string arg __unused)
gr_flip();
gui_forceRender();
} else {
- LOGERR("Failed to take a screenshot!\n");
+ gui_err("screenshot_err=Failed to take a screenshot!");
}
return 0;
}
@@ -959,7 +960,7 @@ int GUIAction::fileexists(std::string arg)
void GUIAction::reinject_after_flash()
{
if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
- gui_print("Injecting TWRP into boot image...\n");
+ gui_msg("injecttwrp=Injecting TWRP into boot image...");
if (simulate) {
simulate_progress_bar();
} else {
@@ -970,7 +971,7 @@ void GUIAction::reinject_after_flash()
string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
TWFunc::Exec_Cmd(injectcmd);
}
- gui_print("TWRP injection complete.\n");
+ gui_msg("done=Done.");
}
}
}
@@ -993,7 +994,7 @@ int GUIAction::flash(std::string arg)
ret_val = flash_zip(zip_path, &wipe_cache);
TWFunc::SetPerformanceMode(false);
if (ret_val != 0) {
- gui_print("Error flashing zip '%s'\n", zip_path.c_str());
+ gui_msg(Msg(msg::kError, "zip_err=Error installing zip file '{1}'")(zip_path));
ret_val = 1;
break;
}
@@ -1001,7 +1002,7 @@ int GUIAction::flash(std::string arg)
zip_queue_index = 0;
if (wipe_cache) {
- gui_print("One or more zip requested a cache wipe\nWiping cache now.\n");
+ gui_msg("zip_wipe_cache=One or more zip requested a cache wipe -- Wiping cache now.");
PartitionManager.Wipe_By_Path("/cache");
}
@@ -1063,7 +1064,7 @@ int GUIAction::wipe(std::string arg)
LOGINFO("wipe_path '%s'\n", wipe_path.c_str());
if (wipe_path == "/and-sec") {
if (!PartitionManager.Wipe_Android_Secure()) {
- LOGERR("Unable to wipe android secure\n");
+ gui_msg("and_sec_wipe_err=Unable to wipe android secure");
ret_val = false;
break;
} else {
@@ -1071,7 +1072,7 @@ int GUIAction::wipe(std::string arg)
}
} else if (wipe_path == "DALVIK") {
if (!PartitionManager.Wipe_Dalvik_Cache()) {
- LOGERR("Failed to wipe dalvik\n");
+ gui_err("dalvik_wipe_err=Failed to wipe dalvik");
ret_val = false;
break;
} else {
@@ -1087,7 +1088,7 @@ int GUIAction::wipe(std::string arg)
}
if (!skip) {
if (!PartitionManager.Wipe_By_Path(wipe_path)) {
- LOGERR("Unable to wipe '%s'\n", wipe_path.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(wipe_path));
ret_val = false;
break;
} else if (wipe_path == DataManager::GetSettingsStoragePath()) {
@@ -1152,6 +1153,8 @@ int GUIAction::nandroid(std::string arg)
if (arg == "backup") {
string Backup_Name;
DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
+ string auto_gen = gui_lookup("auto_gen", "(Auto Generate)");
+ string curr_date = gui_lookup("curr_date", "(Current Date)");
if (Backup_Name == "(Auto Generate)" || Backup_Name == "(Current Date)" || Backup_Name == "0" || Backup_Name == "(" || PartitionManager.Check_Backup_Name(true) == 0) {
ret = PartitionManager.Run_Backup();
}
@@ -1159,7 +1162,7 @@ int GUIAction::nandroid(std::string arg)
operation_end(1);
return -1;
}
- DataManager::SetValue(TW_BACKUP_NAME, "(Auto Generate)");
+ DataManager::SetValue(TW_BACKUP_NAME, auto_gen);
} else if (arg == "restore") {
string Restore_Name;
DataManager::GetValue("tw_restore", Restore_Name);
@@ -1178,7 +1181,7 @@ int GUIAction::nandroid(std::string arg)
}
else {
DataManager::SetValue("tw_cancel_backup", 1);
- gui_print("Backup Canceled.\n");
+ gui_msg("backup_cancel=Backup Canceled.");
ret = 0;
}
operation_end(ret);
@@ -1242,7 +1245,7 @@ int GUIAction::partitionsd(std::string arg __unused)
int allow_partition;
DataManager::GetValue(TW_ALLOW_PARTITION_SDCARD, allow_partition);
if (allow_partition == 0) {
- gui_print("This device does not have a real SD Card!\nAborting!\n");
+ gui_err("no_real_sdcard=This device does not have a real SD Card! Aborting!");
} else {
if (!PartitionManager.Partition_SDCard())
ret_val = 1; // failed
@@ -1332,7 +1335,7 @@ int GUIAction::terminalcommand(std::string arg)
fp = popen(command.c_str(), "r");
if (fp == NULL) {
- LOGERR("Error opening command to run.\n");
+ LOGERR("Error opening command to run (%s).\n", strerror(errno));
} else {
int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1, bytes_read = 0;
struct timeval timeout;
@@ -1391,12 +1394,12 @@ int GUIAction::reinjecttwrp(std::string arg __unused)
{
int op_status = 0;
operation_start("ReinjectTWRP");
- gui_print("Injecting TWRP into boot image...\n");
+ gui_msg("injecttwrp=Injecting TWRP into boot image...");
if (simulate) {
simulate_progress_bar();
} else {
TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
- gui_print("TWRP injection complete.\n");
+ gui_msg("done=Done.");
}
operation_end(op_status);
@@ -1462,7 +1465,7 @@ int GUIAction::adbsideload(std::string arg __unused)
simulate_progress_bar();
operation_end(0);
} else {
- gui_print("Starting ADB sideload feature...\n");
+ gui_msg("start_sideload=Starting ADB sideload feature...");
bool mtp_was_enabled = TWFunc::Toggle_MTP(false);
// wait for the adb connection
@@ -1471,7 +1474,7 @@ int GUIAction::adbsideload(std::string arg __unused)
if (ret != 0) {
if (ret == -2)
- gui_print("You need adb 1.0.32 or newer to sideload to this device.\n");
+ gui_msg("need_new_adb=You need adb 1.0.32 or newer to sideload to this device.");
ret = 1; // failure
} else {
int wipe_cache = 0;
@@ -1509,7 +1512,7 @@ int GUIAction::adbsideloadcancel(std::string arg __unused)
{
struct stat st;
DataManager::SetValue("tw_has_cancel", 0); // Remove cancel button from gui
- gui_print("Cancelling ADB sideload...\n");
+ gui_msg("cancel_sideload=Cancelling ADB sideload...");
LOGINFO("Signaling child sideload process to exit.\n");
// Calling stat() on this magic filename signals the minadbd
// subprocess to shut down.
@@ -1543,7 +1546,7 @@ int GUIAction::openrecoveryscript(std::string arg __unused)
// Run those first.
int reboot = 0;
if (TWFunc::Path_Exists(SCRIPT_FILE_TMP)) {
- gui_print("Processing AOSP recovery commands...\n");
+ gui_msg("running_recovery_commands=Running Recovery Commands");
if (OpenRecoveryScript::run_script_file() == 0) {
reboot = 1;
op_status = 0;
@@ -1551,7 +1554,7 @@ int GUIAction::openrecoveryscript(std::string arg __unused)
}
// Check for the ORS file in /cache and attempt to run those commands.
if (OpenRecoveryScript::check_for_script_file()) {
- gui_print("Processing OpenRecoveryScript file...\n");
+ gui_msg("running_ors=Running OpenRecoveryScript");
if (OpenRecoveryScript::run_script_file() == 0) {
reboot = 1;
op_status = 0;
@@ -1640,7 +1643,6 @@ int GUIAction::repair(std::string arg __unused)
if (PartitionManager.Repair_By_Path(part_path, true)) {
op_status = 0; // success
} else {
- LOGERR("Error repairing file system.\n");
op_status = 1; // fail
}
}
@@ -1662,7 +1664,6 @@ int GUIAction::resize(std::string arg __unused)
if (PartitionManager.Resize_By_Path(part_path, true)) {
op_status = 0; // success
} else {
- LOGERR("Error resizing file system.\n");
op_status = 1; // fail
}
}
@@ -1685,7 +1686,7 @@ int GUIAction::changefilesystem(std::string arg __unused)
if (PartitionManager.Wipe_By_Path(part_path, file_system)) {
op_status = 0; // success
} else {
- LOGERR("Error changing file system.\n");
+ gui_err("change_fs_err=Error changing file system.");
op_status = 1; // fail
}
}
@@ -1826,3 +1827,16 @@ int GUIAction::mountsystemtoggle(std::string arg)
operation_end(op_status);
return 0;
}
+
+int GUIAction::setlanguage(std::string arg __unused)
+{
+ int op_status = 0;
+
+ operation_start("Set Language");
+ PageManager::LoadLanguage(DataManager::GetStrValue("tw_language"));
+ PageManager::RequestReload();
+ op_status = 0; // success
+
+ operation_end(op_status);
+ return 0;
+}
diff --git a/gui/console.cpp b/gui/console.cpp
index 6b38d6137..b5204fb7c 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright 2015 bigbiff/Dees_Troy TeamWin
+ This file is part of TWRP/TeamWin Recovery Project.
+
+ TWRP is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ TWRP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with TWRP. If not, see <http://www.gnu.org/licenses/>.
+*/
+
// console.cpp - GUIConsole object
#include <stdarg.h>
@@ -24,10 +42,16 @@ extern "C" {
#include "rapidxml.hpp"
#include "objects.hpp"
+#include "gui.hpp"
+#include "twmsg.h"
+
+#define GUI_CONSOLE_BUFFER_SIZE 512
+size_t last_message_count = 0;
+std::vector<Message> gMessages;
-static std::vector<std::string> gConsole;
-static std::vector<std::string> gConsoleColor;
+std::vector<std::string> gConsole;
+std::vector<std::string> gConsoleColor;
static FILE* ors_file;
extern "C" void __gui_print(const char *color, char *buf)
@@ -58,22 +82,22 @@ extern "C" void __gui_print(const char *color, char *buf)
gConsole.push_back(start);
gConsoleColor.push_back(color);
}
- if (ors_file) {
- fprintf(ors_file, "%s\n", buf);
- fflush(ors_file);
- }
}
extern "C" void gui_print(const char *fmt, ...)
{
- char buf[512]; // We're going to limit a single request to 512 bytes
+ char buf[GUI_CONSOLE_BUFFER_SIZE]; // We're going to limit a single request to 512 bytes
va_list ap;
va_start(ap, fmt);
- vsnprintf(buf, 512, fmt, ap);
+ vsnprintf(buf, GUI_CONSOLE_BUFFER_SIZE, fmt, ap);
va_end(ap);
fputs(buf, stdout);
+ if (ors_file) {
+ fprintf(ors_file, "%s", buf);
+ fflush(ors_file);
+ }
__gui_print("normal", buf);
return;
@@ -81,14 +105,18 @@ extern "C" void gui_print(const char *fmt, ...)
extern "C" void gui_print_color(const char *color, const char *fmt, ...)
{
- char buf[512]; // We're going to limit a single request to 512 bytes
+ char buf[GUI_CONSOLE_BUFFER_SIZE]; // We're going to limit a single request to 512 bytes
va_list ap;
va_start(ap, fmt);
- vsnprintf(buf, 512, fmt, ap);
+ vsnprintf(buf, GUI_CONSOLE_BUFFER_SIZE, fmt, ap);
va_end(ap);
fputs(buf, stdout);
+ if (ors_file) {
+ fprintf(ors_file, "%s", buf);
+ fflush(ors_file);
+ }
__gui_print(color, buf);
return;
@@ -99,6 +127,70 @@ extern "C" void gui_set_FILE(FILE* f)
ors_file = f;
}
+void gui_msg(const char* text)
+{
+ if (text) {
+ Message msg = Msg(text);
+ gui_msg(msg);
+ }
+}
+
+void gui_warn(const char* text)
+{
+ if (text) {
+ Message msg = Msg(msg::kWarning, text);
+ gui_msg(msg);
+ }
+}
+
+void gui_err(const char* text)
+{
+ if (text) {
+ Message msg = Msg(msg::kError, text);
+ gui_msg(msg);
+ }
+}
+
+void gui_highlight(const char* text)
+{
+ if (text) {
+ Message msg = Msg(msg::kHighlight, text);
+ gui_msg(msg);
+ }
+}
+
+void gui_msg(Message msg)
+{
+ std::string output = msg;
+ output += "\n";
+ fputs(output.c_str(), stdout);
+ if (ors_file) {
+ fprintf(ors_file, "%s", output.c_str());
+ fflush(ors_file);
+ }
+ gMessages.push_back(msg);
+}
+
+void GUIConsole::Translate_Now() {
+ size_t message_count = gMessages.size();
+ if (message_count <= last_message_count)
+ return;
+
+ for (size_t m = last_message_count; m < message_count; m++) {
+ std::string message = gMessages[m];
+ std::string color = "normal";
+ if (gMessages[m].GetKind() == msg::kError)
+ color = "error";
+ else if (gMessages[m].GetKind() == msg::kHighlight)
+ color = "highlight";
+ else if (gMessages[m].GetKind() == msg::kWarning)
+ color = "warning";
+ gConsole.push_back(message);
+ gConsoleColor.push_back(color);
+ }
+ last_message_count = message_count;
+}
+
GUIConsole::GUIConsole(xml_node<>* node) : GUIScrollList(node)
{
xml_node<>* child;
@@ -160,6 +252,7 @@ int GUIConsole::RenderSlideout(void)
int GUIConsole::RenderConsole(void)
{
+ Translate_Now();
AddLines(&gConsole, &gConsoleColor, &mLastCount, &rConsole, &rConsoleColor);
GUIScrollList::Render();
diff --git a/gui/devices/common/res/languages/en.xml b/gui/devices/common/res/languages/en.xml
new file mode 100644
index 000000000..c11176a71
--- /dev/null
+++ b/gui/devices/common/res/languages/en.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0"?>
+
+<language>
+ <display>English</display>
+
+ <resources>
+ <!-- Font overrides - only change these if your language requires special characters -->
+ <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" />
+
+ <!-- Partition display names -->
+ <string name="system">System</string>
+ <string name="system_image">System Image</string>
+ <string name="vendor">Vendor</string>
+ <string name="vendor_image">Vendor Image</string>
+ <string name="boot">Boot</string>
+ <string name="recovery">Recovery</string>
+ <string name="cache">Cache</string>
+ <string name="data">Data</string>
+ <string name="sdcard">SDCard</string>
+ <string name="internal">Internal Storage</string>
+ <string name="microsd">Micro SDCard</string>
+ <string name="usbotg">USB OTG</string>
+ <string name="android_secure">Android Secure</string>
+ <string name="dalvik">Dalvik / ART Cache</string>
+ <!-- This is a rarely used partition on a Micro SD card for a very old app2sd system -->
+ <string name="sdext">SD-EXT</string>
+
+ <!-- GUI XML strings -->
+ <string name="install_button_text">Install</string>
+
+ <!-- Various console messages - these consist of user displayed messages, oftentimes errors -->
+ <string name="no_kernel_selinux">Kernel does not have support for reading SELinux contexts.</string>
+ <string name="full_selinux">Full SELinux support is present.</string>
+ <string name="no_selinux">No SELinux support (no libselinux).</string>
+ <string name="mtp_enabled">MTP Enabled</string>
+ <string name="mtp_crash">MTP Crashed, not starting MTP on boot.</string>
+ <string name="rebooting">Rebooting...</string>
+ <string name="decrypt_success">Successfully decrypted with default password.</string>
+ <string name="unable_to_decrypt">Unable to decrypt with default password. You may need to perform a Format Data.</string>
+ <string name="generating_md51">Generating MD5</string>
+ <!-- Message displayed during a backup if we are generating an MD5, ideally, leave the leading " * " to help align and separate this text from other console text -->
+ <string name="generating_md52"> * Generating md5...</string>
+ <string name="md5_created"> * MD5 Created.</string>
+ <string name="md5_error"> * MD5 Error!</string>
+ <string name="md5_compute_error"> * Error computing MD5.</string>
+ <string name="md5_created"> * MD5 Created.</string>
+ <string name="current_date">(Current Date)</string>
+ <string name="auto_generate">(Auto Generate)</string>
+ <string name="unable_to_locate_partition">Unable to locate '{1}' partition for backup calculations.</string>
+ <string name="no_partition_selected">No partitions selected for backup.</string>
+ <string name="total_partitions_backup"> * Total number of partitions to back up: {1}</string>
+ <string name="total_backup_size"> * Total size of all data: {1}MB</string>
+ <string name="available_space"> * Available space: {1}MB</string>
+ <string name="unable_locate_storage">Unable to locate storage device.</string>
+ <string name="Not enough free space on storage.">Not enough free space on storage.</string>
+ <string name="backup_started">[BACKUP STARTED]</string>
+ <string name="backup_folder"> * Backup Folder: {1}</string>
+ <string name="fail_backup_folder">Failed to make backup folder.</string>
+ <string name="avg_backup_fs">Average backup rate for file systems: {1} MB/sec</string>
+ <string name="avg_backup_img">Average backup rate for imaged drives: {1} MB/sec</string>
+ <string name="total_backed_size">[{1} MB TOTAL BACKED UP]</string>
+ <string name="backup_completed">[BACKUP COMPLETED IN {1} SECONDS]</string>
+ <string name="restore_started">[RESTORE STARTED]</string>
+ <string name="restore_folder">Restore folder: '%s'</string>
+ <!-- {1} is the partition display name and {2} is the number of seconds -->
+ <string name="restort_part_done">[{1} done ({2} seconds)]</string>
+ <string name="verifying_md5">Verifying MD5</string>
+ <string name="skip_md5">Skipping MD5 check based on user setting.</string>
+ <string name="calc_restore">Calculating restore details...</string>
+ <string name="restore_read_only">Cannot restore %s -- mounted read only.</string>
+ <string name="restore_unable_locate">Unable to locate '{1}' partition for restoring.</string>
+ <string name="no_part_restore">No partitions selected for restore.</string>
+ <string name="restore_part_count">Restoring {1} partitions...</string>
+ <string name="total_restore_size">Total restore size is {1}MB</string>
+ <string name="updating_system_details">Updating System Details</string>
+ <string name="restore_complete">[RESTORE COMPLETED IN {1} SECONDS]</string>
+ <!-- {1} is the path we could not open, {2} is strerror output -->
+ <string name="error_opening_strerr">Error opening: '{1}' ({2})</string>
+ <string name="unable_locate_part_backup_name">Unable to locate partition by backup name: '{1}'</string>
+ <string name="unable_find_part_path">Unable to find partition for path '{1}'</string>
+ <string name="update_part_details">Updating partition details...</string>
+ <string name="update_part_details_done">...done</string>
+ <string name="wiping_dalvik">Wiping Dalvik Cache Directories...</string>
+ <string name="cleaned">Cleaned: {1}...</string>
+ <string name="dalvik_done">-- Dalvik Cache Directories Wipe Complete!</string>
+ <string name="no_andsec">No android secure partitions found.</string>
+ <string name="unable_to_locate">Unable to locate {1}.</string>
+ <string name="wiping_datamedia">Wiping internal storage -- /data/media...</string>
+ <string name="unable_to_mount">Unable to mount {1}</string>
+ <string name="unable_to_mount_internal">Unable to mount internal_storage</string>
+ <string name="unable_to_mount_storage">Unable to mount storage</string>
+ <string name="fail_decrypt">Failed to decrypt data.</string>
+ <string name="no_crypto_support">No crypto support was compiled into this build.</string>
+ <string name="decrypt_success">Data successfully decrypted, new block device: '{1}'</string>
+ <string name="done">Done.</string>
+ <string name="start_partition_sd">Partitioning SD Card...</string>
+ <string name="partition_sd_locate">Unable to locate device to partition.</string>
+ <string name="ext_swap_size">EXT + Swap size is larger than sdcard size.</string>
+ <string name="remove_part_table">Removing partition table...</string>
+ <string name="unable_rm_part">Unable to remove partition table.</string>
+ <string name="create_part">Creating {1} partition...</string>
+ <string name="unable_to_create_part">Unable to create {1} partition.</string>
+ <string name="format_sdext_as">Formatting sd-ext as {1}...</string>
+ <string name="part_complete">Partitioning complete.</string>
+ <string name="unable_to_open">Unable to open '{1}'.</string>
+ <string name="mtp_already_enabled">MTP already enabled</string>
+ <string name="mtp_fail">Failed to enable MTP</string>
+ <string name="no_mtp">MTP support not included</string>
+ <string name="image_flash_start">[IMAGE FLASH STARTED]</string>
+ <string name="img_to_flash">Image to flash: '{1}'</string>
+ <string name="flash_unable_locate">Unable to locate '{1}' partition for flashing.</string>
+ <string name="no_part_flash">No partitions selected for flashing.</string>
+ <string name="too_many_flash">Too many partitions selected for flashing.</string>
+ <string name="invalid_flash">Invalid flash partition specified.</string>
+ <string name="flash_done">IMAGE FLASH COMPLETED]</string>
+ <string name="wiping">Wiping {1}</string>
+ <string name="repair_not_exist">{1} does not exist! Cannot repair!</string>
+ <string name="unable_repair">Unable to repair {1}.</string>
+ <string name="mount_data_footer">Could not mount /data and unable to find crypto footer.</string>
+ <!-- {1} is the folder name that we could not create, {2} is strerror output -->
+ <string name="create_folder_strerr">Can not create '{1}' folder ({2}).</string>
+ <!-- {1} is the folder name that we could not mount, {2} is strerror output -->
+ <string name="fail_mount">Failed to mount '{1}' ({2})</string>
+ <!-- {1} is the folder name that we could not unmount, {2} is strerror output -->
+ <string name="fail_mount">Failed to unmount '{1}' ({2})</string>
+ <string name="cannot_resize">Cannot resize {1}.</string>
+ <string name="repair_resize">Repairing {1} before resizing.</string>
+ <string name="unable_resize">Unable to resize {1}.</string>
+ <string name="no_md5_found">No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.</string>
+ <string name="md5_fail_match">MD5 failed to match on '{1}'.</string>
+ <string name="restoring">Restoring</string>
+ <string name="format_data_msg">You may need to reboot recovery to be able to use /data again.</string>
+ <string name="format_data_err">Unable to format to remove encryption.</string>
+ <string name="formating_using">Formatting {1} using {2}...</string>
+ <string name="unable_to_wipe">Unable to wipe {1}.</string>
+ <string name="remove_all">Removing all files under '{1}'</string>
+ <string name="wiping_data">Wiping data without wiping /data/media ...</string>
+ <string name="backing_up">Backing up {1}...</string>
+ <string name="backing">Backing Up</string>
+ <string name="backup_size">Backup file size for '%s' is 0 bytes.</string>
+ <string name="datamedia_fs_restore">WARNING: This /data backup was made with {1} file system! The backup may not boot unless you change back to {1}.</string>
+ <string name="restoring">Restoring {1}...</string>
+ <string name="restore">Restoring</string>
+ <string name="recreate_folder_err">Unable to recreate {1} folder.</string>
+ <string name="img_size_err">Size of image is larger than target device</string>
+ <string name="flashing">Flashing {1}...</string>
+ <string name="backup_folder">Backup folder set to '{1}'</string>
+ <string name="locate_backup_err">Unable to locate backup '{1}'</string>
+ <string name="set_restore_opt">Setting restore options: '{1}':</string>
+ <string name="md5_check_skip">MD5 check skip is on</string>
+ <string name="ors_encrypt_restore_err">Unable to use OpenRecoveryScript to restore an encrypted backup.</string>
+ <string name="mounting">Mounting</string>
+ <string name="unmounting">Unmounting</string>
+ <string name="mounted">Mounted '{1}'</string>
+ <string name="unmounted">Unmounted '{1}'</string>
+ <string name="setting">Setting '{1}' to '{2}'</string>
+ <string name="setting_empty">Setting '{1}' to empty</string>
+ <string name="making_dir1">Making Directory</string>
+ <string name="making_dir2">Making directory: '{1}'</string>
+ <string name="running_command">Running Command</string>
+ <string name="sideload">ADB Sideload</string>
+ <string name="start_sideload">Starting ADB sideload feature...</string>
+ <string name="need_new_adb">You need adb 1.0.32 or newer to sideload to this device.</string>
+ <string name="no_pwd">No password provided.</string>
+ <string name="done_ors">Done processing script file</string>
+ <string name="injecttwrp">Injecting TWRP into boot image...</string>
+ <string name="zip_err">Error installing zip file '{1}'</string>
+ <string name="installing_zip">Installing zip file '{1}'</string>
+ <string name="select_backup_opt">Setting backup options:</string>
+ <string name="compression_on">Compression is on</string>
+ <string name="md5_off">MD5 Generation is off</string>
+ <string name="backup_fail">Backup Failed</string>
+ <string name="backup_complete">Backup complete!</string>
+ <string name="running_recovery_commands">Running Recovery Commands</string>
+ <string name="recovery_commands_complete">Recovery Commands Complete</string>
+ <string name="running_ors">Running OpenRecoveryScript</string>
+ <string name="ors_complete">OpenRecoveryScript Complete</string>
+ <string name="no_updater_binary">Could not find '{1}' in the zip file.</string>
+ <string name="check_for_md5">Checking for MD5 file...</string>
+ <string name="fail_sysmap">Failed to map file '{1}'</string>
+ <string name="verify_zip_sig">Verifying zip signature...</string>
+ <string name="verify_zip_fail">Zip signature verification failed!</string>
+ <string name="verify_zip_done">Zip signature verified successfully.</string>
+ <string name="zip_corrupt">Zip file is corrupt!</string>
+ <string name="no_md5">Skipping MD5 check: no MD5 file found</string>
+ <string name="md5_fail">MD5 does not match</string>
+ <string name="md5_match">MD5 matched</string>
+ <string name="pid_signal">{1} process ended with signal: {2}</string>
+ <string name="pid_error">{1} process ended with ERROR: {2}</string>
+ <string name="install_dumlock">Installing HTC Dumlock to system...</string>
+ <string name="dumlock_restore">Restoring original boot...</string>
+ <string name="dumlock_reflash">Reflashing recovery to boot...</string>
+ <string name="run_script">Running {1} script...</string>
+ <string name="rename_stock">Renamed stock recovery file in /system to prevent the stock ROM from replacing TWRP.</string>
+ <string name="split_backup">Breaking backup file into multiple archives...</string>
+ <string name="backup_error">Error creating backup.</string>
+ <string name="restore_error">Error during restore process.</string>
+ <string name="split_thread">Splitting thread ID {1} into archive {2}</string>
+ <string name="file_progress">%llu of %llu files, %i%%</string>
+ <string name="size_progress">%lluMB of %lluMB, %i%%</string>
+ <string name="decrypt_cmd">Attempting to decrypt data partition via command line.</string>
+ <string name="base_pkg_err">Failed to load base packages.</string>
+ <string name="simulating">Simulating actions...</string>
+ <string name="backup_cancel">Backup Canceled.</string>
+ <string name="config_twrp">Configuring TWRP...</string>
+ <string name="config_twrp_err">Unable to configure TWRP with this kernel.</string>
+ <string name="copy_log">Copied recovery log to {1}.</string>
+ <string name="max_queue">Maximum zip queue reached!</string>
+ <string name="min_queue">Minimum zip queue reached!</string>
+ <string name="screenshot_err">Failed to take a screenshot!</string>
+ <string name="zip_wipe_cache">One or more zip requested a cache wipe -- Wiping cache now.</string>
+ <string name="and_sec_wipe_err">Unable to wipe android secure</string>
+ <string name="dalvik_wipe_err">Failed to wipe dalvik</string>
+ <string name="auto_gen">(Auto Generate)</string>
+ <string name="curr_date">(Current Date)</string>
+ <string name="backup_name_len">Backup name is too long.</string>
+ <string name="backup_name_invalid">Backup name '{1}' contains invalid character: '{1}'</string>
+ <string name="backup_name_exists">A backup with this name already exists.</string>
+ <string name="no_real_sdcard">This device does not have a real SD Card! Aborting!</string>
+ <string name="cancel_sideload">Cancelling ADB sideload...</string>
+ <string name="change_fs_err">Error changing file system.</string>
+ </resources>
+</language>
diff --git a/gui/devices/common/res/languages/es.xml b/gui/devices/common/res/languages/es.xml
new file mode 100644
index 000000000..ad5c54a7b
--- /dev/null
+++ b/gui/devices/common/res/languages/es.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<language>
+ <display>Español</display>
+
+ <resources>
+ <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" />
+ <string name="install_button_text">Instalar</string>
+ </resources>
+</language>
diff --git a/gui/devices/common/res/languages/fi.xml b/gui/devices/common/res/languages/fi.xml
new file mode 100644
index 000000000..0c4f5bc87
--- /dev/null
+++ b/gui/devices/common/res/languages/fi.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<language>
+ <display>Suomi</display>
+
+ <resources>
+ <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" />
+ <string name="install_button_text">Asenna</string>
+ </resources>
+</language>
diff --git a/gui/gui.cpp b/gui/gui.cpp
index 31b61be6d..78e8a7e0c 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -517,13 +517,19 @@ static void ors_command_read()
fprintf(orsout, "%s", result);
LOGINFO("Command cannot be performed, operation in progress.\n");
} else {
- if (gui_console_only() == 0) {
+ if (strlen(command) == 11 && strncmp(command, "dumpstrings", 11) == 0) {
+ // This cannot be done safely with gui_console_only because gui_console_only updates mCurrentSet
+ // which makes the resources that we are trying to read unreachable.
+ gui_set_FILE(orsout);
+ PageManager::GetResources()->DumpStrings();
+ gui_set_FILE(NULL);
+ } else if (gui_console_only() == 0) {
LOGINFO("Console started successfully\n");
gui_set_FILE(orsout);
if (strlen(command) > 11 && strncmp(command, "runscript", 9) == 0) {
char* filename = command + 11;
if (OpenRecoveryScript::copy_script_file(filename) == 0) {
- LOGERR("Unable to copy script file\n");
+ LOGINFO("Unable to copy script file\n");
} else {
OpenRecoveryScript::run_script_file();
}
@@ -534,7 +540,7 @@ static void ors_command_read()
gui_print("%s = %s\n", varname, temp.c_str());
} else if (strlen(command) > 9 && strncmp(command, "decrypt", 7) == 0) {
char* pass = command + 8;
- gui_print("Attempting to decrypt data partition via command line.\n");
+ gui_msg("decrypt_cmd=Attempting to decrypt data partition via command line.");
if (PartitionManager.Decrypt_Device(pass) == 0) {
set_page_done = 1;
}
@@ -753,15 +759,39 @@ std::string gui_parse_text(std::string str)
{
// This function parses text for DataManager values encompassed by %value% in the XML
// and string resources (%@resource_name%)
- size_t pos = 0;
+ size_t pos = 0, next, end;
while (1)
{
- size_t next = str.find('%', pos);
+ next = str.find("{@", pos);
+ if (next == std::string::npos)
+ break;
+
+ end = str.find('}', next + 1);
+ if (end == std::string::npos)
+ break;
+
+ std::string var = str.substr(next + 2, (end - next) - 2);
+ str.erase(next, (end - next) + 1);
+
+ size_t default_loc = var.find('=', 0);
+ std::string lookup;
+ if (default_loc == std::string::npos) {
+ str.insert(next, PageManager::GetResources()->FindString(var));
+ } else {
+ lookup = var.substr(0, default_loc);
+ std::string default_string = var.substr(default_loc + 1, var.size() - default_loc - 1);
+ str.insert(next, PageManager::GetResources()->FindString(lookup, default_string));
+ }
+ }
+ pos = 0;
+ while (1)
+ {
+ next = str.find('%', pos);
if (next == std::string::npos)
return str;
- size_t end = str.find('%', next + 1);
+ end = str.find('%', next + 1);
if (end == std::string::npos)
return str;
@@ -787,6 +817,10 @@ std::string gui_parse_text(std::string str)
}
}
+std::string gui_lookup(const std::string& resource_name, const std::string& default_value) {
+ return PageManager::GetResources()->FindString(resource_name, default_value);
+}
+
extern "C" int gui_init(void)
{
gr_init();
@@ -828,7 +862,7 @@ extern "C" int gui_loadResources(void)
{
if (PageManager::LoadPackage("TWRP", TWRES "ui.xml", "decrypt"))
{
- LOGERR("Failed to load base packages.\n");
+ gui_err("base_pkg_err=Failed to load base packages.");
goto error;
}
else
@@ -849,10 +883,9 @@ extern "C" int gui_loadResources(void)
retry_count--;
}
- if (!PartitionManager.Mount_Settings_Storage(false))
+ if (!PartitionManager.Mount_Settings_Storage(true))
{
- LOGERR("Unable to mount %s during GUI startup.\n",
- theme_path.c_str());
+ LOGINFO("Unable to mount %s during GUI startup.\n", theme_path.c_str());
check = 1;
}
}
@@ -863,7 +896,7 @@ extern "C" int gui_loadResources(void)
#endif // ifndef TW_OEM_BUILD
if (PageManager::LoadPackage("TWRP", TWRES "ui.xml", "main"))
{
- LOGERR("Failed to load base packages.\n");
+ gui_err("base_pkg_err=Failed to load base packages.");
goto error;
}
#ifndef TW_OEM_BUILD
@@ -886,7 +919,7 @@ extern "C" int gui_loadCustomResources(void)
{
#ifndef TW_OEM_BUILD
if (!PartitionManager.Mount_Settings_Storage(false)) {
- LOGERR("Unable to mount settings storage during GUI startup.\n");
+ LOGINFO("Unable to mount settings storage during GUI startup.\n");
return -1;
}
@@ -898,7 +931,7 @@ extern "C" int gui_loadCustomResources(void)
if (PageManager::ReloadPackage("TWRP", theme_path)) {
// Custom theme failed to load, try to load stock theme
if (PageManager::ReloadPackage("TWRP", TWRES "ui.xml")) {
- LOGERR("Failed to load base packages.\n");
+ gui_err("base_pkg_err=Failed to load base packages.");
goto error;
}
}
diff --git a/gui/gui.hpp b/gui/gui.hpp
new file mode 100644
index 000000000..afcd9b0a9
--- /dev/null
+++ b/gui/gui.hpp
@@ -0,0 +1,33 @@
+/*
+ Copyright 2015 bigbiff/Dees_Troy TeamWin
+ This file is part of TWRP/TeamWin Recovery Project.
+
+ TWRP is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ TWRP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with TWRP. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _GUI_HPP_HEADER
+#define _GUI_HPP_HEADER
+
+#include "twmsg.h"
+
+void gui_msg(const char* text);
+void gui_warn(const char* text);
+void gui_err(const char* text);
+void gui_highlight(const char* text);
+void gui_msg(Message msg);
+
+std::string gui_parse_text(std::string inText);
+std::string gui_lookup(const std::string& resource_name, const std::string& default_value);
+
+#endif //_GUI_HPP_HEADER
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index d2973bb6e..eeddff954 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -26,6 +26,9 @@ extern "C" {
#include "rapidxml.hpp"
#include "objects.hpp"
#include "../data.hpp"
+#include "pages.hpp"
+
+extern std::vector<language_struct> Language_List;
GUIListBox::GUIListBox(xml_node<>* node) : GUIScrollList(node)
{
@@ -56,6 +59,21 @@ GUIListBox::GUIListBox(xml_node<>* node) : GUIScrollList(node)
DataManager::SetValue(mVariable, attr->value());
// Get the currently selected value for the list
DataManager::GetValue(mVariable, currentValue);
+ if (mVariable == "tw_language") {
+ std::vector<language_struct>::iterator iter;
+ for (iter = Language_List.begin(); iter != Language_List.end(); iter++) {
+ ListItem data;
+ data.displayName = (*iter).displayvalue;
+ data.variableValue = (*iter).filename;
+ data.action = NULL;
+ if (currentValue == (*iter).filename) {
+ data.selected = 1;
+ DataManager::SetValue("tw_language_display", (*iter).displayvalue);
+ } else
+ data.selected = 0;
+ mListItems.push_back(data);
+ }
+ }
}
else
allowSelection = false; // allows using listbox as a read-only list or menu
diff --git a/gui/objects.hpp b/gui/objects.hpp
index 3d217c45f..438905b96 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -43,6 +43,15 @@ using namespace rapidxml;
#define TW_Y_OFFSET 0
#endif
+struct translate_later_struct {
+ std::string resource_name; // Name of the string resource for looking up
+ std::string default_value; // Default in case we don't find the string resource
+ std::string color; // Color for the console... normal, highlight, warning, error
+ std::string format; // Formatted extra variables like %i, %s
+ std::string text; // Final, translated, formatted text
+ bool inline_format; // Indicates if the final text includes an inlined format variable
+};
+
class RenderObject
{
public:
@@ -356,6 +365,7 @@ protected:
int cancelbackup(std::string arg);
int checkpartitionlifetimewrites(std::string arg);
int mountsystemtoggle(std::string arg);
+ int setlanguage(std::string arg);
int simulate;
};
@@ -734,6 +744,7 @@ public:
virtual size_t GetItemCount();
virtual void RenderItem(size_t itemindex, int yPos, bool selected);
virtual void NotifySelect(size_t item_selected);
+ static void Translate_Now();
protected:
enum SlideoutState
{
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 0511b1ab5..13f3bd7b5 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -33,6 +33,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "../twrp-functions.hpp"
+#include "../partitions.hpp"
#include <string>
@@ -50,6 +51,14 @@ extern "C" {
extern int gGuiRunning;
+// From ../twrp.cpp
+extern bool datamedia;
+
+// From console.cpp
+extern size_t last_message_count;
+extern std::vector<std::string> gConsole;
+extern std::vector<std::string> gConsoleColor;
+
std::map<std::string, PageSet*> PageManager::mPageSets;
PageSet* PageManager::mCurrentSet;
PageSet* PageManager::mBaseSet = NULL;
@@ -57,6 +66,7 @@ MouseCursor *PageManager::mMouseCursor = NULL;
HardwareKeyboard *PageManager::mHardwareKeyboard = NULL;
bool PageManager::mReloadTheme = false;
std::string PageManager::mStartPage = "main";
+std::vector<language_struct> Language_List;
int tw_x_offset = 0;
int tw_y_offset = 0;
@@ -670,7 +680,48 @@ PageSet::~PageSet()
delete mResources;
}
-int PageSet::Load(ZipArchive* package, char* xmlFile)
+int PageSet::LoadLanguage(char* languageFile, ZipArchive* package)
+{
+ xml_document<> lang;
+ xml_node<>* parent;
+ xml_node<>* child;
+ std::string resource_source;
+
+ if (languageFile) {
+ printf("parsing languageFile\n");
+ lang.parse<0>(languageFile);
+ printf("parsing languageFile done\n");
+ } else {
+ return -1;
+ }
+
+ parent = lang.first_node("language");
+ if (!parent) {
+ LOGERR("Unable to locate language node in language file.\n");
+ lang.clear();
+ return -1;
+ }
+
+ child = parent->first_node("display");
+ if (child) {
+ DataManager::SetValue("tw_language_display", child->value());
+ resource_source = child->value();
+ } else {
+ LOGERR("language file does not have a display value set\n");
+ DataManager::SetValue("tw_language_display", "Not Set");
+ resource_source = languageFile;
+ }
+
+ child = parent->first_node("resources");
+ if (child)
+ mResources->LoadResources(child, package, resource_source);
+ else
+ return -1;
+ lang.clear();
+ return 0;
+}
+
+int PageSet::Load(ZipArchive* package, char* xmlFile, char* languageFile)
{
xml_document<> mDoc;
xml_node<>* parent;
@@ -735,10 +786,14 @@ int PageSet::Load(ZipArchive* package, char* xmlFile)
} else {
LOGINFO("XML contains no details tag, no scaling will be applied.\n");
}
+
+ if (languageFile)
+ LoadLanguage(languageFile, package);
+
LOGINFO("Loading resources...\n");
child = parent->first_node("resources");
if (child)
- mResources->LoadResources(child, package);
+ mResources->LoadResources(child, package, "theme");
LOGINFO("Loading variables...\n");
child = parent->first_node("variables");
@@ -831,7 +886,7 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc)
LOGINFO("Loading included resources...\n");
child = parent->first_node("resources");
if (child)
- mResources->LoadResources(child, package);
+ mResources->LoadResources(child, package, "theme");
LOGINFO("Loading included variables...\n");
child = parent->first_node("variables");
@@ -1121,6 +1176,11 @@ int PageSet::NotifyVarChange(std::string varName, std::string value)
return (mCurrentPage ? mCurrentPage->NotifyVarChange(varName, value) : -1);
}
+void PageSet::AddStringResource(std::string resource_source, std::string resource_name, std::string value)
+{
+ mResources->AddStringResource(resource_source, resource_name, value);
+}
+
char* PageManager::LoadFileToBuffer(std::string filename, ZipArchive* package) {
size_t len;
char* buffer = NULL;
@@ -1181,12 +1241,96 @@ char* PageManager::LoadFileToBuffer(std::string filename, ZipArchive* package) {
return buffer;
}
+void PageManager::LoadLanguageListDir(string dir) {
+ if (!TWFunc::Path_Exists(dir)) {
+ LOGERR("LoadLanguageListDir '%s' path not found\n", dir.c_str());
+ return;
+ }
+
+ DIR *d = opendir(dir.c_str());
+ struct dirent *p;
+
+ if (d == NULL) {
+ LOGERR("LoadLanguageListDir error opening dir: '%s', %s\n", dir.c_str(), strerror(errno));
+ return;
+ }
+
+ while ((p = readdir(d))) {
+ if (!strcmp(p->d_name, ".") || !strcmp(p->d_name, "..") || strlen(p->d_name) < 5)
+ continue;
+
+ string file = p->d_name;
+ if (file.substr(strlen(p->d_name) - 4) != ".xml")
+ continue;
+ string path = dir + p->d_name;
+ string file_no_extn = file.substr(0, strlen(p->d_name) - 4);
+ struct language_struct language_entry;
+ language_entry.filename = file_no_extn;
+ char* xmlFile = PageManager::LoadFileToBuffer(dir + p->d_name, NULL);
+ if (xmlFile == NULL) {
+ LOGERR("LoadLanguageListDir unable to load '%s'\n", language_entry.filename.c_str());
+ continue;
+ }
+ xml_document<> *doc = new xml_document<>();
+ doc->parse<0>(xmlFile);
+
+ xml_node<>* parent = doc->first_node("language");
+ if (!parent) {
+ LOGERR("Invalid language XML file '%s'\n", language_entry.filename.c_str());
+ } else {
+ xml_node<>* child = parent->first_node("display");
+ if (child) {
+ language_entry.displayvalue = child->value();
+ } else {
+ LOGERR("No display value for '%s'\n", language_entry.filename.c_str());
+ language_entry.displayvalue = language_entry.filename;
+ }
+ Language_List.push_back(language_entry);
+ }
+ doc->clear();
+ delete doc;
+ free(xmlFile);
+ }
+ closedir(d);
+}
+
+void PageManager::LoadLanguageList(ZipArchive* package) {
+ Language_List.clear();
+ if (TWFunc::Path_Exists(TWRES "customlanguages"))
+ TWFunc::removeDir(TWRES "customlanguages", true);
+ if (package) {
+ TWFunc::Recursive_Mkdir(TWRES "customlanguages");
+ struct utimbuf timestamp = { 1217592000, 1217592000 }; // 8/1/2008 default
+ mzExtractRecursive(package, "languages", TWRES "customlanguages/", &timestamp, NULL, NULL, NULL);
+ LoadLanguageListDir(TWRES "customlanguages/");
+ } else {
+ LoadLanguageListDir(TWRES "languages/");
+ }
+}
+
+void PageManager::LoadLanguage(string filename) {
+ string actual_filename;
+ if (TWFunc::Path_Exists(TWRES "customlanguages/" + filename + ".xml"))
+ actual_filename = TWRES "customlanguages/" + filename + ".xml";
+ else
+ actual_filename = TWRES "languages/" + filename + ".xml";
+ char* xmlFile = PageManager::LoadFileToBuffer(actual_filename, NULL);
+ if (xmlFile == NULL)
+ LOGERR("Unable to load '%s'\n", actual_filename.c_str());
+ else {
+ mCurrentSet->LoadLanguage(xmlFile, NULL);
+ free(xmlFile);
+ }
+ PartitionManager.Translate_Partition_Display_Names();
+}
+
int PageManager::LoadPackage(std::string name, std::string package, std::string startpage)
{
int fd;
ZipArchive zip, *pZip = NULL;
long len;
char* xmlFile = NULL;
+ char* languageFile = NULL;
PageSet* pageSet = NULL;
int ret;
MemMapping map;
@@ -1201,6 +1345,8 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
LOGINFO("Load XML directly\n");
tw_x_offset = TW_X_OFFSET;
tw_y_offset = TW_Y_OFFSET;
+ LoadLanguageList(NULL);
+ languageFile = LoadFileToBuffer(TWRES "languages/en.xml", NULL);
}
else
{
@@ -1220,6 +1366,8 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
}
pZip = &zip;
package = "ui.xml";
+ LoadLanguageList(pZip);
+ languageFile = LoadFileToBuffer("languages/en.xml", pZip);
}
xmlFile = LoadFileToBuffer(package, pZip);
@@ -1230,8 +1378,11 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
// Before loading, mCurrentSet must be the loading package so we can find resources
pageSet = mCurrentSet;
mCurrentSet = new PageSet(xmlFile);
-
- ret = mCurrentSet->Load(pZip, xmlFile);
+ ret = mCurrentSet->Load(pZip, xmlFile, languageFile);
+ if (languageFile) {
+ free(languageFile);
+ languageFile = NULL;
+ }
if (ret == 0)
{
mCurrentSet->SetPage(startpage);
@@ -1253,6 +1404,8 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
sysReleaseMap(&map);
}
free(xmlFile);
+ if (languageFile)
+ free(languageFile);
return ret;
error:
@@ -1313,7 +1466,7 @@ int PageManager::ReloadPackage(std::string name, std::string package)
if (LoadPackage(name, package, mStartPage) != 0)
{
- LOGERR("Failed to load package '%s'.\n", package.c_str());
+ LOGINFO("Failed to load package '%s'.\n", package.c_str());
mPageSets.insert(std::pair<std::string, PageSet*>(name, set));
return -1;
}
@@ -1322,6 +1475,7 @@ int PageManager::ReloadPackage(std::string name, std::string package)
if (mBaseSet == set)
mBaseSet = mCurrentSet;
delete set;
+ GUIConsole::Translate_Now();
return 0;
}
@@ -1364,6 +1518,18 @@ int PageManager::RunReload() {
ret_val = 1;
}
}
+ if (ret_val == 0) {
+ if (DataManager::GetStrValue("tw_language") != "en.xml") {
+ LOGINFO("Loading language '%s'\n", DataManager::GetStrValue("tw_language").c_str());
+ LoadLanguage(DataManager::GetStrValue("tw_language"));
+ }
+ }
+
+ // This makes the console re-translate
+ last_message_count = 0;
+ gConsole.clear();
+ gConsoleColor.clear();
+
return ret_val;
}
@@ -1511,6 +1677,12 @@ int PageManager::NotifyVarChange(std::string varName, std::string value)
return (mCurrentSet ? mCurrentSet->NotifyVarChange(varName, value) : -1);
}
+void PageManager::AddStringResource(std::string resource_source, std::string resource_name, std::string value)
+{
+ if (mCurrentSet)
+ mCurrentSet->AddStringResource(resource_source, resource_name, value);
+}
+
extern "C" void gui_notifyVarChange(const char *name, const char* value)
{
if (!gGuiRunning)
diff --git a/gui/pages.hpp b/gui/pages.hpp
index 018c2cab2..5dcc9e0b5 100644
--- a/gui/pages.hpp
+++ b/gui/pages.hpp
@@ -6,7 +6,9 @@
#include "../minzip/Zip.h"
#include <vector>
#include <map>
+#include <string>
#include "rapidxml.hpp"
+#include "gui.hpp"
using namespace rapidxml;
enum TOUCH_STATE {
@@ -27,12 +29,18 @@ struct COLOR {
: red(r), green(g), blue(b), alpha(a) {}
};
+struct language_struct {
+ std::string filename;
+ std::string displayvalue;
+};
+
+extern std::vector<language_struct> Language_List;
+
// Utility Functions
int ConvertStrToColor(std::string str, COLOR* color);
int gui_forceRender(void);
int gui_changePage(std::string newPage);
int gui_changeOverlay(std::string newPage);
-std::string gui_parse_text(string inText);
class Resource;
class ResourceManager;
@@ -82,7 +90,8 @@ public:
virtual ~PageSet();
public:
- int Load(ZipArchive* package, char* xmlFile);
+ int LoadLanguage(char* languageFile, ZipArchive* package);
+ int Load(ZipArchive* package, char* xmlFile, char* languageFile);
int CheckInclude(ZipArchive* package, xml_document<> *parentDoc);
Page* FindPage(std::string name);
@@ -103,6 +112,7 @@ public:
int NotifyVarChange(std::string varName, std::string value);
std::vector<xml_node<>*> styles;
+ void AddStringResource(std::string resource_source, std::string resource_name, std::string value);
protected:
int LoadPages(xml_node<>* pages);
@@ -121,6 +131,8 @@ class PageManager
public:
// Used by GUI
static char* LoadFileToBuffer(std::string filename, ZipArchive* package);
+ static void LoadLanguageList(ZipArchive* package);
+ static void LoadLanguage(std::string filename);
static int LoadPackage(std::string name, std::string package, std::string startpage);
static PageSet* SelectPackage(std::string name);
static int ReloadPackage(std::string name, std::string package);
@@ -155,9 +167,14 @@ public:
static HardwareKeyboard *GetHardwareKeyboard();
static xml_node<>* FindStyle(std::string name);
+ static void AddStringResource(std::string resource_source, std::string resource_name, std::string value);
protected:
static PageSet* FindPackage(std::string name);
+ static void LoadLanguageListDir(std::string dir);
+ static void Translate_Partition(const char* path, const char* resource_name, const char* default_value);
+ static void Translate_Partition(const char* path, const char* resource_name, const char* default_value, const char* storage_resource_name, const char* storage_default_value);
+ static void Translate_Partition_Display_Names();
protected:
static std::map<std::string, PageSet*> mPageSets;
diff --git a/gui/resources.cpp b/gui/resources.cpp
index 253d438f4..a8f41991b 100644
--- a/gui/resources.cpp
+++ b/gui/resources.cpp
@@ -100,6 +100,13 @@ void Resource::CheckAndScaleImage(gr_surface source, gr_surface* destination, in
FontResource::FontResource(xml_node<>* node, ZipArchive* pZip)
: Resource(node, pZip)
{
+ origFontSize = 0;
+ origFont = NULL;
+ LoadFont(node, pZip);
+}
+
+void FontResource::LoadFont(xml_node<>* node, ZipArchive* pZip)
+{
std::string file;
xml_attribute<>* attr;
@@ -116,12 +123,21 @@ FontResource::FontResource(xml_node<>* node, ZipArchive* pZip)
if(file.size() >= 4 && file.compare(file.size()-4, 4, ".ttf") == 0)
{
m_type = TYPE_TTF;
+ int font_size = 0;
+
+ if (origFontSize != 0) {
+ attr = node->first_attribute("scale");
+ if (attr == NULL)
+ return;
+ font_size = origFontSize * atoi(attr->value()) / 100;
+ } else {
+ attr = node->first_attribute("size");
+ if (attr == NULL)
+ return;
+ font_size = scale_theme_min(atoi(attr->value()));
+ origFontSize = font_size;
+ }
- attr = node->first_attribute("size");
- if(!attr)
- return;
-
- int size = scale_theme_min(atoi(attr->value()));
int dpi = 300;
attr = node->first_attribute("dpi");
@@ -130,13 +146,13 @@ FontResource::FontResource(xml_node<>* node, ZipArchive* pZip)
if (ExtractResource(pZip, "fonts", file, "", TMP_RESOURCE_NAME) == 0)
{
- mFont = gr_ttf_loadFont(TMP_RESOURCE_NAME, size, dpi);
+ mFont = gr_ttf_loadFont(TMP_RESOURCE_NAME, font_size, dpi);
unlink(TMP_RESOURCE_NAME);
}
else
{
file = std::string(TWRES "fonts/") + file;
- mFont = gr_ttf_loadFont(file.c_str(), size, dpi);
+ mFont = gr_ttf_loadFont(file.c_str(), font_size, dpi);
}
}
else
@@ -145,13 +161,28 @@ FontResource::FontResource(xml_node<>* node, ZipArchive* pZip)
}
}
-FontResource::~FontResource()
-{
+void FontResource::DeleteFont() {
if(mFont)
- {
- if(m_type == TYPE_TTF)
- gr_ttf_freeFont(mFont);
+ gr_ttf_freeFont(mFont);
+ mFont = NULL;
+ if(origFont)
+ gr_ttf_freeFont(origFont);
+ origFont = NULL;
+}
+
+void FontResource::Override(xml_node<>* node, ZipArchive* pZip) {
+ if (!origFont) {
+ origFont = mFont;
+ } else if (mFont) {
+ gr_ttf_freeFont(mFont);
+ mFont = NULL;
}
+ LoadFont(node, pZip);
+}
+
+FontResource::~FontResource()
+{
+ DeleteFont();
}
ImageResource::ImageResource(xml_node<>* node, ZipArchive* pZip)
@@ -255,17 +286,58 @@ AnimationResource* ResourceManager::FindAnimation(const std::string& name) const
std::string ResourceManager::FindString(const std::string& name) const
{
- std::map<std::string, std::string>::const_iterator it = mStrings.find(name);
- if (it != mStrings.end())
- return it->second;
+ if (this != NULL) {
+ std::map<std::string, string_resource_struct>::const_iterator it = mStrings.find(name);
+ if (it != mStrings.end())
+ return it->second.value;
+ LOGERR("String resource '%s' not found. No default value.\n", name.c_str());
+ PageManager::AddStringResource("NO DEFAULT", name, "[" + name + ("]"));
+ } else {
+ LOGINFO("String resources not loaded when looking for '%s'. No default value.\n", name.c_str());
+ }
return "[" + name + ("]");
}
+std::string ResourceManager::FindString(const std::string& name, const std::string& default_string) const
+{
+ if (this != NULL) {
+ std::map<std::string, string_resource_struct>::const_iterator it = mStrings.find(name);
+ if (it != mStrings.end())
+ return it->second.value;
+ LOGERR("String resource '%s' not found. Using default value.\n", name.c_str());
+ PageManager::AddStringResource("DEFAULT", name, default_string);
+ } else {
+ LOGINFO("String resources not loaded when looking for '%s'. Using default value.\n", name.c_str());
+ }
+ return default_string;
+}
+
+void ResourceManager::DumpStrings() const
+{
+ if (this == NULL) {
+ gui_print("No string resources\n");
+ return;
+ }
+ std::map<std::string, string_resource_struct>::const_iterator it;
+ gui_print("Dumping all strings:\n");
+ for (it = mStrings.begin(); it != mStrings.end(); it++)
+ gui_print("source: %s: '%s' = '%s'\n", it->second.source.c_str(), it->first.c_str(), it->second.value.c_str());
+ gui_print("Done dumping strings\n");
+}
+
ResourceManager::ResourceManager()
{
}
-void ResourceManager::LoadResources(xml_node<>* resList, ZipArchive* pZip)
+void ResourceManager::AddStringResource(std::string resource_source, std::string resource_name, std::string value)
+{
+ string_resource_struct res;
+ res.source = resource_source;
+ res.value = value;
+ mStrings[resource_name] = res;
+}
+
+void ResourceManager::LoadResources(xml_node<>* resList, ZipArchive* pZip, std::string resource_source)
{
if (!resList)
return;
@@ -290,6 +362,26 @@ void ResourceManager::LoadResources(xml_node<>* resList, ZipArchive* pZip)
delete res;
}
}
+ else if (type == "fontoverride")
+ {
+ if (mFonts.size() != 0 && child && child->first_attribute("name")) {
+ string FontName = child->first_attribute("name")->value();
+ size_t font_count = mFonts.size(), i;
+ bool found = false;
+
+ for (i = 0; i < font_count; i++) {
+ if (mFonts[i]->GetName() == FontName) {
+ mFonts[i]->Override(child, pZip);
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ LOGERR("Unable to locate font '%s' for override.\n", FontName.c_str());
+ }
+ } else if (mFonts.size() != 0)
+ LOGERR("Unable to locate font name for type fontoverride.\n");
+ }
else if (type == "image")
{
ImageResource* res = new ImageResource(child, pZip);
@@ -312,9 +404,12 @@ void ResourceManager::LoadResources(xml_node<>* resList, ZipArchive* pZip)
}
else if (type == "string")
{
- if (xml_attribute<>* attr = child->first_attribute("name"))
- mStrings[attr->value()] = child->value();
- else
+ if (xml_attribute<>* attr = child->first_attribute("name")) {
+ string_resource_struct res;
+ res.source = resource_source;
+ res.value = child->value();
+ mStrings[attr->value()] = res;
+ } else
error = true;
}
else
diff --git a/gui/resources.hpp b/gui/resources.hpp
index 0eb32674d..ce06d9679 100644
--- a/gui/resources.hpp
+++ b/gui/resources.hpp
@@ -6,6 +6,7 @@
#include <string>
#include <vector>
#include <map>
+#include "rapidxml.hpp"
struct ZipArchive;
@@ -49,10 +50,19 @@ public:
public:
void* GetResource() { return this ? mFont : NULL; }
int GetHeight() { return gr_getMaxFontHeight(this ? mFont : NULL); }
+ void Override(xml_node<>* node, ZipArchive* pZip);
protected:
void* mFont;
Type m_type;
+
+private:
+ void LoadFont(xml_node<>* node, ZipArchive* pZip);
+ void DeleteFont();
+
+private:
+ int origFontSize;
+ void* origFont;
};
class ImageResource : public Resource
@@ -92,19 +102,26 @@ class ResourceManager
public:
ResourceManager();
virtual ~ResourceManager();
- void LoadResources(xml_node<>* resList, ZipArchive* pZip);
+ void AddStringResource(std::string resource_source, std::string resource_name, std::string value);
+ void LoadResources(xml_node<>* resList, ZipArchive* pZip, std::string resource_source);
public:
FontResource* FindFont(const std::string& name) const;
ImageResource* FindImage(const std::string& name) const;
AnimationResource* FindAnimation(const std::string& name) const;
std::string FindString(const std::string& name) const;
+ std::string FindString(const std::string& name, const std::string& default_string) const;
+ void DumpStrings() const;
private:
+ struct string_resource_struct {
+ std::string value;
+ std::string source;
+ };
std::vector<FontResource*> mFonts;
std::vector<ImageResource*> mImages;
std::vector<AnimationResource*> mAnimations;
- std::map<std::string, std::string> mStrings;
+ std::map<std::string, string_resource_struct> mStrings;
};
#endif // _RESOURCE_HEADER
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index a6b38a25f..938c8548d 100644..100755
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -193,7 +193,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Team Win Recovery Project</text>
+ <text>{@twrp_header=Team Win Recovery Project}</text>
</text>
<text style="text_m">
@@ -204,7 +204,7 @@
<button style="main_button">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Install</text>
+ <text>{@install_btn=Install}</text>
<actions>
<action function="queueclear"/>
<action function="set">tw_selectimage=0</action>
@@ -214,43 +214,43 @@
<button style="main_button">
<placement x="%center_x%" y="%row2_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_btn=Wipe}</text>
<action function="page">wipe</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row6a_y%"/>
- <text>Backup</text>
+ <text>{@backup_btn=Backup}</text>
<action function="page">backup</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row6a_y%"/>
- <text>Restore</text>
+ <text>{@restore_btn=Restore}</text>
<action function="page">restore</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Mount</text>
+ <text>{@mount_btn=Mount}</text>
<action function="page">mount</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row11_y%"/>
- <text>Settings</text>
+ <text>{@settings_btn=Settings}</text>
<action function="page">settings</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_btn=Advanced}</text>
<action function="page">advanced</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Reboot</text>
+ <text>{@reboot_btn=Reboot}</text>
<action function="page">reboot</action>
</button>
</page>
@@ -261,25 +261,25 @@
<text style="text_l">
<condition var1="tw_selectimage" var2="0"/>
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_hdr=Install Zip}</text>
</text>
<text style="text_l">
<condition var1="tw_selectimage" var2="1"/>
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_hdr=Install Image}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select File from %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@select_file_from_storage=Select File from %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="sort_options"/>
<fileselector>
<placement x="%col1_x_left%" y="%row1a_y%" w="%fileselector_install_folder_width%" h="%fileselector_install_height%"/>
- <text>Folders</text>
+ <text>{@file_selector_folders_hdr=Folders}</text>
<filter folders="1" files="0"/>
<path name="tw_zip_location" default="/sdcard"/>
<data name="select"/>
@@ -308,7 +308,7 @@
<button style="main_button_half_width_low">
<condition var1="tw_selectimage" var2="0"/>
<placement x="%col_button_right%" y="%row13a_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_btn=Install Image}</text>
<actions>
<action function="set">tw_selectimage=1</action>
<action function="page">install</action>
@@ -318,7 +318,7 @@
<button style="main_button_half_width_low">
<condition var1="tw_selectimage" var2="1"/>
<placement x="%col_button_right%" y="%row13a_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_btn=Install Zip}</text>
<actions>
<action function="set">tw_selectimage=0</action>
<action function="page">install</action>
@@ -327,7 +327,7 @@
<button style="main_button_half_width_low">
<placement x="%col_button_right%" y="%row16a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=install</action>
<action function="overlay">select_storage</action>
@@ -369,32 +369,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_hdr=Install Zip}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>%tw_zip_queue_count% of max of 10 Files queued</text>
+ <text>{@zip_queue_count=%tw_zip_queue_count% of max of 10 Files queued}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This operation may install incompatible</text>
+ <text>{@zip_warn1=This operation may install incompatible}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>software and render your device unusable.</text>
+ <text>{@zip_warn2=software and render your device unusable.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Press back to cancel adding this zip.</text>
+ <text>{@zip_back_cancel=Press back to cancel adding this zip.}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row8_y%"/>
- <text>Folder:</text>
+ <text>{@folder=Folder:}</text>
</text>
<text style="text_m">
@@ -404,7 +404,7 @@
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>File:</text>
+ <text>{@file=File:}</text>
</text>
<text style="text_m">
@@ -414,31 +414,31 @@
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row8_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<checkbox>
<placement x="%col1_x_right%" y="%row9_y%"/>
- <text>Zip file signature verification</text>
+ <text>{@zip_sig_chk=Zip signature verification}</text>
<data variable="tw_signed_zip_verify"/>
</checkbox>
<checkbox>
<condition var1="tw_has_injecttwrp" var2="1"/>
<placement x="%col1_x_right%" y="%row10a_y%"/>
- <text>Inject TWRP after install</text>
+ <text>{@inject_twrp_chk=Inject TWRP after install}</text>
<data variable="tw_inject_after_zip"/>
</checkbox>
<button style="main_button_half_width">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Add more Zips</text>
+ <text>{@zip_add_btn=Add more Zips}</text>
<action function="page">install</action>
</button>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Clear Zip Queue</text>
+ <text>{@zip_clear_btn=Clear Zip Queue}</text>
<actions>
<action function="queueclear"/>
<action function="page">install</action>
@@ -446,7 +446,7 @@
</button>
<slider>
- <text>Swipe to confirm Flash</text>
+ <text>{@swipe_flash=Swipe to confirm Flash}</text>
<action function="flash">flash_zip</action>
</slider>
@@ -469,7 +469,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip %tw_zip_index% of %tw_zip_queue_count%</text>
+ <text>{@install_zip_count_hdr=Install Zip %tw_zip_index% of %tw_zip_queue_count%}</text>
</text>
<text style="text_m">
@@ -492,26 +492,26 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_hdr=Install Zip}</text>
</text>
<text style="text_m_fail">
<condition var1="tw_operation_status" op="!=" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Failed</text>
+ <text>{@failed=Failed}</text>
</text>
<text style="text_m">
<condition var1="tw_operation_status" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Successful</text>
+ <text>{@successful=Successful}</text>
</text>
<template name="console"/>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Wipe cache/dalvik</text>
+ <text>{@wipe_cache_dalvik_btn=Wipe cache/dalvik}</text>
<actions>
<action function="set">tw_back=flash_done</action>
<action function="set">tw_action=wipe</action>
@@ -519,30 +519,30 @@
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=wipe</action>
<action function="set">tw_action2_param=dalvik</action>
- <action function="set">tw_text1=Wipe Cache &amp; Dalvik?</action>
- <action function="set">tw_action_text1=Wiping Cache &amp; Dalvik...</action>
- <action function="set">tw_complete_text1=Cache &amp; Dalvik Wipe Complete</action>
- <action function="set">tw_slider_text=Swipe to Wipe</action>
+ <action function="set">tw_text1={@wipe_cache_dalvik_confirm=Wipe Cache &amp; Dalvik?}</action>
+ <action function="set">tw_action_text1={@wiping_cache_dalvik=Wiping Cache &amp; Dalvik...}</action>
+ <action function="set">tw_complete_text1={@wipe_cache_dalvik_complete=Cache &amp; Dalvik Wipe Complete}</action>
+ <action function="set">tw_slider_text={@swipe_wipe=Swipe to Wipe}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_width">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Reboot System</text>
+ <text>{@reboot_system_btn=Reboot System}</text>
<actions>
<action function="set">tw_back=main2</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
<action function="set">tw_text3=</action>
<action function="set">tw_text4=</action>
- <action function="set">tw_action_text1=Rebooting...</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -569,32 +569,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_hdr=Install Image}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select Target Partition</text>
- </text>
-
- <text style="text_m_accent">
- <placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This operation may install incompatible</text>
- </text>
-
- <text style="text_m_accent">
- <placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>software and render your device unusable.</text>
- </text>
-
- <text style="text_m">
- <placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Press back to cancel adding this image.</text>
+ <text>{@install_sel_target=Select Target Partition}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row8_y%"/>
- <text>Folder:</text>
+ <text>{@folder=Folder:}</text>
</text>
<text style="text_m">
@@ -604,7 +589,7 @@
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>File:</text>
+ <text>{@file=File:}</text>
</text>
<text style="text_m">
@@ -615,20 +600,20 @@
<partitionlist>
<placement x="%col1_x_right%" y="%row7a_y%" w="%content_half_width%" h="%partitionlist_flashimage_height%"/>
<icon selected="radio_true" unselected="radio_false"/>
- <text>Select Partition to Flash Image:</text>
+ <text>{@flash_image_select=Select Partition to Flash Image:}</text>
<data name="tw_flash_partition"/>
<listtype name="flashimg"/>
</partitionlist>
<slider>
- <text>Swipe to confirm Flash</text>
+ <text>{@swipe_flash=Swipe to confirm Flash}</text>
<actions>
<action function="set">tw_back=flashimage_confirm</action>
<action function="set">tw_action=flashimage</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_action_text1=Flashing Image...</action>
+ <action function="set">tw_action_text1={@flashing_image=Flashing Image...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Image Flashed</action>
+ <action function="set">tw_complete_text1={@image_flashed=Image Flashed}</action>
<action function="page">action_page</action>
</actions>
<action function="flashimage"/>
@@ -678,7 +663,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Confirm Action</text>
+ <text>{@confirm_action=Confirm Action}</text>
</text>
<text style="text_m">
@@ -708,7 +693,7 @@
<text style="text_m">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider style="slider_centered">
@@ -750,7 +735,7 @@
<button style="main_button_half_width">
<condition var1="tw_has_cancel" var2="1"/>
<placement x="%col2_x_right%" y="%row15a_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="%tw_cancel_action%">%tw_cancel_param%</action>
</button>
@@ -828,20 +813,20 @@
<text style="text_m_fail">
<condition var1="tw_operation_status" op="!=" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Failed</text>
+ <text>{@failed=Failed}</text>
</text>
<text style="text_m">
<condition var1="tw_operation_status" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Successful</text>
+ <text>{@successful=Successful}</text>
</text>
<template name="console"/>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Back</text>
+ <text>{@back_btn=Back}</text>
<actions>
<action function="set">tw_clear_destination=%tw_back%</action>
<action function="page">clear_vars</action>
@@ -850,20 +835,20 @@
<button style="main_button_half_width">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Reboot System</text>
+ <text>{@reboot_system_btn=Reboot System}</text>
<actions>
<action function="set">tw_back=main2</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
<action function="set">tw_text3=</action>
<action function="set">tw_text4=</action>
- <action function="set">tw_action_text1=Rebooting...</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -930,23 +915,23 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Factory Reset</text>
+ <text>{@factory_reset_hdr=Factory Reset}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Wipes Data, Cache, and Dalvik</text>
+ <text>{@factory_reset1=Wipes Data, Cache, and Dalvik}</text>
</text>
<text style="text_m_accent">
<condition var1="tw_has_data_media" var2="1"/>
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>(not including internal storage)</text>
+ <text>{@factory_reset2=(not including internal storage)}</text>
</text>
<text style="text_m_accent">
@@ -955,33 +940,33 @@
<condition var1="fileexists" var2="/and-sec"/>
</conditions>
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Android Secure</text>
+ <text>{@android_secure=Android Secure}</text>
</text>
<text style="text_m_accent">
<condition var1="tw_has_sdext_partition" var2="1"/>
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>SD-EXT</text>
+ <text>{@sdext=SD-EXT}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>Most of the time this is</text>
+ <text>{@factory_reset3=Most of the time this is}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>the only wipe that you need.</text>
+ <text>{@factory_reset4=the only wipe that you need.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row10_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<button style="main_button_half_width">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Advanced Wipe</text>
+ <text>{@advanced_wipe_btn=Advanced Wipe}</text>
<actions>
<action function="set">partitionlisterror=0</action>
<action function="page">advancedwipe</action>
@@ -991,7 +976,7 @@
<button style="main_button_half_width">
<condition var1="tw_has_data_media" var2="1"/>
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Format Data</text>
+ <text>{@format_data_btn=Format Data}</text>
<action function="page">formatdata</action>
</button>
@@ -1001,29 +986,29 @@
<condition var1="tw_has_data_media" var2="0"/>
</conditions>
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Wipe Encryption</text>
+ <text>{@wipe_enc_btn=Wipe Encryption}</text>
<actions>
<action function="set">tw_back=wipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=DATAMEDIA</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Wipe Encryption from Data?</action>
+ <action function="set">tw_text1={@wipe_enc_confirm=Wipe Encryption from Data?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting Data...</action>
- <action function="set">tw_complete_text1=Data Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Format Data</action>
+ <action function="set">tw_action_text1={@formatting_data=Formatting Data...}</action>
+ <action function="set">tw_complete_text1={@format_data_complete=Data Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_format_data=Swipe to Format Data}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<slider>
- <text>Swipe to Factory Reset</text>
+ <text>{@swipe_factory_reset=Swipe to Factory Reset}</text>
<actions>
<action function="set">tw_back=wipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=data</action>
- <action function="set">tw_action_text1=Factory Reset...</action>
- <action function="set">tw_complete_text1=Factory Reset Complete</action>
+ <action function="set">tw_action_text1={@factory_resetting=Factory Reset...}</action>
+ <action function="set">tw_complete_text1={@factory_reset_complete=Factory Reset Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -1048,17 +1033,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Advanced Wipe</text>
+ <text>{@advanced_wipe_hdr=Advanced Wipe}</text>
</text>
<partitionlist>
<placement x="%col1_x_left%" y="%row1a_y%" w="%content_width%" h="%partitionlist_wipe_height%"/>
- <text>Select Partitions to Wipe:</text>
+ <text>{@sel_part_wipe=Select Partitions to Wipe:}</text>
<data name="tw_wipe_list"/>
<listtype name="wipe"/>
</partitionlist>
@@ -1066,12 +1051,12 @@
<text style="text_m_fail">
<condition var1="partitionlisterror" var2="1"/>
<placement x="%col2_x_left%" y="%row14a_y%" placement="5"/>
- <text>Invalid partition selection</text>
+ <text>{@invalid_part_sel=Invalid partition selection}</text>
</text>
<button style="main_button_m">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Repair or Change File System</text>
+ <text>{@repair_change_btn=Repair or Change File System}</text>
<actions>
<action function="checkpartitionlist"/>
<action function="page">checkpartitionlist</action>
@@ -1079,14 +1064,14 @@
</button>
<slider>
- <text>Swipe to Wipe</text>
+ <text>{@swipe_wipe=Swipe to Wipe}</text>
<actions>
<action function="set">tw_back=advancedwipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=LIST</action>
- <action function="set">tw_text1=Wipe Selected Partition(s)?</action>
- <action function="set">tw_action_text1=Wiping Partition(s)...</action>
- <action function="set">tw_complete_text1=Wipe Complete</action>
+ <action function="set">tw_text1={@wipe_sel_confirm=Wipe Selected Partition(s)?}</action>
+ <action function="set">tw_action_text1={@wiping_part=Wiping Partition(s)...}</action>
+ <action function="set">tw_complete_text1={@wipe_complete=Wipe Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -1107,32 +1092,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Format Data</text>
+ <text>{@format_data_hdr=Format Data}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Format Data will wipe all of your apps, backups, pictures, videos, media, and</text>
+ <text>{@format_data_lcp1=Format Data will wipe all of your apps, backups, pictures, videos, media, and}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>removes encryption on internal storage.</text>
+ <text>{@format_data_lcp2=removes encryption on internal storage.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>This cannot be undone. Press back to cancel.</text>
+ <text>{@format_data_undo=This cannot be undone.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>Type yes to continue.</text>
+ <text>{@yes_continue=Type yes to continue. Press back to cancel.}</text>
</text>
<input>
@@ -1167,8 +1152,8 @@
<action function="set">tw_back=formatdata</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=DATAMEDIA</action>
- <action function="set">tw_action_text1=Formatting Data...</action>
- <action function="set">tw_complete_text1=Data Format Complete</action>
+ <action function="set">tw_action_text1={@formatting_data=Formatting Data...}</action>
+ <action function="set">tw_complete_text1={@format_data_complete=Data Format Complete}</action>
<action function="page">action_page</action>
</actions>
</action>
@@ -1204,83 +1189,83 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Partition Options for: %tw_partition_name%</text>
+ <text>{@part_opt_hdr=Partition Options for: %tw_partition_name%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Mount Point: %tw_partition_mount_point%</text>
+ <text>{@part_mount_point=Mount Point: %tw_partition_mount_point%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Current file system: %tw_partition_file_system%</text>
+ <text>{@part_curr_fs=File system: %tw_partition_file_system%}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_is_present" var2="1"/>
<placement x="%col2_x_left%" y="%row5_y%"/>
- <text>Present: Yes</text>
+ <text>{@part_present_yes=Present: Yes}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_is_present" var2="0"/>
<placement x="%col2_x_left%" y="%row5_y%"/>
- <text>Present: No</text>
+ <text>{@part_present_no=Present: No}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_removable" var2="1"/>
<placement x="%col1_x_right%" y="%row5_y%"/>
- <text>Removable: Yes</text>
+ <text>{@part_removable_yes=Removable: Yes}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_removable" var2="0"/>
<placement x="%col1_x_right%" y="%row5_y%"/>
- <text>Removable: No</text>
+ <text>{@part_removable_no=Removable: No}</text>
</text>
<text style="text_m">
<placement x="%col2_x_left%" y="%row7_y%"/>
- <text>Size: %tw_partition_size%MB</text>
+ <text>{@part_size=Size: %tw_partition_size%MB}</text>
</text>
<text style="text_m">
<placement x="%col1_x_right%" y="%row7_y%"/>
- <text>Used: %tw_partition_used%MB</text>
+ <text>{@part_used=Used: %tw_partition_used%MB}</text>
</text>
<text style="text_m">
<placement x="%col2_x_left%" y="%row9_y%"/>
- <text>Free: %tw_partition_free%MB</text>
+ <text>{@part_free=Free: %tw_partition_free%MB}</text>
</text>
<text style="text_m">
<placement x="%col1_x_right%" y="%row9_y%"/>
- <text>Backup Size: %tw_partition_backup_size%MB</text>
+ <text>{@part_backup_size=Backup Size: %tw_partition_backup_size%MB}</text>
</text>
<button style="main_button_half_width">
<condition var1="tw_partition_can_resize" op="=" var2="1"/>
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Resize File System</text>
+ <text>{@resize_btn=Resize File System}</text>
<actions>
<action function="set">tw_back=partitionoptions</action>
<action function="set">tw_action=resize</action>
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=getpartitiondetails</action>
- <action function="set">tw_text1=Resize %tw_partition_name%?</action>
+ <action function="set">tw_text1={@resize_confirm=Resize %tw_partition_name%?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Resizing...</action>
- <action function="set">tw_complete_text1=Resize Complete</action>
- <action function="set">tw_slider_text=Swipe to Resize</action>
+ <action function="set">tw_action_text1={@resizing=Resizing...}</action>
+ <action function="set">tw_complete_text1={@resize_complete=Resize Complete}</action>
+ <action function="set">tw_slider_text={@swipe_resize=Swipe to Resize}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1288,24 +1273,24 @@
<button style="main_button_half_width">
<condition var1="tw_partition_can_repair" op="=" var2="1"/>
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Repair File System</text>
+ <text>{@repair_btn=Repair File System}</text>
<actions>
<action function="set">tw_back=partitionoptions</action>
<action function="set">tw_action=repair</action>
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Repair %tw_partition_name%?</action>
+ <action function="set">tw_text1={@repair_confirm=Repair %tw_partition_name%?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Repairing...</action>
- <action function="set">tw_complete_text1=Repair Complete</action>
- <action function="set">tw_slider_text=Swipe to Repair</action>
+ <action function="set">tw_action_text1={@repairing=Repairing...}</action>
+ <action function="set">tw_complete_text1={@repair_complete=Repair Complete}</action>
+ <action function="set">tw_slider_text={@swipe_repair=Swipe to Repair}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_width">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Change File System</text>
+ <text>{@change_fs_btn=Change File System}</text>
<action function="page">selectfilesystem</action>
</button>
@@ -1345,32 +1330,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Change File System for: %tw_partition_name%</text>
+ <text>{@change_fs_for_hdr=Change File System for: %tw_partition_name%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Mount Point: %tw_partition_mount_point%</text>
+ <text>{@part_mount_point=Mount Point: %tw_partition_mount_point%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Current file system: %tw_partition_file_system%</text>
+ <text>{@part_curr_fs=File system: %tw_partition_file_system%}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Some ROMs or kernels may not support some</text>
+ <text>{@change_fs_warn1=Some ROMs or kernels may not support some}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>file systems. Proceed with caution!</text>
+ <text>{@change_fs_warn2=file systems. Proceed with caution!}</text>
</text>
<button style="main_button_half_width">
@@ -1383,11 +1368,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext2</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT2</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1402,11 +1387,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext3</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT3</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1421,11 +1406,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext4</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT4</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1440,11 +1425,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=vfat</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=FAT</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1459,11 +1444,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=exfat</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=exFAT</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1478,11 +1463,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=f2fs</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=F2FS</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1503,17 +1488,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<text style="text_m">
@@ -1536,14 +1521,14 @@
<partitionlist>
<placement x="%col1_x_left%" y="%row4a_y%" w="%content_half_width%" h="%partitionlist_backup_height%"/>
- <text>Select Partitions to Backup:</text>
+ <text>{@sel_part_backup=Select Partitions to Backup:}</text>
<data name="tw_backup_list"/>
<listtype name="backup"/>
</partitionlist>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row2_y%"/>
- <text>Encryption:</text>
+ <text>{@encryption=Encryption:}</text>
</text>
<text style="text_m">
@@ -1552,7 +1537,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%col1_x_right%" y="%row3_y%"/>
- <text>disabled - set a password to enable</text>
+ <text>{@enc_disabled=disabled - set a password to enable}</text>
</text>
<text style="text_m">
@@ -1561,7 +1546,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%col1_x_right%" y="%row3_y%"/>
- <text>enabled</text>
+ <text>{@enc_enabled=enabled}</text>
</text>
<fill color="%fileselector_linecolor%">
@@ -1579,30 +1564,30 @@
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row5_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<checkbox>
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Enable compression</text>
+ <text>{@enable_backup_comp_chk=Enable compression}</text>
<data variable="tw_use_compression"/>
</checkbox>
<checkbox>
<placement x="%col1_x_right%" y="%row7a_y%"/>
- <text>Skip MD5 generation during backup</text>
+ <text>{@skip_md5_backup_chk=Skip MD5 generation during backup}</text>
<data variable="tw_skip_md5_generate"/>
</checkbox>
<checkbox>
<placement x="%col1_x_right%" y="%row9_y%"/>
- <text>Disable Free Space Check</text>
+ <text>{@disable_backup_space_chk=Disable Free Space Check}</text>
<data variable="tw_disable_free_space"/>
</checkbox>
<button style="main_button_half_width">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=backup</action>
<action function="overlay">select_storage</action>
@@ -1611,7 +1596,7 @@
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Refresh Sizes</text>
+ <text>{@refresh_sizes_btn=Refresh Sizes}</text>
<actions>
<action function="refreshsizes"/>
<action function="page">backup</action>
@@ -1619,7 +1604,7 @@
</button>
<slider>
- <text>Swipe to Backup</text>
+ <text>{@swipe_backup=Swipe to Backup}</text>
<action function="page">backup_run</action>
</slider>
@@ -1636,7 +1621,7 @@
<page name="backupname1">
<action>
- <condition var1="tw_backup_name" op="=" var2="(Auto Generate)"/>
+ <condition var1="tw_backup_name" op="=" var2="{@auto_generate=(Auto Generate)}"/>
<action function="generatebackupname"/>
</action>
@@ -1650,17 +1635,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -1688,21 +1673,21 @@
<text style="text_m_fail">
<condition var1="tw_fileexists" var2="1"/>
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>A backup with that name already exists!</text>
+ <text>{@backup_name_exists=A backup with that name already exists!}</text>
</text>
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">backup</action>
</actions>
</button>
<button style="main_button_half_width_low">
<placement x="%date_button_x%" y="%row5_y%"/>
- <text>Append Date</text>
+ <text>{@append_date_btn=Append Date}</text>
<action function="appenddatetobackupname"/>
</button>
@@ -1711,7 +1696,7 @@
<action>
<touch key="home"/>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">main</action>
</actions>
</action>
@@ -1719,7 +1704,7 @@
<action>
<touch key="back"/>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">backup</action>
</actions>
</action>
@@ -1730,17 +1715,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row2_y%"/>
- <text>Encryption Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -1763,12 +1748,12 @@
<text style="text_m_fail">
<condition var1="tw_password_not_match" var2="1"/>
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Passwords do not match!</text>
+ <text>{@pass_not_match=Passwords do not match!}</text>
</text>
<button style="main_button_half_width_low">
<placement x="%center_x%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_encrypt_backup=0</action>
<action function="set">tw_backup_password=</action>
@@ -1797,17 +1782,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row2_y%"/>
- <text>Encryption Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -1824,12 +1809,12 @@
<text style="text_m">
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Enter Password again!</text>
+ <text>{@enter_pass2=Enter Password again:}</text>
</text>
<button style="main_button_half_width_low">
<placement x="%center_x%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_encrypt_backup=0</action>
<action function="set">tw_backup_password=</action>
@@ -1895,7 +1880,7 @@
<text style="text_m_accent">
<placement x="%progress_text_x%" y="%progress_text_y%"/>
- <text>Progress:</text>
+ <text>{@progress=Progress:}</text>
</text>
<text style="text_m">
@@ -1910,7 +1895,7 @@
<button style="main_button_half_width">
<placement x="%col2_x_right%" y="%row15a_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="cancelbackup"/>
</button>
@@ -1923,7 +1908,7 @@
<condition var1="tw_cancel_backup" var2="0"/>
<actions>
<action function="set">tw_back=backup</action>
- <action function="set">tw_complete_text1=Backup Complete</action>
+ <action function="set">tw_complete_text1={@backup_complete=Backup Complete}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -1934,7 +1919,7 @@
<condition var1="tw_cancel_backup" var2="1"/>
<actions>
<action function="set">tw_back=backup</action>
- <action function="set">tw_complete_text1=Backup Cancelled</action>
+ <action function="set">tw_complete_text1={@backup_cancel=Backup Cancelled}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -1946,19 +1931,19 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select Backup from %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@restore_sel_store_hdr=Select Backup from %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="sort_options"/>
<fileselector>
<placement x="%col1_x_left%" y="%row1a_y%" w="%content_quarter_width%" h="%fileselector_install_height%"/>
- <text>Select Package to Restore:</text>
+ <text>{@restore_sel_pack_fs=Select Package to Restore:}</text>
<filter folders="1" files="0" nav="0"/>
<path name="tw_backups_folder"/>
<data name="tw_restore" default=""/>
@@ -1967,7 +1952,7 @@
<button style="main_button_half_width_low">
<placement x="%col_button_right%" y="%row16a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="overlay">select_storage</action>
@@ -2015,17 +2000,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Encrypted Backup</text>
+ <text>{@restore_enc_backup_hdr=Encrypted Backup}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Enter Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -2048,12 +2033,12 @@
<text style="text_m_fail">
<condition var1="tw_password_fail" var2="1"/>
<placement x="%col1_x_left%" y="%row5_y%"/>
- <text>Password failed, please try again!</text>
+ <text>{@restore_dec_fail=Password failed, please try again!}</text>
</text>
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row6_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">restore</action>
@@ -2062,16 +2047,17 @@
<button style="main_button_half_width_low">
<placement x="%col_button_right%" y="%row6_y%"/>
- <text>Delete Backup</text>
+ <text>{@del_backup_btn=Delete Backup}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; rm -rf "%tw_restore_name%"</action>
- <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
- <action function="set">tw_text2=This cannot be undone!</action>
- <action function="set">tw_action_text1=Deleting Backup...</action>
- <action function="set">tw_complete_text1=Backup Delete Complete</action>
- <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="set">tw_text1={@del_backup_confirm=Delete Backup?}</action>
+ <action function="set">tw_text2=%tw_restore_name%</action>
+ <action function="set">tw_text4={@del_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@deleting_backup=Deleting Backup...}</action>
+ <action function="set">tw_complete_text1={@backup_deleted=Backup Delete Complete}</action>
+ <action function="set">tw_slider_text={@swipe_delete=Swipe to Delete}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -2094,12 +2080,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Encrypted Backup - Trying Decryption</text>
+ <text>{@restore_try_decrypt=Encrypted Backup - Trying Decryption}</text>
</text>
<template name="console"/>
@@ -2138,17 +2124,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Backup made on %tw_restore_file_date%</text>
+ <text>{@restore_backup_date=Backup made on %tw_restore_file_date%}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<text style="text_m">
@@ -2172,41 +2158,41 @@
<partitionlist>
<placement x="%col1_x_left%" y="%row4a_y%" w="%content_half_width%" h="%partitionlist_backup_height%"/>
- <text>Select Partitions to Restore:</text>
+ <text>{@restore_sel_part=Select Partitions to Restore:}</text>
<data name="tw_restore_list" selectedlist="tw_restore_selected"/>
<listtype name="restore"/>
</partitionlist>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row5_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<checkbox>
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Enable MD5 Verification of Backup Files</text>
+ <text>{@retore_enable_md5_chk=Enable MD5 Verification of Backup Files}</text>
<data variable="tw_skip_md5_check"/>
</checkbox>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Delete Backup</text>
+ <text>{@del_backup_btn=Delete Backup}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; rm -rf "%tw_restore_name%"</action>
- <action function="set">tw_text1=Delete Backup?</action>
+ <action function="set">tw_text1={@del_backup_confirm=Delete Backup?}</action>
<action function="set">tw_text2=%tw_restore_name%</action>
- <action function="set">tw_text4=This cannot be undone!</action>
- <action function="set">tw_action_text1=Deleting Backup...</action>
- <action function="set">tw_complete_text1=Backup Delete Complete</action>
- <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="set">tw_text4={@del_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@deleting_backup=Deleting Backup...}</action>
+ <action function="set">tw_complete_text1={@backup_deleted=Backup Delete Complete}</action>
+ <action function="set">tw_slider_text={@swipe_delete=Swipe to Delete}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<slider>
- <text>Swipe to Restore</text>
+ <text>{@swipe_restore=Swipe to Restore}</text>
<action function="page">restore_run</action>
</slider>
@@ -2226,17 +2212,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Rename Backup</text>
+ <text>{@rename_backup_hdr=Rename Backup}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -2248,11 +2234,11 @@
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; mv "%tw_restore_name%" "%tw_backup_rename%"</action>
- <action function="set">tw_text1=Rename Backup?</action>
- <action function="set">tw_text2=This cannot be undone!</action>
- <action function="set">tw_action_text1=Renaming Backup...</action>
- <action function="set">tw_complete_text1=Backup Rename Complete</action>
- <action function="set">tw_slider_text=Swipe to Rename</action>
+ <action function="set">tw_text1={@rename_backup_confirm=Rename Backup?}</action>
+ <action function="set">tw_text2={@rename_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@renaming_backup=Renaming Backup...}</action>
+ <action function="set">tw_complete_text1={@rename_backup_complete=Backup Rename Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_rename=Swipe to Rename}</action>
<action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_rename%</action>
<action function="set">tw_existpage=renamebackup</action>
<action function="set">tw_notexistpage=confirm_action</action>
@@ -2272,12 +2258,12 @@
<text style="text_m_fail">
<condition var1="tw_fileexists" var2="1"/>
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>A backup with that name already exists!</text>
+ <text>{@backup_name_exists=A backup with that name already exists!}</text>
</text>
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">restore_select</action>
</button>
@@ -2299,7 +2285,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
@@ -2313,7 +2299,7 @@
<text style="text_m_accent">
<placement x="%progress_text_x%" y="%progress_text_y%"/>
- <text>Progress:</text>
+ <text>{@progress=Progress:}</text>
</text>
<text style="text_m">
@@ -2325,7 +2311,7 @@
<condition var1="tw_operation_state" var2="1"/>
<actions>
<action function="set">tw_back=restore_select</action>
- <action function="set">tw_complete_text1=Restore Complete</action>
+ <action function="set">tw_complete_text1={@restore_complete=Restore Complete}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2341,24 +2327,24 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<partitionlist>
<placement x="%col1_x_left%" y="%row1a_y%" w="%content_width%" h="%partitionlist_mount_height%"/>
- <text>Select Partitions to Mount:</text>
+ <text>{@mount_sel_part=Select Partitions to Mount:}</text>
<listtype name="mount"/>
</partitionlist>
<button style="checkbox">
<condition var1="tw_mount_system_ro" op="=" var2="0"/>
<placement x="%col1_x_left%" y="%row14_y%" textplacement="6"/>
- <text>Mount system partition read-only</text>
+ <text>{@mount_sys_ro_chk=Mount system partition read-only}</text>
<image resource="checkbox_false"/>
<action function="mountsystemtoggle">1</action>
</button>
@@ -2366,7 +2352,7 @@
<button style="checkbox">
<condition var1="tw_mount_system_ro" op="!=" var2="0"/>
<placement x="%col1_x_left%" y="%row14_y%" textplacement="6"/>
- <text>Mount system partition read-only</text>
+ <text>{@mount_sys_ro_chk=Mount system partition read-only}</text>
<image resource="checkbox_true"/>
<actions>
<action function="set">tw_lifetime_writes=2</action>
@@ -2377,7 +2363,7 @@
<button style="main_button_half_width">
<condition var1="tw_has_usb_storage" var2="1"/>
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Mount USB Storage</text>
+ <text>{@mount_usb_storage_btn=Mount USB Storage}</text>
<action function="page">usb_mount</action>
</button>
@@ -2387,13 +2373,13 @@
<condition var1="tw_is_decrypted" var2="0"/>
</conditions>
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_btn=Decrypt Data}</text>
<action function="page">decrypt</action>
</button>
<button style="main_button_half_width">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=mount</action>
<action function="overlay">select_storage</action>
@@ -2406,7 +2392,7 @@
<condition var1="tw_mtp_enabled" var2="0"/>
</conditions>
<placement x="%col2_x_right%" y="%row15a_y%"/>
- <text>Enable MTP</text>
+ <text>{@enable_mtp_btn=Enable MTP}</text>
<action function="startmtp"/>
</button>
@@ -2416,7 +2402,7 @@
<condition var1="tw_mtp_enabled" var2="1"/>
</conditions>
<placement x="%col2_x_right%" y="%row15a_y%"/>
- <text>Disable MTP</text>
+ <text>{@disable_mtp_btn=Disable MTP}</text>
<action function="stopmtp"/>
</button>
@@ -2436,32 +2422,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>USB Storage</text>
+ <text>{usb_storage_hdr=USB Storage}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>USB Storage Mounted</text>
+ <text>{@usb_stor_mnt1=USB Storage Mounted}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Be sure to safely remove your device</text>
+ <text>{@usb_stor_mnt2=Be sure to safely remove your device}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>from your computer before unmounting!</text>
+ <text>{@usb_stor_mnt3=from your computer before unmounting!}</text>
</text>
<button style="main_button_half_width">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Unmount USB-Storage</text>
+ <text>{@unmount_btn=Unmount}</text>
<action function="page">usb_umount</action>
</button>
@@ -2509,23 +2495,24 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Reboot Menu</text>
+ <text>{@reboot_hdr=Reboot Menu}</text>
</text>
<button style="main_button">
<condition var1="tw_reboot_system" var2="1"/>
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>System</text>
+ <text>{@rb_system_btn=System}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_action_text2=</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2533,17 +2520,17 @@
<button style="main_button">
<condition var1="tw_reboot_poweroff" var2="1"/>
<placement x="%center_x%" y="%row2_y%"/>
- <text>Power Off</text>
+ <text>{@rb_poweroff_btn=Power Off}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=poweroff</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to power off?</action>
- <action function="set">tw_action_text1=Turning Off...</action>
- <action function="set">tw_complete_text1=Turning Off...</action>
- <action function="set">tw_slider_text=Swipe to Power Off</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_ospo=sure you wish to power off?}</action>
+ <action function="set">tw_action_text1={@turning_off=Turning Off...}</action>
+ <action function="set">tw_complete_text1={@turning_off=Turning Off...}</action>
+ <action function="set">tw_slider_text={@swipe_power_off=Swipe to Power Off}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2551,17 +2538,17 @@
<button style="main_button">
<condition var1="tw_reboot_recovery" var2="1"/>
<placement x="%col1_x_left%" y="%row6a_y%"/>
- <text>Recovery</text>
+ <text>{@rb_recovery_btn=Recovery}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=recovery</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2569,17 +2556,17 @@
<button style="main_button">
<condition var1="tw_reboot_bootloader" var2="1"/>
<placement x="%center_x%" y="%row6a_y%"/>
- <text>Bootloader</text>
+ <text>{@rb_bootloader_btn=Bootloader}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=bootloader</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2587,17 +2574,17 @@
<button style="main_button">
<condition var1="tw_download_mode" var2="1"/>
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Download</text>
+ <text>{@rb_download_btn=Download}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=download</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2618,39 +2605,39 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Unmodified System Partition</text>
+ <text>{@sys_ro_hdr=Unmodified System Partition}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Keep System Read only?</text>
+ <text>{@sys_ro_keep=Keep System Read only?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>TWRP can leave your system partition unmodified to make it easier for you to take official updates.</text>
+ <text>{@sys_rol1=TWRP can leave your system partition unmodified to make it easier for you to take official updates.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>TWRP will be unable to prevent the stock ROM from replacing TWRP and will not offer to root your device.</text>
+ <text>{@sys_rol2=TWRP will be unable to prevent the stock ROM from replacing TWRP and will not offer to root your device.}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>Installing zips or performing adb operations may still modify the system partition.</text>
+ <text>{@sys_rol3=Installing zips or performing adb operations may still modify the system partition.}</text>
</text>
<checkbox>
<condition var1="tw_is_encrypted" var2="0"/>
<placement x="%col1_x_left%" y="%row14_y%"/>
- <text>Never show this screen during boot again</text>
+ <text>{@sys_ro_never_show_chk=Never show this screen during boot again}</text>
<data variable="tw_never_show_system_ro_page"/>
</checkbox>
<button style="main_button_half_width">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>Keep Read Only</text>
+ <text>{@sys_ro_keep_ro_btn=Keep Read Only}</text>
<actions>
<action function="mountsystemtoggle">1</action>
<action function="set">tw_page_done=1</action>
@@ -2659,7 +2646,7 @@
</button>
<slider>
- <text>Swipe to Allow Modifications</text>
+ <text>{@swipe_allow_mod=Swipe to Allow Modifications}</text>
<actions>
<action function="mountsystemtoggle">0</action>
<action function="set">tw_page_done=1</action>
@@ -2673,42 +2660,42 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>General Settings</text>
+ <text>{@settings_gen_hdr=General Settings}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="0" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="0" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<listbox style="scrolllist">
<placement x="%col1_x_left%" y="%row3a_y%" w="%content_half_width%" h="%listbox_settings_height%"/>
<icon selected="checkbox_true" unselected="checkbox_false"/>
- <listitem name="Zip file signature verification">
+ <listitem name="{@zip_sig_chk=Zip signature verification}">
<data variable="tw_signed_zip_verify"/>
</listitem>
- <listitem name="Use rm -rf instead of formatting">
+ <listitem name="{@use_rmrf_chk=Use rm -rf instead of formatting}">
<data variable="tw_rm_rf"/>
</listitem>
- <listitem name="Skip MD5 generation during backup">
+ <listitem name="{@skip_md5_backup_chk=Skip MD5 generation during backup}">
<data variable="tw_skip_md5_generate"/>
</listitem>
- <listitem name="Enable MD5 verification of backup files">
+ <listitem name="{@retore_enable_md5_chk=Enable MD5 verification of backup files}">
<data variable="tw_skip_md5_check"/>
</listitem>
- <listitem name="Use 24-hour clock">
+ <listitem name="{@use24clock_chk=Use 24-hour clock}">
<data variable="tw_military_time"/>
</listitem>
- <listitem name="Simulate actions for theme testing">
+ <listitem name="{@simact_chk=Simulate actions for theme testing}">
<data variable="tw_simulate_actions"/>
</listitem>
- <listitem name="Simulate failure for actions">
+ <listitem name="{@simfail_chk=Simulate failure for actions}">
<condition var1="tw_simulate_actions" var2="1"/>
<data variable="tw_simulate_fail"/>
</listitem>
@@ -2716,14 +2703,14 @@
<checkbox>
<placement x="%col1_x_right%" y="%row3a_y%"/>
- <text>Reversed navbar layout</text>
+ <text>{@rev_navbar_chk=Reversed navbar layout}</text>
<data variable="tw_samsung_navbar"/>
</checkbox>
<button style="radiobutton">
<condition var1="tw_navbar_button_position" op="!=" var2="0"/>
<placement x="%col1_x_right%" y="%row5_y%" textplacement="6"/>
- <text>Center navbar buttons</text>
+ <text>{@ctr_navbar_rdo=Center navbar buttons}</text>
<image resource="radio_false"/>
<action function="set">tw_navbar_button_position=0</action>
</button>
@@ -2731,7 +2718,7 @@
<button style="radiobutton">
<condition var1="tw_navbar_button_position" var2="0"/>
<placement x="%col1_x_right%" y="%row5_y%" textplacement="6"/>
- <text>Center navbar buttons</text>
+ <text>{@ctr_navbar_rdo=Center navbar buttons}</text>
<image resource="radio_true"/>
<action function="set">tw_navbar_button_position=0</action>
</button>
@@ -2739,7 +2726,7 @@
<button style="radiobutton">
<condition var1="tw_navbar_button_position" op="!=" var2="1"/>
<placement x="%col1_x_right%" y="%row6a_y%" textplacement="6"/>
- <text>Left align navbar buttons</text>
+ <text>{@lft_navbar_rdo=Left align navbar buttons}</text>
<image resource="radio_false"/>
<action function="set">tw_navbar_button_position=1</action>
</button>
@@ -2747,7 +2734,7 @@
<button style="radiobutton">
<condition var1="tw_navbar_button_position" var2="1"/>
<placement x="%col1_x_right%" y="%row6a_y%" textplacement="6"/>
- <text>Left align navbar buttons</text>
+ <text>{@lft_navbar_rdo=Left align navbar buttons}</text>
<image resource="radio_true"/>
<action function="set">tw_navbar_button_position=1</action>
</button>
@@ -2755,7 +2742,7 @@
<button style="radiobutton">
<condition var1="tw_navbar_button_position" op="!=" var2="2"/>
<placement x="%col1_x_right%" y="%row8_y%" textplacement="6"/>
- <text>Right align navbar buttons</text>
+ <text>{@rht_navbar_rdo=Right align navbar buttons}</text>
<image resource="radio_false"/>
<action function="set">tw_navbar_button_position=2</action>
</button>
@@ -2763,14 +2750,14 @@
<button style="radiobutton">
<condition var1="tw_navbar_button_position" var2="2"/>
<placement x="%col1_x_right%" y="%row8_y%" textplacement="6"/>
- <text>Right align navbar buttons</text>
+ <text>{@rht_navbar_rdo=Right align navbar buttons}</text>
<image resource="radio_true"/>
<action function="set">tw_navbar_button_position=2</action>
</button>
<button style="main_button_half_width">
<placement x="%col2_x_right%" y="%row15a_y%"/>
- <text>Restore Defaults</text>
+ <text>{@restore_defaults_btn=Restore Defaults}</text>
<action function="restoredefaultsettings"/>
</button>
@@ -2790,83 +2777,83 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Time Zone Settings</text>
+ <text>{@time_zone_hdr=Time Zone}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="%tab4_col2_x%" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="%tab5_col2_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<listbox>
<placement x="%col1_x_left%" y="%row3_y%" w="%content_half_width%" h="%listbox_timezone_height%"/>
- <text>Select Time Zone:</text>
+ <text>{@sel_tz_list=Select Time Zone:}</text>
<data name="tw_time_zone_guisel"/>
- <listitem name="(UTC -11) Samoa, Midway Island">BST11;BDT</listitem>
- <listitem name="(UTC -10) Hawaii">HST10;HDT</listitem>
- <listitem name="(UTC -9) Alaska">AST9;ADT</listitem>
- <listitem name="(UTC -8) Pacific Time">PST8;PDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -7) Mountain Time">MST7;MDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -6) Central Time">CST6;CDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -5) Eastern Time">EST5;EDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -4) Atlantic Time">AST4;ADT</listitem>
- <listitem name="(UTC -3) Brazil, Buenos Aires">GRNLNDST3;GRNLNDDT</listitem>
- <listitem name="(UTC -2) Mid-Atlantic">FALKST2;FALKDT</listitem>
- <listitem name="(UTC -1) Azores, Cape Verde">AZOREST1;AZOREDT</listitem>
- <listitem name="(UTC 0) London, Dublin, Lisbon">GMT0;BST,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +1) Berlin, Brussels, Paris">CET-1;CEST,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +3) Moscow, Baghdad">SAUST-3;SAUDT</listitem>
- <listitem name="(UTC +4) Abu Dhabi, Tbilisi, Muscat">WST-4;WDT</listitem>
- <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem>
- <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem>
- <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem>
- <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem>
- <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem>
- <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem>
- <listitem name="(UTC +11) Vladivostok, Solomon Islands">MET-11;METDT</listitem>
- <listitem name="(UTC +12) Auckland, Wellington, Fiji">NZST-12;NZDT</listitem>
+ <listitem name="{@utcm11=(UTC -11) Samoa, Midway Island}">BST11;BDT</listitem>
+ <listitem name="{@utcm10=(UTC -10) Hawaii}">HST10;HDT</listitem>
+ <listitem name="{@utcm9=(UTC -9) Alaska}">AST9;ADT</listitem>
+ <listitem name="{@utcm8=(UTC -8) Pacific Time}">PST8;PDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm7=(UTC -7) Mountain Time}">MST7;MDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm6=(UTC -6) Central Time}">CST6;CDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm5=(UTC -5) Eastern Time}">EST5;EDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm4=(UTC -4) Atlantic Time}">AST4;ADT</listitem>
+ <listitem name="{@utcm3=(UTC -3) Brazil, Buenos Aires}">GRNLNDST3;GRNLNDDT</listitem>
+ <listitem name="{@utcm2=(UTC -2) Mid-Atlantic}">FALKST2;FALKDT</listitem>
+ <listitem name="{@utcm1=(UTC -1) Azores, Cape Verde}">AZOREST1;AZOREDT</listitem>
+ <listitem name="{@utc0=(UTC 0) London, Dublin, Lisbon}">GMT0;BST,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp1=(UTC +1) Berlin, Brussels, Paris}">CET-1;CEST,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp2=(UTC +2) Athens, Istanbul, South Africa}">WET-2;WET,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp3=(UTC +3) Moscow, Baghdad}">SAUST-3;SAUDT</listitem>
+ <listitem name="{@utcp4=(UTC +4) Abu Dhabi, Tbilisi, Muscat}">WST-4;WDT</listitem>
+ <listitem name="{@utcp5=(UTC +5) Yekaterinburg, Islamabad}">PAKST-5;PAKDT</listitem>
+ <listitem name="{@utcp6=(UTC +6) Almaty, Dhaka, Colombo}">TASHST-6;TASHDT</listitem>
+ <listitem name="{@utcp7=(UTC +7) Bangkok, Hanoi, Jakarta}">THAIST-7;THAIDT</listitem>
+ <listitem name="{@utcp8=(UTC +8) Beijing, Singapore, Hong Kong}">TAIST-8;TAIDT</listitem>
+ <listitem name="{@utcp9=(UTC +9) Tokyo, Seoul, Yakutsk}">JST-9;JSTDT</listitem>
+ <listitem name="{@utcp10=(UTC +10) Eastern Australia, Guam}">EET-10;EETDT</listitem>
+ <listitem name="{@utcp11=(UTC +11) Vladivostok, Solomon Islands}">MET-11;METDT</listitem>
+ <listitem name="{@utcp12=(UTC +12) Auckland, Wellington, Fiji}">NZST-12;NZDT</listitem>
</listbox>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row3a_y%"/>
- <text>Select Offset (usually 0): %tw_time_zone_guioffset%</text>
+ <text>{@sel_tz_offset=Select Offset (usually 0): %tw_time_zone_guioffset%}</text>
</text>
<button style="button_quarter_width">
<placement x="%col1_x_right%" y="%row5_y%"/>
- <text>None</text>
+ <text>{@tz_offset_none=None}</text>
<action function="set">tw_time_zone_guioffset=0</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col2_x_right%" y="%row5_y%"/>
- <text>15</text>
+ <text>{@tz_offset_15=15}</text>
<action function="set">tw_time_zone_guioffset=15</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col3_x_right%" y="%row5_y%"/>
- <text>30</text>
+ <text>{@tz_offset_30=30}</text>
<action function="set">tw_time_zone_guioffset=30</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col4_x_right%" y="%row5_y%"/>
- <text>45</text>
+ <text>{@tz_offset_45=45}</text>
<action function="set">tw_time_zone_guioffset=45</action>
</button>
<checkbox>
<placement x="%col1_x_right%" y="%row7_y%"/>
<font resource="font_m" color="%text_color%"/>
- <text>Use daylight savings time (DST)</text>
+ <text>{@use_dst_chk=Use daylight savings time (DST)}</text>
<data variable="tw_time_zone_guidst"/>
<image checked="checkbox_true" unchecked="checkbox_false"/>
</checkbox>
@@ -2874,14 +2861,14 @@
<text color="%text_color%">
<font resource="font_m"/>
<placement x="%col1_x_right%" y="%row9_y%"/>
- <text>Current Time Zone: %tw_time_zone%</text>
+ <text>{@curr_tz=Current Time Zone: %tw_time_zone%}</text>
</text>
<button>
<highlight color="%highlight_color%"/>
<placement x="%col2_x_right%" y="%row15a_y%"/>
<font resource="font_m" color="%text_button_color%"/>
- <text>Set Time Zone</text>
+ <text>{@set_tz_btn=Set Time Zone}</text>
<image resource="main_button_half_width"/>
<action function="setguitimezone"/>
</button>
@@ -2902,18 +2889,18 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Screen Settings</text>
+ <text>{@settings_screen_hdr=Screen Settings}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="%center_x%" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="%tab5_col3_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<button>
@@ -2921,7 +2908,7 @@
<font resource="font_m" color="%text_color%"/>
<condition var1="tw_screen_timeout_secs" op="=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
- <text>Enable screen timeout.</text>
+ <text>{@enable_timeout_chk=Enable screen timeout}</text>
<image resource="checkbox_false"/>
<action function="set">tw_screen_timeout_secs=60</action>
</button>
@@ -2931,7 +2918,7 @@
<font resource="font_m" color="%text_color%"/>
<condition var1="tw_screen_timeout_secs" op="!=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
- <text>Enable screen timeout.</text>
+ <text>{@enable_timeout_chk=Enable screen timeout}</text>
<image resource="checkbox_true"/>
<action function="set">tw_screen_timeout_secs=0</action>
</button>
@@ -2940,14 +2927,14 @@
<condition var1="tw_screen_timeout_secs" op="!=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
<placement x="col1_x_left" y="%row5_y%" w="%content_width%"/>
- <text>Screen timeout in seconds:</text>
+ <text>{@screen_to_slider=Screen timeout in seconds:}</text>
<data variable="tw_screen_timeout_secs" min="15" max="300"/>
</slidervalue>
<slidervalue>
<condition var1="tw_has_brightnesss_file" var2="1"/>
<placement x="col1_x_left" y="%row10_y%" w="%content_width%"/>
- <text>Brightness: %tw_brightness_pct%%</text>
+ <text>{@screen_bright_slider=Brightness: %tw_brightness_pct%%}</text>
<data variable="tw_brightness_pct" min="10" max="100"/>
<actions>
<action function="set">tw_brightness=%tw_brightness_max%</action>
@@ -2973,35 +2960,35 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Vibration Settings</text>
+ <text>{@vibration_hdr=Vibration}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="%tab4_col4_x%" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="%tab5_col4_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<slidervalue>
<placement x="col1_x_left" y="%row4_y%" w="%content_width%"/>
- <text>Button Vibration:</text>
+ <text>{@button_vibration=Button Vibration:}</text>
<data variable="tw_button_vibrate" min="0" max="300"/>
</slidervalue>
<slidervalue>
<placement x="col1_x_left" y="%row9_y%" w="%content_width%"/>
- <text>Keyboard Vibration:</text>
+ <text>{@kb_vibration=Keyboard Vibration:}</text>
<data variable="tw_keyboard_vibrate" min="0" max="300"/>
</slidervalue>
<slidervalue>
<placement x="col1_x_left" y="%row14_y%" w="%content_width%"/>
- <text>Action Vibration:</text>
+ <text>{@act_vibration=Action Vibration:}</text>
<data variable="tw_action_vibrate" min="0" max="500"/>
</slidervalue>
@@ -3016,83 +3003,126 @@
</action>
</page>
+ <page name="settings_language">
+ <template name="page"/>
+
+ <text style="text_l">
+ <placement x="%col1_x_header%" y="%row3_header_y%"/>
+ <text>{@settings_hdr=Settings}</text>
+ </text>
+
+ <text style="text_m">
+ <placement x="%col1_x_header%" y="%row4_header_y%"/>
+ <text>{@language_hdr=Language - %tw_language_display%}</text>
+ </text>
+
+ <template name="tabs_settings"/>
+
+ <fill color="%text_color%">
+ <placement x="%tab5_col5_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
+ </fill>
+
+ <listbox>
+ <placement x="%indent%" y="%row3_y%" w="%fileselector_filemanager_height%" h="%listbox_settings_height%"/>
+ <text>{@select_language=Select Language:}</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <data name="tw_language" />
+ </listbox>
+
+ <button style="main_button_half_width_low">
+ <placement x="%col_button_right%" y="%row16a_y%"/>
+ <text>{@set_language_btn=Set Language}</text>
+ <action function="setlanguage"></action>
+ </button>
+
+ <action>
+ <touch key="home" />
+ <action function="page">main</action>
+ </action>
+
+ <action>
+ <touch key="back" />
+ <action function="page">settings</action>
+ </action>
+ </page>
+
<page name="advanced">
<template name="page"/>
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<button style="main_button">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Copy Log to SD</text>
+ <text>{@copy_log_btn=Copy Log}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=copylog</action>
- <action function="set">tw_text1=Copy Log to SD Card?</action>
- <action function="set">tw_action_text1=Copying Log to SD Card...</action>
- <action function="set">tw_complete_text1=Log Copy Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@copy_log_confirm=Copy Log to SD Card?}</action>
+ <action function="set">tw_action_text1={@copying_log=Copying Log to SD Card...}</action>
+ <action function="set">tw_complete_text1={@copy_log_complete=Log Copy Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row2_y%"/>
- <text>Fix Permissions</text>
+ <text>{@fix_perm_btn=Fix Permissions}</text>
<action function="page">fixperms</action>
</button>
<button style="main_button">
<condition var1="tw_allow_partition_sdcard" var2="1"/>
<placement x="%col1_x_left%" y="%row6a_y%"/>
- <text>Partition SD Card</text>
+ <text>{@part_sd_btn=Partition SD Card}</text>
<action function="page">partsdcard</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row6a_y%"/>
- <text>File Manager</text>
+ <text>{@file_manager_btn=File Manager}</text>
<action function="page">filemanagerlist</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Terminal</text>
+ <text>{@terminal_btn=Terminal}</text>
<action function="page">terminalfolder</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row11_y%"/>
- <text>Reload Theme</text>
+ <text>{@reload_theme_btn=Reload Theme}</text>
<action function="reload"/>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row15a_y%"/>
- <text>ADB Sideload</text>
+ <text>{@adb_sideload_btn=ADB Sideload}</text>
<action function="page">sideload</action>
</button>
<button style="main_button">
<condition var1="tw_show_dumlock" var2="1"/>
<placement x="%center_x%" y="%row15a_y%"/>
- <text>HTC Dumlock</text>
+ <text>{@dumlock_btn=HTC Dumlock}</text>
<action function="page">htcdumlock</action>
</button>
<button style="main_button">
<condition var1="tw_has_injecttwrp" var2="1"/>
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Re-Inject TWRP</text>
+ <text>{@inject_twrp_btn=Inject TWRP}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=reinjecttwrp</action>
- <action function="set">tw_text1=Re-Inject TWRP?</action>
- <action function="set">tw_action_text1=Re-Injecting TWRP...</action>
- <action function="set">tw_complete_text1=TWRP Injection Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action>
+ <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action>
+ <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -3113,27 +3143,27 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Partition SD Card</text>
+ <text>{@part_sd_hdr=Partition SD Card}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>You will lose all files on your SD card!</text>
+ <text>{@part_sd_lose=You will lose all files on your SD card!}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>This action cannot be undone!</text>
+ <text>{@part_sd_undo=This action cannot be undone!}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>EXT Size:</text>
+ <text>{@part_sd_ext_sz=EXT Size:}</text>
</text>
<text style="text_m">
@@ -3143,19 +3173,19 @@
<button style="button_quarter_width">
<placement x="%btn4_col3_x_left%" y="%row5_y%"/>
- <text>-</text>
+ <text>{@part_sd_m=-}</text>
<action function="addsubtract">tw_sdext_size-128</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col2_x_right%" y="%row5_y%"/>
- <text>+</text>
+ <text>{@part_sd_p=+}</text>
<action function="addsubtract">tw_sdext_size+128</action>
</button>
<text style="text_m_accent">
<placement x="%center_x%" y="%row9_y%" placement="5"/>
- <text>Swap Size:</text>
+ <text>{@part_sd_swap_sz=Swap Size:}</text>
</text>
<text style="text_m">
@@ -3165,19 +3195,19 @@
<button style="button_quarter_width">
<placement x="%btn4_col3_x_left%" y="%row9_y%"/>
- <text>-</text>
+ <text>{@part_sd_m=-}</text>
<action function="addsubtract">tw_swap_size-32</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col2_x_right%" y="%row9_y%"/>
- <text>+</text>
+ <text>{@part_sd_p=+}</text>
<action function="addsubtract">tw_swap_size+32</action>
</button>
<text style="text_m_accent">
<placement x="%center_x%" y="%row13_y%" placement="5"/>
- <text>File System:</text>
+ <text>{@file_system=File System:}</text>
</text>
<text style="text_m">
@@ -3198,7 +3228,7 @@
</button>
<slider style="slider_centered">
- <text>Swipe to Partition</text>
+ <text>{@swipe_part_sd=Swipe to Partition}</text>
<action function="page">partsdcardaction</action>
<actions>
<action function="set">tw_back=partsdcard</action>
@@ -3206,9 +3236,9 @@
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=set</action>
<action function="set">tw_action2_param=tw_zip_location=/sdcard</action>
- <action function="set">tw_action_text1=Partitioning SD Card...</action>
- <action function="set">tw_action_text2=This will take a few minutes.</action>
- <action function="set">tw_complete_text1=Partitioning Complete</action>
+ <action function="set">tw_action_text1={@partitioning_sd=Partitioning SD Card...}</action>
+ <action function="set">tw_action_text2={@partitioning_sd2=This will take a few minutes.}</action>
+ <action function="set">tw_complete_text1={@part_sd_complete=Partitioning Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -3229,52 +3259,52 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>HTC Dumlock</text>
+ <text>{@dumlock_hdr=HTC Dumlock}</text>
</text>
<button style="main_button_m">
<placement x="%col2_x_left%" y="%row2_y%"/>
- <text>Restore Original Boot</text>
+ <text>{@dumlock_restore_btn=Restore Original Boot}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=htcdumlockrestoreboot</action>
- <action function="set">tw_text1=Restore original boot image?</action>
- <action function="set">tw_action_text1=Restoring Original Boot...</action>
- <action function="set">tw_complete_text1=Restore Original Boot Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@dumlock_restore_confirm=Restore original boot image?}</action>
+ <action function="set">tw_action_text1={@dumlock_restoring=Restoring Original Boot...}</action>
+ <action function="set">tw_complete_text1={@dumlock_restore_complete=Restore Original Boot Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_m">
<placement x="%col2_x_left%" y="%row6a_y%"/>
- <text>Reflash Recovery</text>
+ <text>{@dumlock_reflash_btn=Reflash Recovery}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=htcdumlockreflashrecovery</action>
- <action function="set">tw_text1=Reflash recovery to boot?</action>
- <action function="set">tw_action_text1=Flashing recovery to boot...</action>
- <action function="set">tw_complete_text1=Recovery Flash to Boot Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@dumlock_reflash_confirm=Reflash recovery to boot?}</action>
+ <action function="set">tw_action_text1={@dumlock_reflashing=Flashing recovery to boot...}</action>
+ <action function="set">tw_complete_text1={@dumlock_reflash_complete=Recovery Flash to Boot Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_m">
<placement x="%col2_x_left%" y="%row11_y%"/>
- <text>Install HTC Dumlock</text>
+ <text>{@dumlock_install_btn=Install HTC Dumlock}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=installhtcdumlock</action>
- <action function="set">tw_text1=Install HTC dumlock files to ROM?</action>
- <action function="set">tw_action_text1=Installing HTC Dumlock...</action>
- <action function="set">tw_complete_text1=HTC Dumlock Install Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@dumlock_install_confirm=Install HTC dumlock files to ROM?}</action>
+ <action function="set">tw_action_text1={@dumlock_installing=Installing HTC Dumlock...}</action>
+ <action function="set">tw_complete_text1={@dumlock_install_complete=HTC Dumlock Install Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -3299,7 +3329,7 @@
</image>
<slider style="slider_centered">
- <text>Swipe to Unlock</text>
+ <text>{@swipe_to_unlock=Swipe to Unlock}</text>
<action function="overlay"/>
</slider>
</page>
@@ -3309,12 +3339,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select a File or Folder</text>
+ <text>{@fm_sel_file=Select a File or Folder}</text>
</text>
<template name="sort_options"/>
@@ -3330,18 +3360,18 @@
<button style="main_button_half_width_low">
<placement x="%col_button_right%" y="%row16a_y%"/>
- <text>Select current Folder</text>
+ <text>{@fm_sel_curr_folder=Select Current Folder}</text>
<actions>
<action function="set">tw_filename1=tw_file_location1</action>
<action function="set">tw_fm_isfolder=1</action>
- <action function="set">tw_fm_type=Folder</action>
+ <action function="set">tw_fm_type={@fm_type_folder=Folder}</action>
<action function="page">filemanageroptions</action>
</actions>
</button>
<action>
<actions>
- <action function="set">tw_fm_type=File</action>
+ <action function="set">tw_fm_type={@fm_type_file=File}</action>
<action function="set">tw_fm_isfolder=0</action>
</actions>
</action>
@@ -3367,17 +3397,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Choose Action</text>
+ <text>{@fm_choose_act=Choose Action}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>%tw_fm_type% selected:</text>
+ <text>{@fm_selected=%tw_fm_type% selected:}</text>
</text>
<text style="text_m">
@@ -3388,10 +3418,10 @@
<button style="main_button_half_width">
<condition var1="tw_fm_isfolder" var2="0"/>
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Copy File</text>
+ <text>{@fm_copy_file_btn=Copy File}</text>
<actions>
<action function="set">tw_filemanager_command=cp</action>
- <action function="set">tw_fm_text1=Copying</action>
+ <action function="set">tw_fm_text1={@fm_copying=Copying}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
@@ -3399,30 +3429,30 @@
<button style="main_button_half_width">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Copy Folder</text>
+ <text>{@fm_copy_folder_btn=Copy Folder}</text>
<actions>
<action function="set">tw_filemanager_command=cd "%tw_file_location1%" &amp;&amp; cd .. &amp;&amp; cp -R</action>
- <action function="set">tw_fm_text1=Copying</action>
+ <action function="set">tw_fm_text1={@fm_copying=Copying}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row11_y%"/>
- <text>Move</text>
+ <text>{@fm_move_btn=Move}</text>
<actions>
<action function="set">tw_filemanager_command=mv</action>
- <action function="set">tw_fm_text1=Moving</action>
+ <action function="set">tw_fm_text1={@fm_moving=Moving}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>chmod 755</text>
+ <text>{@fm_chmod755_btn=chmod 755}</text>
<actions>
<action function="set">tw_filemanager_command=chmod 755</action>
- <action function="set">tw_fm_text1=chmod 755</action>
+ <action function="set">tw_fm_text1={@fm_chmod755ing=chmod 755}</action>
<action function="set">tw_fm_text2=</action>
<action function="set">tw_fm_text3=</action>
<action function="set">tw_include_text3=0</action>
@@ -3433,7 +3463,7 @@
<button style="main_button_half_width">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>chmod</text>
+ <text>{@fm_chmod_btn=chmod}</text>
<actions>
<action function="set">tw_filemanager_rename=0000</action>
<action function="set">tw_fm_text2=</action>
@@ -3446,10 +3476,10 @@
<button style="main_button_half_width">
<placement x="%col2_x_right%" y="%row11_y%"/>
- <text>Delete</text>
+ <text>{@fm_delete_btn=Delete}</text>
<actions>
<action function="set">tw_filemanager_command=rm -rf</action>
- <action function="set">tw_fm_text1=Deleting</action>
+ <action function="set">tw_fm_text1={@fm_deleting=Deleting}</action>
<action function="set">tw_fm_text2=</action>
<action function="set">tw_fm_text3=</action>
<action function="set">tw_include_text3=0</action>
@@ -3461,10 +3491,10 @@
<button style="main_button_half_width">
<condition var1="tw_fm_isfolder" var2="0"/>
<placement x="%center_x%" y="%row11_y%"/>
- <text>Rename File</text>
+ <text>{@fm_rename_file_btn=Rename File}</text>
<actions>
<action function="set">tw_filemanager_rename=tw_selection1</action>
- <action function="set">tw_fm_text1=Renaming</action>
+ <action function="set">tw_fm_text1={@fm_renaming=Renaming}</action>
<action function="set">tw_filemanager_command=mv</action>
<action function="page">filemanagerrenamefile</action>
</actions>
@@ -3473,10 +3503,10 @@
<button style="main_button_half_width">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%center_x%" y="%row11_y%"/>
- <text>Rename Folder</text>
+ <text>{@fm_rename_folder_btn=Rename Folder}</text>
<actions>
<action function="set">tw_filemanager_rename=tw_selection1</action>
- <action function="set">tw_fm_text1=Renaming</action>
+ <action function="set">tw_fm_text1={@fm_renaming=Renaming}</action>
<action function="set">tw_filemanager_command=cd "%tw_file_location1%" &amp;&amp; cd .. &amp;&amp; mv</action>
<action function="page">filemanagerrenamefolder</action>
</actions>
@@ -3498,12 +3528,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select Destination Folder</text>
+ <text>{@fm_sel_dest=Select Destination Folder}</text>
</text>
<template name="sort_options"/>
@@ -3519,7 +3549,7 @@
<button style="main_button_half_width_low">
<placement x="%col_button_right%" y="%row16a_y%"/>
- <text>Select current Folder</text>
+ <text>{@fm_sel_curr_folder=Select Current Folder}</text>
<actions>
<action function="set">tw_fm_text2=to</action>
<action function="set">tw_fm_text3=%tw_file_location2%</action>
@@ -3545,17 +3575,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Rename %tw_fm_type%</text>
+ <text>{@fm_rename_hdr=Rename} %tw_fm_type%</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -3578,7 +3608,7 @@
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -3600,17 +3630,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Rename %tw_fm_type%</text>
+ <text>{@fm_rename_hdr=Rename} %tw_fm_type%</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -3633,7 +3663,7 @@
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -3655,17 +3685,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Set Permissions</text>
+ <text>{@fm_set_perms_hdr=Set Permissions}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Permissions:</text>
+ <text>{@fm_perms=Permissions:}</text>
</text>
<input>
@@ -3687,7 +3717,7 @@
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row5_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -3709,12 +3739,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Confirm Action</text>
+ <text>{@confirm_action=Confirm Action}</text>
</text>
<text style="text_m_accent">
@@ -3739,11 +3769,11 @@
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider style="slider_centered">
- <text>Swipe to Confirm</text>
+ <text>{@swipe_to_confirm=Swipe to Confirm}</text>
<action function="page">filemanageraction</action>
</slider>
@@ -3763,7 +3793,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
@@ -3782,7 +3812,7 @@
</conditions>
<actions>
<action function="set">tw_back=filemanagerlist</action>
- <action function="set">tw_complete_text1=File Operation Complete</action>
+ <action function="set">tw_complete_text1={@fm_complete=File Operation Complete}</action>
<action function="page">action_complete</action>
</actions>
</action>
@@ -3793,7 +3823,7 @@
<condition var1="tw_operation_status" op="!=" var2="0"/>
</conditions>
<actions>
- <action function="set">tw_complete_text1=File Operation Complete</action>
+ <action function="set">tw_complete_text1={@fm_complete=File Operation Complete}</action>
<action function="page">action_complete</action>
</actions>
</action>
@@ -3819,17 +3849,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_hdr=Decrypt Data}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Enter Password:</text>
+ <text>{@decrypt_data_enter_pass=Enter Password:}</text>
</text>
<input>
@@ -3852,12 +3882,12 @@
<text style="text_m_fail">
<condition var1="tw_password_fail" var2="1"/>
<placement x="%col1_x_left%" y="%row5_y%"/>
- <text>Password failed, please try again!</text>
+ <text>{@decryt_data_failed=Password failed, please try again!}</text>
</text>
<button style="main_button_half_width_low">
<placement x="%indent%" y="%row6_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">main</action>
@@ -3872,17 +3902,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_hdr=Decrypt Data}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Enter Pattern:</text>
+ <text>{@decrypt_data_enter_pattern=Enter Pattern.}</text>
</text>
<patternpassword>
@@ -3896,7 +3926,7 @@
<button style="main_button_half_width">
<placement x="%col2_x_right%" y="%row15a_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">main</action>
@@ -3909,12 +3939,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Decrypt Data - Trying Decryption</text>
+ <text>{@decrypt_data_trying=Trying Decryption}</text>
</text>
<template name="console"/>
@@ -3953,12 +3983,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Terminal Command</text>
+ <text>{term_hdr=Terminal Command}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Browse to Starting Folder</text>
+ <text>{@term_sel_folder_hdr=Browse to Starting Folder}</text>
</text>
<template name="sort_options"/>
@@ -3974,7 +4004,7 @@
<button style="main_button_half_width_low">
<placement x="%col_button_right%" y="%row16a_y%"/>
- <text>Select current Folder</text>
+ <text>{@fm_sel_curr_folder=Select Current Folder}</text>
<action function="page">terminalcommand</action>
</button>
@@ -4015,7 +4045,7 @@
<highlight color="%highlight_color%"/>
<placement x="%btn4_col4_x_right%" y="%row7a_y%"/>
<font resource="font_m" color="%text_button_color%"/>
- <text>Kill</text>
+ <text>{@term_kill_btn=Kill}</text>
<image resource="tab_4"/>
<action function="killterminal"/>
</button>
@@ -4038,35 +4068,35 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>ADB Sideload</text>
+ <text>{@adb_sideload_hdr=ADB Sideload}</text>
</text>
<checkbox>
<placement x="%col1_x_left%" y="%row2_y%"/>
- <text>Wipe Dalvik Cache</text>
+ <text>{@sideload_wipe_dalvik_chk=Wipe Dalvik Cache}</text>
<data variable="tw_wipe_dalvik"/>
</checkbox>
<checkbox>
<placement x="%col1_x_left%" y="%row3a_y%"/>
- <text>Wipe Cache</text>
+ <text>{@sideload_wipe_cache_chk=Wipe Cache}</text>
<data variable="tw_wipe_cache"/>
</checkbox>
<slider style="slider_centered">
- <text>Swipe to start Sideload</text>
+ <text>{@swipe_to_sideload=Swipe to Start Sideload}</text>
<action function="page">partsdcardaction</action>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=adbsideload</action>
- <action function="set">tw_action_text1=ADB Sideload</action>
- <action function="set">tw_action_text2=Usage: adb sideload filename.zip</action>
- <action function="set">tw_complete_text1=ADB Sideload Complete</action>
+ <action function="set">tw_action_text1={@sideload_confirm=ADB Sideload}</action>
+ <action function="set">tw_action_text2={@sideload_usage=Usage: adb sideload filename.zip}</action>
+ <action function="set">tw_complete_text1={@sideload_complete=ADB Sideload Complete}</action>
<action function="set">tw_has_cancel=1</action>
<action function="set">tw_show_reboot=1</action>
<action function="set">tw_cancel_action=adbsideloadcancel</action>
@@ -4090,43 +4120,43 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Fix Permissions</text>
+ <text>{@fix_perms_hdr=Fix Permissions}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Note: Fixing permissions is rarely needed.</text>
+ <text>{@fix_perms_note=Note: Fixing permissions is rarely needed.}</text>
</text>
<checkbox>
<placement x="%col2_x_left%" y="%row4_y%"/>
- <text>Also fix SELinux Contexts</text>
+ <text>{@fix_perms_selinux_chk=Also fix SELinux Contexts}</text>
<data variable="tw_fixperms_restorecon"/>
</checkbox>
<text style="text_m_fail">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>Fixing SELinux Contexts may cause</text>
+ <text>{@fix_perms_sel_note1=Fixing SELinux Contexts may cause}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>your device to not boot properly.</text>
+ <text>{@fix_perms_sel_note2=your device to not boot properly.}</text>
</text>
<slider style="slider_centered">
- <text>Swipe to Fix Permissions</text>
+ <text>{@swipe_to_fix_perms=Swipe to Fix Permissions}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=fixpermissions</action>
- <action function="set">tw_action_text1=Fixing Permissions...</action>
- <action function="set">tw_complete_text1=Fix Permissions Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_action_text1={@fixing_perms=Fixing Permissions...}</action>
+ <action function="set">tw_complete_text1={@fix_perms_complete=Fix Permissions Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_page</action>
</actions>
@@ -4148,40 +4178,40 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Reboot</text>
+ <text>{@reboot_hdr=Reboot}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>SuperSU Check</text>
+ <text>{@su_hdr=SuperSU Check}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Your device does not appear to be rooted.</text>
+ <text>{@su_note1=Your device does not appear to be rooted.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Install SuperSU now?</text>
+ <text>{@su_note2=Install SuperSU now?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>This will root your device.</text>
+ <text>{@su_note3=This will root your device.}</text>
</text>
<button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row15a_y%"/>
- <text>Do not Install</text>
+ <text>{@su_cancel=Do not Install}</text>
<action function="set">tw_page_done=1</action>
</button>
<slider>
- <text>Swipe to Install</text>
+ <text>{@swipe_su_to_install=Swipe to Install}</text>
<actions>
<action function="set">tw_action=installsu</action>
- <action function="set">tw_action_text1=Installing SuperSU</action>
+ <action function="set">tw_action_text1={@su_installing=Installing SuperSU}</action>
<action function="set">tw_action_text2=</action>
<action function="page">singleaction_page</action>
</actions>
@@ -4219,14 +4249,14 @@
</fill>
<partitionlist style="partitionlist_storage">
- <text>Select Storage</text>
+ <text>{@sel_storage_list=Select Storage}</text>
<data name="tw_storage_path"/>
<listtype name="storage"/>
</partitionlist>
<button style="button_third_width">
<placement x="%dialog_button_x%" y="%row13_y%"/>
- <text>OK</text>
+ <text>{@ok_btn=OK}</text>
<actions>
<action function="set">tw_clear_destination=%tw_back%</action>
<action function="overlay"/>
diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml
new file mode 100755
index 000000000..62b5b3dd4
--- /dev/null
+++ b/gui/theme/common/languages/en.xml
@@ -0,0 +1,666 @@
+<?xml version="1.0"?>
+
+<language>
+ <display>English</display>
+
+ <resources>
+ <!-- Font overrides - only change these if your language requires special characters -->
+ <resource name="font_l" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="font_m" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="font_s" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" />
+
+ <!-- Partition display names -->
+ <string name="system">System</string>
+ <string name="system_image">System Image</string>
+ <string name="vendor">Vendor</string>
+ <string name="vendor_image">Vendor Image</string>
+ <string name="boot">Boot</string>
+ <string name="recovery">Recovery</string>
+ <string name="cache">Cache</string>
+ <string name="data">Data</string>
+ <string name="sdcard">SDCard</string>
+ <string name="internal">Internal Storage</string>
+ <string name="microsd">Micro SDCard</string>
+ <string name="usbotg">USB OTG</string>
+ <string name="android_secure">Android Secure</string>
+ <string name="dalvik">Dalvik / ART Cache</string>
+ <!-- This is a rarely used partition on a Micro SD card for a very old app2sd system -->
+ <string name="sdext">SD-EXT</string>
+ <string name="adopted_data">Adopted Data</string>
+ <string name="adopted_storage">Adopted Storage</string>
+
+ <!-- GUI XML strings -->
+ <string name="twrp_header">Team Win Recovery Project</string>
+ <string name="twrp_watch_header">TWRP %tw_version%</string>
+ <string name="cpu_temp">CPU: %tw_cpu_temp% &#xB0;C</string>
+ <string name="battery_pct">Battery: %tw_battery%</string>
+ <string name="sort_by_name">Sort by Name</string>
+ <string name="sort_by_date">Sort by Date</string>
+ <string name="sort_by_size">Sorty by Size</string>
+ <string name="sort_by_name_only">Name</string>
+ <string name="sort_by_date_only">Date</string>
+ <string name="sort_by_size_only">Size</string>
+ <string name="tab_general">GENERAL</string>
+ <string name="tab_options">OPTIONS</string>
+ <string name="tab_backup">BACKUP</string>
+ <string name="tab_time_zone">TIME ZONE</string>
+ <string name="tab_screen">SCREEN</string>
+ <string name="tab_vibration">VIBRATION</string>
+ <string name="tab_language">LANGUAGE</string>
+
+ <string name="install_btn">Install</string>
+ <string name="wipe_btn">Wipe</string>
+ <string name="backup_btn">Backup</string>
+ <string name="restore_btn">Restore</string>
+ <string name="mount_btn">Mount</string>
+ <string name="settings_btn">Settings</string>
+ <string name="advanced_btn">Advanced</string>
+ <string name="reboot_btn">Reboot</string>
+ <string name="files_btn">Files</string>
+ <string name="copy_log_btn">Copy Log</string>
+ <string name="select_type_hdr">Select Type</string>
+ <string name="install_zip_hdr">Install Zip</string>
+ <string name="install_zip_btn">Install Zip</string>
+ <string name="install_image_hdr">Install Image</string>
+ <string name="install_image_btn">Install Image</string>
+ <string name="install_select_file_hdr">Select File</string>
+ <string name="file_selector_folders_hdr">Folders</string>
+ <string name="select_file_from_storage">Select File from %tw_storage_display_name% (%tw_storage_free_size% MB)</string>
+ <string name="adb_sideload_btn">ADB Sideload</string>
+ <string name="install_hdr">Install</string>
+ <string name="select_storage_hdr">Select Storage</string>
+ <string name="select_storage_btn">Select Storage</string>
+ <string name="queue_hdr">Queue</string>
+ <string name="zip_queue_count">%tw_zip_queue_count% of max of 10 Files queued</string>
+ <string name="zip_queue_count_s">File %tw_zip_queue_count% of 10:</string>
+ <string name="zip_warn1">This operation may install incompatible</string>
+ <string name="zip_warn2">software and render your device unusable.</string>
+ <string name="zip_back_cancel">Press back to cancel adding this zip.</string>
+ <string name="zip_back_clear">Press back button to clear the queue.</string>
+ <string name="folder">Folder:</string>
+ <string name="file">File:</string>
+ <string name="zip_sig_chk">Zip signature verification</string>
+ <string name="inject_twrp_chk">Inject TWRP after install</string>
+ <string name="options_hdr">Options</string>
+ <string name="confirm_flash_hdr">Confirm Flash</string>
+ <string name="zip_queue">Queue:</string>
+ <string name="options">Options:</string>
+ <string name="swipe_confirm"> Confirm</string>
+ <string name="zip_add_btn">Add more Zips</string>
+ <string name="zip_clear_btn">Clear Zip Queue</string>
+ <string name="install_zip_count_hdr">Install Zip %tw_zip_index% of %tw_zip_queue_count%</string>
+ <string name="installing_zip">Installing Zip: %tw_file%</string>
+ <string name="failed">Failed</string>
+ <string name="successful">Successful</string>
+ <string name="install_failed">Installation Failed</string>
+ <string name="install_successful">Installation Successful</string>
+ <string name="wipe_cache_dalvik_btn">Wipe cache/dalvik</string>
+ <string name="reboot_system_btn">Reboot System</string>
+ <string name="install_sel_target">Select Target Partition</string>
+ <string name="flash_image_select">Select Partition to Flash Image:</string>
+ <string name="target_partition">Target Partition:</string>
+ <string name="flashing_image">Flashing Image...</string>
+ <string name="image_flashed">Image Flashed</string>
+ <string name="wipe_cache_dalvik_confirm">Wipe Cache &amp; Dalvik?</string>
+ <string name="wiping_cache_dalvik">Wiping Cache &amp; Dalvik...</string>
+ <string name="wipe_cache_dalvik_complete">Cache &amp; Dalvik Wipe Complete</string>
+ <string name="swipe_wipe">Swipe to Wipe</string>
+ <string name="swipe_wipe_s"> Wipe</string>
+ <string name="no_os1">No OS Installed! Are you</string>
+ <string name="no_osrb">sure you wish to reboot?</string>
+ <string name="no_ospo">sure you wish to power off?</string>
+ <string name="rebooting">Rebooting...</string>
+ <string name="swipe_reboot_s"> Reboot</string>
+ <string name="swipe_flash">Swipe to confirm Flash</string>
+ <string name="confirm_action">Confirm Action</string>
+ <string name="back_cancel">Press back button to cancel.</string>
+ <string name="cancel_btn">Cancel</string>
+ <string name="wipe_hdr">Wipe</string>
+ <string name="factory_reset_hdr">Factory Reset</string>
+ <string name="factory_reset_btn">Factory Reset</string>
+ <string name="factory_reset1">Wipes Data, Cache, and Dalvik</string>
+ <string name="factory_reset2">(not including internal storage)</string>
+ <string name="factory_reset3">Most of the time this is</string>
+ <string name="factory_reset4">the only wipe that you need.</string>
+ <string name="factory_resetting">Factory Reset...</string>
+ <string name="advanced_wipe_hdr">Advanced Wipe</string>
+ <string name="advanced_wipe_btn">Advanced Wipe</string>
+ <string name="wipe_enc_confirm">Wipe Encryption from Data?</string>
+ <string name="formatting_data">Formatting Data...</string>
+ <string name="swipe_format_data">Swipe to Format Data</string>
+ <string name="swipe_format_data_s"> Format Data</string>
+ <string name="factory_reset_complete">Factory Reset Complete</string>
+ <string name="sel_part_hdr">Select Partitions</string>
+ <string name="wipe_sel_confirm">Wipe Selected Partition(s)?</string>
+ <string name="wiping_part">Wiping Partition(s)...</string>
+ <string name="wipe_complete">Wipe Complete</string>
+ <string name="sel_part_wipe">Select Partitions to Wipe:</string>
+ <string name="invalid_part_sel">Invalid partition selection</string>
+ <string name="format_data_hdr">Format Data</string>
+ <string name="format_data_btn">Format Data</string>
+ <string name="format_data_ptr1">Format Data will wipe all of your apps,</string>
+ <string name="format_data_ptr2">backups, pictures, videos, media, and</string>
+ <string name="format_data_ptr3">removes encryption on internal storage.</string>
+ <string name="format_data_lcp1">Format Data will wipe all of your apps, backups, pictures, videos, media, and</string>
+ <string name="format_data_lcp2">removes encryption on internal storage.</string>
+ <string name="format_data_wtc1">Format Data will wipe all of your apps,</string>
+ <string name="format_data_wtc2">backups and media. This cannot be undone.</string>
+ <string name="format_data_undo">This cannot be undone.</string>
+ <string name="format_data_complete">Data Format Complete</string>
+ <string name="yes_continue">Type yes to continue. Press back to cancel.</string>
+ <string name="part_opt_hdr">Partition Options for: %tw_partition_name%</string>
+ <string name="sel_act_hdr">Select Action</string>
+ <string name="file_sys_opt">File System Options</string>
+ <string name="partition">Partition: %tw_partition_name%</string>
+ <string name="part_mount_point">Mount Point: %tw_partition_mount_point%</string>
+ <string name="part_curr_fs">File system: %tw_partition_file_system%</string>
+ <string name="part_present_yes">Present: Yes</string>
+ <string name="part_present_no">Present: No</string>
+ <string name="part_removable_yes">Removable: Yes</string>
+ <string name="part_removable_no">Removable: No</string>
+ <string name="part_size">Size: %tw_partition_size%MB</string>
+ <string name="part_used">Used: %tw_partition_used%MB</string>
+ <string name="part_free">Free: %tw_partition_free%MB</string>
+ <string name="part_backup_size">Backup Size: %tw_partition_backup_size%MB</string>
+ <string name="resize_btn">Resize File System</string>
+ <string name="resize_btn_s">Resize</string>
+ <string name="resize_confirm">Resize %tw_partition_name%?</string>
+ <string name="resizing">Resizing...</string>
+ <string name="resize_complete">Resize Complete</string>
+ <string name="swipe_resize">Swipe to Resize</string>
+ <string name="swipe_resize_s"> Resize</string>
+ <string name="repair_btn">Repair File System</string>
+ <string name="repair_btn_s">Repair</string>
+ <string name="repair_confirm">Repair %tw_partition_name%?</string>
+ <string name="repairing">Repairing...</string>
+ <string name="repair_complete">Repair Complete</string>
+ <string name="swipe_repair">Swipe to Repair</string>
+ <string name="swipe_repair_s"> Repair</string>
+ <string name="change_fs_btn">Change File System</string>
+ <string name="change_fs_btn_s">Change</string>
+ <string name="change_fs_for_hdr">Change File System for: %tw_partition_name%</string>
+ <string name="change_fs_for_hdr_s">Partition: %tw_partition_name% &gt; Select File System</string>
+ <string name="change_fs_warn1">Some ROMs or kernels may not support some</string>
+ <string name="change_fs_warn2">file systems. Proceed with caution!</string>
+ <string name="change_fs_confirm">Change %tw_partition_name%?</string>
+ <string name="formatting">Formatting...</string>
+ <string name="format_complete">Format Complete</string>
+ <string name="swipe_change_fs">Swipe to Change</string>
+ <string name="swipe_change_s"> Change</string>
+ <string name="back_btn">Back</string>
+ <string name="wipe_enc_btn">Wipe Encryption</string>
+ <string name="swipe_factory_reset">Swipe to Factory Reset</string>
+ <string name="repair_change_btn">Repair or Change File System</string>
+ <string name="storage_hdr">Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</string>
+ <string name="backup_hdr">Backup</string>
+ <string name="backup_confirm_hdr">Confirm Backup</string>
+ <string name="encryption_tab">ENCRYPTION</string>
+ <string name="encryption">Encryption:</string>
+ <string name="name">Name:</string>
+ <string name="sel_part_backup">Select Partitions to Backup:</string>
+ <string name="storage">Storage:</string>
+ <string name="enc_disabled">disabled - set a password to enable</string>
+ <string name="enc_enabled">enabled</string>
+ <string name="enable_backup_comp_chk">Enable compression</string>
+ <string name="skip_md5_backup_chk">Skip MD5 generation during backup</string>
+ <string name="disable_backup_space_chk">Disable Free Space Check</string>
+ <string name="refresh_sizes_btn">Refresh Sizes</string>
+ <string name="swipe_backup">Swipe to Backup</string>
+ <string name="append_date_btn">Append Date</string>
+ <string name="backup_name_exists">A backup with that name already exists!</string>
+ <string name="encrypt_backup">Encrypt your Backup?</string>
+ <string name="enter_pass">Enter Password:</string>
+ <string name="enter_pass2">Enter Password Again:</string>
+ <string name="pass_not_match">Passwords do not match!</string>
+ <string name="partitions">Partitions:</string>
+ <string name="disabled">Disabled</string>
+ <string name="enabled">Enabled</string>
+ <string name="backup_name_hdr">Set Backup Name</string>
+ <string name="progress">Progress:</string>
+ <string name="backup_complete">Backup Complete</string>
+ <string name="backup_cancel">Backup Cancelled</string>
+ <string name="restore_hdr">Restore</string>
+ <string name="sel_backup_hdr">Select Backup</string>
+ <string name="restore_sel_store_hdr">Select Backup from %tw_storage_display_name% (%tw_storage_free_size% MB)</string>
+ <string name="restore_sel_pack_fs">Select Package to Restore:</string>
+ <string name="restore_enc_backup_hdr">Encrypted Backup</string>
+ <string name="restore_dec_fail">Password failed, please try again!</string>
+ <string name="del_backup_btn">Delete Backup</string>
+ <string name="del_backup_confirm">Delete Backup?</string>
+ <string name="del_backup_confirm2">This cannot be undone!</string>
+ <string name="deleting_backup">Deleting Backup...</string>
+ <string name="backup_deleted">Backup Delete Complete</string>
+ <string name="swipe_delete">Swipe to Delete</string>
+ <string name="swipe_delete_s"> Delete</string>
+ <string name="restore_try_decrypt">Encrypted Backup - Trying Decryption</string>
+ <string name="restore_try_decrypt_s">Trying Decryption</string>
+ <string name="restore_backup_date">Backup made on %tw_restore_file_date%</string>
+ <string name="restore_sel_part">Select Partitions to Restore:</string>
+ <string name="retore_enable_md5_chk">Enable MD5 Verification of Backup Files</string>
+ <string name="swipe_restore">Swipe to Restore</string>
+ <string name="swipe_restore_s"> Restore</string>
+ <string name="rename_backup_hdr">Rename Backup</string>
+ <string name="rename_backup_confirm">Rename Backup?</string>
+ <string name="rename_backup_confirm2">This cannot be undone!</string>
+ <string name="renaming_backup">Renaming Backup...</string>
+ <string name="rename_backup_complete">Backup Rename Complete</string>
+ <string name="swipe_to_rename">Swipe to Rename</string>
+ <string name="swipe_rename"> Rename</string>
+ <string name="confirm_hdr">Confirm</string>
+ <string name="mount_hdr">Mount</string>
+ <string name="mount_sel_part"></string>
+ <string name="mount_sel_part">Select Partitions to Mount:</string>
+ <string name="mount_sys_ro_chk">Mount system partition read-only</string>
+ <string name="mount_sys_ro_s_chk">Mount System RO</string>
+ <string name="decrypt_data_btn">Decrypt Data</string>
+ <string name="disable_mtp_btn">Disable MTP</string>
+ <string name="enable_mtp_btn">Enable MTP</string>
+ <string name="mount_usb_storage_btn">Mount USB Storage</string>
+ <string name="usb_storage_hdr">USB Storage</string>
+ <string name="usb_stor_mnt1">USB Storage Mounted</string>
+ <string name="usb_stor_mnt2">Be sure to safely remove your device</string>
+ <string name="usb_stor_mnt3">from your computer before unmounting!</string>
+ <string name="unmount_btn">Unmount</string>
+ <string name="reboot_hdr">Reboot Menu</string>
+ <string name="rb_system_btn">System</string>
+ <string name="rb_poweroff_btn">Power Off</string>
+ <string name="rb_recovery_btn">Recovery</string>
+ <string name="rb_bootloader_btn">Bootloader</string>
+ <string name="rb_download_btn">Download</string>
+ <string name="turning_off">Turning Off...</string>
+ <string name="swipe_power_off">Swipe to Power Off</string>
+ <string name="swipe_power_off_s">Power Off</string>
+ <string name="sys_ro_hdr">Unmodified System Partition</string>
+ <string name="sys_ro_keep">Keep System Read only?</string>
+ <string name="sys_rop1">TWRP can leave your system partition unmodified</string>
+ <string name="sys_rop2">to make it easier for you to take official updates.</string>
+ <string name="sys_rop3">TWRP will be unable to prevent the stock ROM from</string>
+ <string name="sys_rop4">replacing TWRP and will not offer to root your device.</string>
+ <string name="sys_rop5">Installing zips or performing adb operations may still</string>
+ <string name="sys_rop6">modify the system partition.</string>
+ <string name="sys_rol1">TWRP can leave your system partition unmodified to make it easier for you to take official updates.</string>
+ <string name="sys_rol2">TWRP will be unable to prevent the stock ROM from replacing TWRP and will not offer to root your device.</string>
+ <string name="sys_rol3">Installing zips or performing adb operations may still modify the system partition.</string>
+ <string name="sys_ro_never_show_chk">Never show this screen during boot again</string>
+ <string name="sys_ro_keep_ro_btn">Keep Read Only</string>
+ <string name="swipe_allow_mod">Swipe to Allow Modifications</string>
+ <string name="swipe_allow_mod_s">Allow Modifications</string>
+ <string name="settings_hdr">Settings</string>
+ <string name="settings_gen_hdr">General Settings</string>
+ <string name="settings_gen_s_hdr">General</string>
+ <string name="settings_gen_btn">General</string>
+ <string name="use_rmrf_chk">Use rm -rf instead of formatting</string>
+ <string name="use24clock_chk">Use 24-hour clock</string>
+ <string name="rev_navbar_chk">Reversed navbar layout</string>
+ <string name="simact_chk">Simulate actions for theme testing</string>
+ <string name="simfail_chk">Simulate failure for actions</string>
+ <string name="ctr_navbar_rdo">Center navbar buttons</string>
+ <string name="lft_navbar_rdo">Left align navbar buttons</string>
+ <string name="rht_navbar_rdo">Right align navbar buttons</string>
+ <string name="restore_defaults_btn">Restore Defaults</string>
+ <string name="settings_tz_btn">Time Zone</string>
+ <string name="settings_screen_btn">Screen</string>
+ <string name="settings_screen_bright_btn">Screen Brightness</string>
+ <string name="settings_vibration_btn">Vibration</string>
+ <string name="settings_language_btn">Language</string>
+ <string name="time_zone_hdr">Time Zone</string>
+ <string name="sel_tz_list">Select Time Zone:</string>
+ <!-- Translator note: if it does not make sense to translate the locations or if it makes more sense,
+ feel free to change the location listed or drop the location entirely and just call it UTC -6 -->
+ <string name="utcm11">(UTC -11) Samoa, Midway Island</string>
+ <string name="utcm10">(UTC -10) Hawaii</string>
+ <string name="utcm9">(UTC -9) Alaska</string>
+ <string name="utcm8">(UTC -8) Pacific Time</string>
+ <string name="utcm7">(UTC -7) Mountain Time</string>
+ <string name="utcm6">(UTC -6) Central Time</string>
+ <string name="utcm5">(UTC -5) Eastern Time</string>
+ <string name="utcm4">(UTC -4) Atlantic Time</string>
+ <string name="utcm3">(UTC -3) Brazil, Buenos Aires</string>
+ <string name="utcm2">(UTC -2) Mid-Atlantic</string>
+ <string name="utcm1">(UTC -1) Azores, Cape Verde</string>
+ <string name="utc0">(UTC 0) London, Dublin, Lisbon</string>
+ <string name="utcp1">(UTC +1) Berlin, Brussels, Paris</string>
+ <string name="utcp2">(UTC +2) Athens, Istanbul, South Africa</string>
+ <string name="utcp3">(UTC +3) Moscow, Baghdad</string>
+ <string name="utcp4">(UTC +4) Abu Dhabi, Tbilisi, Muscat</string>
+ <string name="utcp5">(UTC +5) Yekaterinburg, Islamabad</string>
+ <string name="utcp6">(UTC +6) Almaty, Dhaka, Colombo</string>
+ <string name="utcp7">(UTC +7) Bangkok, Hanoi, Jakarta</string>
+ <string name="utcp8">(UTC +8) Beijing, Singapore, Hong Kong</string>
+ <string name="utcp9">(UTC +9) Tokyo, Seoul, Yakutsk</string>
+ <string name="utcp10">(UTC +10) Eastern Australia, Guam</string>
+ <string name="utcp11">(UTC +11) Vladivostok, Solomon Islands</string>
+ <string name="utcp12">(UTC +12) Auckland, Wellington, Fiji</string>
+ <string name="sel_tz_offset">Select Offset (usually 0): %tw_time_zone_guioffset%</string>
+ <string name="tz_offset_none">None</string>
+ <string name="tz_offset_0">0</string>
+ <string name="tz_offset_15">15</string>
+ <string name="tz_offset_30">30</string>
+ <string name="tz_offset_45">45</string>
+ <string name="use_dst_chk">Use daylight savings time (DST)</string>
+ <string name="curr_tz">Current Time Zone: %tw_time_zone%</string>
+ <string name="curr_tz_s">Current Time Zone:</string>
+ <string name="set_tz_btn">Set Time Zone</string>
+ <string name="settings_screen_hdr">Screen Settings</string>
+ <string name="settings_screen_timeout_hdr">Screen Timeout</string>
+ <string name="enable_timeout_chk">Enable screen timeout</string>
+ <string name="screen_to_slider">Screen timeout in seconds:</string>
+ <string name="screen_to_slider_s">Screen timeout in seconds (0=disabled): %tw_screen_timeout_secs%</string>
+ <string name="screen_to_na">Screen timeout setting unavailable</string>
+ <string name="screen_bright_slider">Brightness: %tw_brightness_pct%%</string>
+ <string name="screen_bright_na">Brightness setting unavailable</string>
+ <string name="vibration_hdr">Vibration</string>
+ <string name="button_vibration_hdr">Button Vibration</string>
+ <string name="kb_vibration_hdr">Keyboard Vibration</string>
+ <string name="act_vibration_hdr">Action Vibration</string>
+ <string name="button_vibration">Button Vibration:</string>
+ <string name="kb_vibration">Keyboard Vibration:</string>
+ <string name="act_vibration">Action Vibration:</string>
+ <string name="select_language">Select Language:</string>
+ <string name="set_language_btn">Set Language</string>
+ <string name="advanced_hdr">Advanced</string>
+ <string name="copy_log_confirm">Copy Log to SD Card?</string>
+ <string name="copying_log">Copying Log to SD Card...</string>
+ <string name="copy_log_complete">Log Copy Complete</string>
+ <string name="fix_perm_btn">Fix Permissions</string>
+ <string name="fix_perm_s_btn">Fix Perms</string>
+ <string name="part_sd_btn">Partition SD Card</string>
+ <string name="part_sd_s_btn">SD Card</string>
+ <string name="file_manager_btn">File Manager</string>
+ <string name="language_hdr">Language</string>
+ <string name="terminal_btn">Terminal</string>
+ <string name="reload_theme_btn">Reload Theme</string>
+ <string name="dumlock_btn">HTC Dumlock</string>
+ <string name="inject_twrp_btn">Inject TWRP</string>
+ <string name="inject_twrp_confirm">Re-Inject TWRP?</string>
+ <string name="injecting_twrp">Re-Injecting TWRP...</string>
+ <string name="inject_twrp_complete">TWRP Injection Complete</string>
+ <string name="swipe_to_confirm">Swipe to Confirm</string>
+ <string name="part_sd_hdr">Partition SD Card</string>
+ <string name="part_sd_lose">You will lose all files on your SD card!</string>
+ <string name="part_sd_undo">This action cannot be undone!</string>
+ <string name="part_sd_ext_sz">EXT Size:</string>
+ <string name="part_sd_swap_sz">Swap Size:</string>
+ <string name="part_sd_m">-</string>
+ <string name="part_sd_p">+</string>
+ <string name="file_system">File System:</string>
+ <string name="swipe_part_sd">Swipe to Partition</string>
+ <string name="swipe_part_sd_s">Partition</string>
+ <string name="partitioning_sd">Partitioning SD Card...</string>
+ <string name="partitioning_sd2">This will take a few minutes.</string>
+ <string name="part_sd_complete">Partitioning Complete</string>
+ <string name="dumlock_hdr">HTC Dumlock</string>
+ <string name="dumlock_restore_btn">Restore Original Boot</string>
+ <string name="dumlock_restore_confirm">Restore original boot image?</string>
+ <string name="dumlock_restoring">Restoring Original Boot...</string>
+ <string name="dumlock_restore_complete">Restore Original Boot Complete</string>
+ <string name="dumlock_reflash_btn">Reflash Recovery</string>
+ <string name="dumlock_reflash_confirm">Reflash recovery to boot?</string>
+ <string name="dumlock_reflashing">Flashing recovery to boot...</string>
+ <string name="dumlock_reflash_complete">Recovery Flash to Boot Complete</string>
+ <string name="dumlock_install_btn">Install HTC Dumlock</string>
+ <string name="dumlock_install_confirm">Install HTC dumlock files to ROM?</string>
+ <string name="dumlock_installing">Installing HTC Dumlock...</string>
+ <string name="dumlock_install_complete">HTC Dumlock Install Complete</string>
+ <string name="swipe_to_unlock">Swipe to Unlock</string>
+ <string name="swipe_unlock"> Unlock</string>
+ <string name="fm_hdr">File Manager</string>
+ <string name="fm_sel_file">Select a File or Folder</string>
+ <string name="fm_type_folder">Folder</string>
+ <string name="fm_type_file">File</string>
+ <string name="fm_choose_act">Choose Action</string>
+ <string name="fm_selected">%tw_fm_type% selected:</string>
+ <string name="fm_copy_btn">Copy</string>
+ <string name="fm_copy_file_btn">Copy File</string>
+ <string name="fm_copy_folder_btn">Copy Folder</string>
+ <string name="fm_copying">Copying</string>
+ <string name="fm_move_btn">Move</string>
+ <string name="fm_moving">Moving</string>
+ <string name="fm_chmod755_btn">chmod 755</string>
+ <string name="fm_chmod755ing">chmod 755</string>
+ <string name="fm_chmod_btn">chmod</string>
+ <string name="fm_delete_btn">Delete</string>
+ <string name="fm_deleting">Deleting</string>
+ <string name="fm_rename_btn">Rename</string>
+ <string name="fm_rename_file_btn">Rename File</string>
+ <string name="fm_rename_folder_btn">Rename Folder</string>
+ <string name="fm_renaming">Renaming</string>
+ <string name="fm_sel_dest">Select Destination Folder</string>
+ <string name="fm_sel_curr_folder">Select Current Folder</string>
+ <string name="fm_rename_hdr">Rename</string>
+ <string name="fm_set_perms_hdr">Set Permissions</string>
+ <string name="fm_perms">Permissions:</string>
+ <string name="fm_complete">File Operation Complete</string>
+ <string name="decrypt_data_hdr">Decrypt Data</string>
+ <string name="decrypt_data_enter_pass"></string>
+ <string name="decryt_data_failed">Password failed, please try again!</string>
+ <string name="decrypt_data_enter_pattern">Enter Pattern.</string>
+ <string name="decrypt_data_trying">Trying Decryption</string>
+ <string name="term_hdr">Terminal Command</string>
+ <string name="term_s_hdr">Terminal</string>
+ <string name="term_kill_btn">KILL</string>
+ <string name="term_sel_folder_hdr">Browse to Starting Folder</string>
+ <string name="adb_sideload_hdr">ADB Sideload</string>
+ <string name="sideload_wipe_dalvik_chk">Wipe Dalvik Cache</string>
+ <string name="sideload_wipe_cache_chk">Wipe Cache</string>
+ <string name="swipe_to_sideload">Swipe to Start Sideload</string>
+ <string name="swipe_sideload"> Start</string>
+ <string name="sideload_confirm">ADB Sideload</string>
+ <string name="sideload_usage">Usage: adb sideload filename.zip</string>
+ <string name="sideload_complete">ADB Sideload Complete</string>
+ <string name="fix_perms_hdr">Fix Permissions</string>
+ <string name="fix_perms_note">Note: Fixing permissions is rarely needed.</string>
+ <string name="fix_perms_selinux_chk">Also fix SELinux Contexts</string>
+ <string name="fix_perms_sel_note1">Fixing SELinux Contexts may cause</string>
+ <string name="fix_perms_sel_note2">your device to not boot properly.</string>
+ <string name="swipe_to_fix_perms">Swipe to Fix Permissions</string>
+ <string name="swipe_fix_perms"> Fix Perms</string>
+ <string name="fixing_perms">Fixing Permissions...</string>
+ <string name="fix_perms_complete">Fix Permissions Complete</string>
+ <string name="reboot_hdr">Reboot</string>
+ <string name="su_hdr">SuperSU Check</string>
+ <string name="su_note1">Your device does not appear to be rooted.</string>
+ <string name="su_note2">Install SuperSU now?</string>
+ <string name="su_note3">This will root your device.</string>
+ <string name="su_cancel">Do Not Install</string>
+ <string name="swipe_su_to_install">Swipe to Install</string>
+ <string name="swipe_su_install"> Install</string>
+ <string name="su_installing">Installing SuperSU</string>
+ <string name="sel_storage_list">Select Storage</string>
+ <string name="ok_btn">OK</string>
+
+ <!-- Various console messages - these consist of user displayed messages, oftentimes errors -->
+ <string name="no_kernel_selinux">Kernel does not have support for reading SELinux contexts.</string>
+ <string name="full_selinux">Full SELinux support is present.</string>
+ <string name="no_selinux">No SELinux support (no libselinux).</string>
+ <string name="mtp_enabled">MTP Enabled</string>
+ <string name="mtp_crash">MTP Crashed, not starting MTP on boot.</string>
+ <string name="rebooting">Rebooting...</string>
+ <string name="decrypt_success">Successfully decrypted with default password.</string>
+ <string name="unable_to_decrypt">Unable to decrypt with default password. You may need to perform a Format Data.</string>
+ <string name="generating_md51">Generating MD5</string>
+ <!-- Message displayed during a backup if we are generating an MD5, ideally, leave the leading " * " to help align and separate this text from other console text -->
+ <string name="generating_md52"> * Generating md5...</string>
+ <string name="md5_created"> * MD5 Created.</string>
+ <string name="md5_error"> * MD5 Error!</string>
+ <string name="md5_compute_error"> * Error computing MD5.</string>
+ <string name="md5_created"> * MD5 Created.</string>
+ <string name="current_date">(Current Date)</string>
+ <string name="auto_generate">(Auto Generate)</string>
+ <string name="unable_to_locate_partition">Unable to locate '{1}' partition for backup calculations.</string>
+ <string name="no_partition_selected">No partitions selected for backup.</string>
+ <string name="total_partitions_backup"> * Total number of partitions to back up: {1}</string>
+ <string name="total_backup_size"> * Total size of all data: {1}MB</string>
+ <string name="available_space"> * Available space: {1}MB</string>
+ <string name="unable_locate_storage">Unable to locate storage device.</string>
+ <string name="Not enough free space on storage.">Not enough free space on storage.</string>
+ <string name="backup_started">[BACKUP STARTED]</string>
+ <string name="backup_folder"> * Backup Folder: {1}</string>
+ <string name="fail_backup_folder">Failed to make backup folder.</string>
+ <string name="avg_backup_fs">Average backup rate for file systems: {1} MB/sec</string>
+ <string name="avg_backup_img">Average backup rate for imaged drives: {1} MB/sec</string>
+ <string name="total_backed_size">[{1} MB TOTAL BACKED UP]</string>
+ <string name="backup_completed">[BACKUP COMPLETED IN {1} SECONDS]</string>
+ <string name="restore_started">[RESTORE STARTED]</string>
+ <string name="restore_folder">Restore folder: '{1}'</string>
+ <!-- {1} is the partition display name and {2} is the number of seconds -->
+ <string name="restort_part_done">[{1} done ({2} seconds)]</string>
+ <string name="verifying_md5">Verifying MD5</string>
+ <string name="skip_md5">Skipping MD5 check based on user setting.</string>
+ <string name="calc_restore">Calculating restore details...</string>
+ <string name="restore_read_only">Cannot restore {1} -- mounted read only.</string>
+ <string name="restore_unable_locate">Unable to locate '{1}' partition for restoring.</string>
+ <string name="no_part_restore">No partitions selected for restore.</string>
+ <string name="restore_part_count">Restoring {1} partitions...</string>
+ <string name="total_restore_size">Total restore size is {1}MB</string>
+ <string name="updating_system_details">Updating System Details</string>
+ <string name="restore_complete">[RESTORE COMPLETED IN {1} SECONDS]</string>
+ <!-- {1} is the path we could not open, {2} is strerror output -->
+ <string name="error_opening_strerr">Error opening: '{1}' ({2})</string>
+ <string name="unable_locate_part_backup_name">Unable to locate partition by backup name: '{1}'</string>
+ <string name="unable_find_part_path">Unable to find partition for path '{1}'</string>
+ <string name="update_part_details">Updating partition details...</string>
+ <string name="update_part_details_done">...done</string>
+ <string name="wiping_dalvik">Wiping Dalvik Cache Directories...</string>
+ <string name="cleaned">Cleaned: {1}...</string>
+ <string name="dalvik_done">-- Dalvik Cache Directories Wipe Complete!</string>
+ <string name="no_andsec">No android secure partitions found.</string>
+ <string name="unable_to_locate">Unable to locate {1}.</string>
+ <string name="wiping_datamedia">Wiping internal storage -- /data/media...</string>
+ <string name="unable_to_mount">Unable to mount {1}</string>
+ <string name="unable_to_mount_internal">Unable to mount internal_storage</string>
+ <string name="unable_to_mount_storage">Unable to mount storage</string>
+ <string name="fail_decrypt">Failed to decrypt data.</string>
+ <string name="no_crypto_support">No crypto support was compiled into this build.</string>
+ <string name="decrypt_success">Data successfully decrypted, new block device: '{1}'</string>
+ <string name="done">Done.</string>
+ <string name="start_partition_sd">Partitioning SD Card...</string>
+ <string name="partition_sd_locate">Unable to locate device to partition.</string>
+ <string name="ext_swap_size">EXT + Swap size is larger than sdcard size.</string>
+ <string name="remove_part_table">Removing partition table...</string>
+ <string name="unable_rm_part">Unable to remove partition table.</string>
+ <string name="create_part">Creating {1} partition...</string>
+ <string name="unable_to_create_part">Unable to create {1} partition.</string>
+ <string name="format_sdext_as">Formatting sd-ext as {1}...</string>
+ <string name="part_complete">Partitioning complete.</string>
+ <string name="unable_to_open">Unable to open '{1}'.</string>
+ <string name="mtp_already_enabled">MTP already enabled</string>
+ <string name="mtp_fail">Failed to enable MTP</string>
+ <string name="no_mtp">MTP support not included</string>
+ <string name="image_flash_start">[IMAGE FLASH STARTED]</string>
+ <string name="img_to_flash">Image to flash: '{1}'</string>
+ <string name="flash_unable_locate">Unable to locate '{1}' partition for flashing.</string>
+ <string name="no_part_flash">No partitions selected for flashing.</string>
+ <string name="too_many_flash">Too many partitions selected for flashing.</string>
+ <string name="invalid_flash">Invalid flash partition specified.</string>
+ <string name="flash_done">[IMAGE FLASH COMPLETED]</string>
+ <string name="wiping">Wiping {1}</string>
+ <string name="repair_not_exist">{1} does not exist! Cannot repair!</string>
+ <string name="unable_repair">Unable to repair {1}.</string>
+ <string name="mount_data_footer">Could not mount /data and unable to find crypto footer.</string>
+ <!-- {1} is the folder name that we could not create, {2} is strerror output -->
+ <string name="create_folder_strerr">Can not create '{1}' folder ({2}).</string>
+ <!-- {1} is the folder name that we could not mount, {2} is strerror output -->
+ <string name="fail_mount">Failed to mount '{1}' ({2})</string>
+ <!-- {1} is the folder name that we could not unmount, {2} is strerror output -->
+ <string name="fail_mount">Failed to unmount '{1}' ({2})</string>
+ <string name="cannot_resize">Cannot resize {1}.</string>
+ <string name="repair_resize">Repairing {1} before resizing.</string>
+ <string name="unable_resize">Unable to resize {1}.</string>
+ <string name="no_md5_found">No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.</string>
+ <string name="md5_fail_match">MD5 failed to match on '{1}'.</string>
+ <string name="restoring">Restoring</string>
+ <string name="format_data_msg">You may need to reboot recovery to be able to use /data again.</string>
+ <string name="format_data_err">Unable to format to remove encryption.</string>
+ <string name="formating_using">Formatting {1} using {2}...</string>
+ <string name="unable_to_wipe">Unable to wipe {1}.</string>
+ <string name="remove_all">Removing all files under '{1}'</string>
+ <string name="wiping_data">Wiping data without wiping /data/media ...</string>
+ <string name="backing_up">Backing up {1}...</string>
+ <string name="backing">Backing Up</string>
+ <string name="backup_size">Backup file size for '{1}' is 0 bytes.</string>
+ <string name="datamedia_fs_restore">WARNING: This /data backup was made with {1} file system! The backup may not boot unless you change back to {1}.</string>
+ <string name="restoring">Restoring {1}...</string>
+ <string name="restore">Restoring</string>
+ <string name="recreate_folder_err">Unable to recreate {1} folder.</string>
+ <string name="img_size_err">Size of image is larger than target device</string>
+ <string name="flashing">Flashing {1}...</string>
+ <string name="backup_folder">Backup folder set to '{1}'</string>
+ <string name="locate_backup_err">Unable to locate backup '{1}'</string>
+ <string name="set_restore_opt">Setting restore options: '{1}':</string>
+ <string name="md5_check_skip">MD5 check skip is on</string>
+ <string name="ors_encrypt_restore_err">Unable to use OpenRecoveryScript to restore an encrypted backup.</string>
+ <string name="mounting">Mounting</string>
+ <string name="unmounting">Unmounting</string>
+ <string name="mounted">Mounted '{1}'</string>
+ <string name="unmounted">Unmounted '{1}'</string>
+ <string name="setting">Setting '{1}' to '{2}'</string>
+ <string name="setting_empty">Setting '{1}' to empty</string>
+ <string name="making_dir1">Making Directory</string>
+ <string name="making_dir2">Making directory: '{1}'</string>
+ <string name="running_command">Running Command</string>
+ <string name="sideload">ADB Sideload</string>
+ <string name="start_sideload">Starting ADB sideload feature...</string>
+ <string name="need_new_adb">You need adb 1.0.32 or newer to sideload to this device.</string>
+ <string name="no_pwd">No password provided.</string>
+ <string name="done_ors">Done processing script file</string>
+ <string name="injecttwrp">Injecting TWRP into boot image...</string>
+ <string name="zip_err">Error installing zip file '{1}'</string>
+ <string name="installing_zip">Installing zip file '{1}'</string>
+ <string name="select_backup_opt">Setting backup options:</string>
+ <string name="compression_on">Compression is on</string>
+ <string name="md5_off">MD5 Generation is off</string>
+ <string name="backup_fail">Backup Failed</string>
+ <string name="backup_complete">Backup complete!</string>
+ <string name="running_recovery_commands">Running Recovery Commands</string>
+ <string name="recovery_commands_complete">Recovery Commands Complete</string>
+ <string name="running_ors">Running OpenRecoveryScript</string>
+ <string name="ors_complete">OpenRecoveryScript Complete</string>
+ <string name="no_updater_binary">Could not find '{1}' in the zip file.</string>
+ <string name="check_for_md5">Checking for MD5 file...</string>
+ <string name="fail_sysmap">Failed to map file '{1}'</string>
+ <string name="verify_zip_sig">Verifying zip signature...</string>
+ <string name="verify_zip_fail">Zip signature verification failed!</string>
+ <string name="verify_zip_done">Zip signature verified successfully.</string>
+ <string name="zip_corrupt">Zip file is corrupt!</string>
+ <string name="no_md5">Skipping MD5 check: no MD5 file found</string>
+ <string name="md5_fail">MD5 does not match</string>
+ <string name="md5_match">MD5 matched</string>
+ <string name="pid_signal">{1} process ended with signal: {2}</string>
+ <string name="pid_error">{1} process ended with ERROR: {2}</string>
+ <string name="install_dumlock">Installing HTC Dumlock to system...</string>
+ <string name="dumlock_restore">Restoring original boot...</string>
+ <string name="dumlock_reflash">Reflashing recovery to boot...</string>
+ <string name="run_script">Running {1} script...</string>
+ <string name="rename_stock">Renamed stock recovery file in /system to prevent the stock ROM from replacing TWRP.</string>
+ <string name="split_backup">Breaking backup file into multiple archives...</string>
+ <string name="backup_error">Error creating backup.</string>
+ <string name="restore_error">Error during restore process.</string>
+ <string name="split_thread">Splitting thread ID {1} into archive {2}</string>
+ <!-- These 2 items are saved in the data manager instead of resource manager, so %llu, etc is correct instead of {1} -->
+ <string name="file_progress">%llu of %llu files, %i%%</string>
+ <string name="size_progress">%lluMB of %lluMB, %i%%</string>
+ <string name="decrypt_cmd">Attempting to decrypt data partition via command line.</string>
+ <string name="base_pkg_err">Failed to load base packages.</string>
+ <string name="simulating">Simulating actions...</string>
+ <string name="backup_cancel">Backup Canceled.</string>
+ <string name="config_twrp">Configuring TWRP...</string>
+ <string name="config_twrp_err">Unable to configure TWRP with this kernel.</string>
+ <string name="copy_log">Copied recovery log to {1}.</string>
+ <string name="max_queue">Maximum zip queue reached!</string>
+ <string name="min_queue">Minimum zip queue reached!</string>
+ <string name="screenshot_err">Failed to take a screenshot!</string>
+ <string name="zip_wipe_cache">One or more zip requested a cache wipe -- Wiping cache now.</string>
+ <string name="and_sec_wipe_err">Unable to wipe android secure</string>
+ <string name="dalvik_wipe_err">Failed to wipe dalvik</string>
+ <string name="auto_gen">(Auto Generate)</string>
+ <string name="curr_date">(Current Date)</string>
+ <string name="backup_name_len">Backup name is too long.</string>
+ <string name="backup_name_invalid">Backup name '{1}' contains invalid character: '{1}'</string>
+ <string name="backup_name_exists">A backup with this name already exists.</string>
+ <string name="no_real_sdcard">This device does not have a real SD Card! Aborting!</string>
+ <string name="cancel_sideload">Cancelling ADB sideload...</string>
+ <string name="change_fs_err">Error changing file system.</string>
+ </resources>
+</language>
diff --git a/gui/theme/common/languages/es.xml b/gui/theme/common/languages/es.xml
new file mode 100644
index 000000000..ec2b41db6
--- /dev/null
+++ b/gui/theme/common/languages/es.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<language>
+ <display>Español</display>
+
+ <resources>
+ <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" />
+ <string name="install_btn">Instalar</string>
+ </resources>
+</language>
diff --git a/gui/theme/common/languages/fi.xml b/gui/theme/common/languages/fi.xml
new file mode 100644
index 000000000..51ed60d14
--- /dev/null
+++ b/gui/theme/common/languages/fi.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<language>
+ <display>Suomi</display>
+
+ <resources>
+ <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" />
+ <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" />
+ <string name="install_btn">Asenna</string>
+ </resources>
+</language>
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index dc9bea208..2cd49e4c6 100644..100755
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -158,7 +158,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Team Win Recovery Project</text>
+ <text>{@twrp_header=Team Win Recovery Project}</text>
</text>
<text style="text_m">
@@ -169,7 +169,7 @@
<button style="main_button">
<placement x="%indent%" y="%row2a_y%"/>
- <text>Install</text>
+ <text>{@install_btn=Install}</text>
<actions>
<action function="queueclear"/>
<action function="set">tw_selectimage=0</action>
@@ -179,43 +179,43 @@
<button style="main_button">
<placement x="%center_x%" y="%row2a_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_btn=Wipe}</text>
<action function="page">wipe</action>
</button>
<button style="main_button">
<placement x="%indent%" y="%row8_y%"/>
- <text>Backup</text>
+ <text>{@backup_btn=Backup}</text>
<action function="page">backup</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row8_y%"/>
- <text>Restore</text>
+ <text>{@restore_btn=Restore}</text>
<action function="page">restore</action>
</button>
<button style="main_button">
<placement x="%indent%" y="%row13a_y%"/>
- <text>Mount</text>
+ <text>{@mount_btn=Mount}</text>
<action function="page">mount</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row13a_y%"/>
- <text>Settings</text>
+ <text>{@settings_btn=Settings}</text>
<action function="page">settings</action>
</button>
<button style="main_button">
<placement x="%indent%" y="%row19_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_btn=Advanced}</text>
<action function="page">advanced</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row19_y%"/>
- <text>Reboot</text>
+ <text>{@reboot_btn=Reboot}</text>
<action function="page">reboot</action>
</button>
</page>
@@ -226,18 +226,18 @@
<text style="text_l">
<condition var1="tw_selectimage" var2="0"/>
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_hdr=Install Zip}</text>
</text>
<text style="text_l">
<condition var1="tw_selectimage" var2="1"/>
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_hdr=Install Image}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select File from %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@select_file_from_storage=Select File from %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="sort_options"/>
@@ -264,7 +264,7 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=install</action>
<action function="overlay">select_storage</action>
@@ -274,7 +274,7 @@
<button style="main_button_half_height">
<condition var1="tw_selectimage" var2="0"/>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_btn=Install Image}</text>
<actions>
<action function="set">tw_selectimage=1</action>
<action function="page">install</action>
@@ -284,7 +284,7 @@
<button style="main_button_half_height">
<condition var1="tw_selectimage" var2="1"/>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_btn=Install Zip}</text>
<actions>
<action function="set">tw_selectimage=0</action>
<action function="page">install</action>
@@ -326,32 +326,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_hdr=Install Zip}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>%tw_zip_queue_count% of max of 10 Files queued</text>
+ <text>{@zip_queue_count=%tw_zip_queue_count% of max of 10 Files queued}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This operation may install incompatible</text>
+ <text>{@zip_warn1=This operation may install incompatible}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>software and render your device unusable.</text>
+ <text>{@zip_warn2=software and render your device unusable.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Press back to cancel adding this zip.</text>
+ <text>{@zip_back_cancel=Press back to cancel adding this zip.}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row7_y%"/>
- <text>Folder:</text>
+ <text>{@folder=Folder:}</text>
</text>
<text style="text_m">
@@ -361,7 +361,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row9a_y%"/>
- <text>File:</text>
+ <text>{@file=File:}</text>
</text>
<text style="text_m">
@@ -371,26 +371,26 @@
<checkbox>
<placement x="%indent%" y="%row12_y%"/>
- <text>Zip file signature verification</text>
+ <text>{@zip_sig_chk=Zip signature verification}</text>
<data variable="tw_signed_zip_verify"/>
</checkbox>
<checkbox>
<condition var1="tw_has_injecttwrp" var2="1"/>
<placement x="%indent%" y="%row13_y%"/>
- <text>Inject TWRP after install</text>
+ <text>{@inject_twrp_chk=Inject TWRP after install}</text>
<data variable="tw_inject_after_zip"/>
</checkbox>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Add more Zips</text>
+ <text>{@zip_add_btn=Add more Zips}</text>
<action function="page">install</action>
</button>
<button style="main_button_half_height">
<placement x="%center_x%" y="%row18a_y%"/>
- <text>Clear Zip Queue</text>
+ <text>{@zip_clear_btn=Clear Zip Queue}</text>
<actions>
<action function="queueclear"/>
<action function="page">install</action>
@@ -398,7 +398,7 @@
</button>
<slider>
- <text>Swipe to confirm Flash</text>
+ <text>{@swipe_flash=Swipe to confirm Flash}</text>
<action function="flash">flash_zip</action>
</slider>
@@ -421,7 +421,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip %tw_zip_index% of %tw_zip_queue_count%</text>
+ <text>{@install_zip_count_hdr=Install Zip %tw_zip_index% of %tw_zip_queue_count%}</text>
</text>
<text style="text_m">
@@ -444,26 +444,26 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_hdr=Install Zip}</text>
</text>
<text style="text_m_fail">
<condition var1="tw_operation_status" op="!=" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Failed</text>
+ <text>{@failed=Failed}</text>
</text>
<text style="text_m">
<condition var1="tw_operation_status" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Successful</text>
+ <text>{@successful=Successful}</text>
</text>
<template name="console"/>
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Wipe cache/dalvik</text>
+ <text>{@wipe_cache_dalvik_btn=Wipe cache/dalvik}</text>
<actions>
<action function="set">tw_back=flash_done</action>
<action function="set">tw_action=wipe</action>
@@ -471,30 +471,30 @@
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=wipe</action>
<action function="set">tw_action2_param=dalvik</action>
- <action function="set">tw_text1=Wipe Cache &amp; Dalvik?</action>
- <action function="set">tw_action_text1=Wiping Cache &amp; Dalvik...</action>
- <action function="set">tw_complete_text1=Cache &amp; Dalvik Wipe Complete</action>
- <action function="set">tw_slider_text=Swipe to Wipe</action>
+ <action function="set">tw_text1={@wipe_cache_dalvik_confirm=Wipe Cache &amp; Dalvik?}</action>
+ <action function="set">tw_action_text1={@wiping_cache_dalvik=Wiping Cache &amp; Dalvik...}</action>
+ <action function="set">tw_complete_text1={@wipe_cache_dalvik_complete=Cache &amp; Dalvik Wipe Complete}</action>
+ <action function="set">tw_slider_text={@swipe_wipe=Swipe to Wipe}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Reboot System</text>
+ <text>{@reboot_system_btn=Reboot System}</text>
<actions>
<action function="set">tw_back=main2</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
<action function="set">tw_text3=</action>
<action function="set">tw_text4=</action>
- <action function="set">tw_action_text1=Rebooting...</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -521,17 +521,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_hdr=Install Image}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select Target Partition</text>
+ <text>{@install_sel_target=Select Target Partition}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>Folder:</text>
+ <text>{@folder=Folder:}</text>
</text>
<text style="text_m">
@@ -541,7 +541,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row4a_y%"/>
- <text>File:</text>
+ <text>{@file=File:}</text>
</text>
<text style="text_m">
@@ -552,20 +552,20 @@
<partitionlist>
<placement x="%indent%" y="%row7_y%" w="%content_width%" h="%partitionlist_flashimage_height%"/>
<icon selected="radio_true" unselected="radio_false"/>
- <text>Select Partition to Flash Image:</text>
+ <text>{@flash_image_select=Select Partition to Flash Image:}</text>
<data name="tw_flash_partition"/>
<listtype name="flashimg"/>
</partitionlist>
<slider>
- <text>Swipe to confirm Flash</text>
+ <text>{@swipe_flash=Swipe to confirm Flash}</text>
<actions>
<action function="set">tw_back=flashimage_confirm</action>
<action function="set">tw_action=flashimage</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_action_text1=Flashing Image...</action>
+ <action function="set">tw_action_text1={@flashing_image=Flashing Image...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Image Flashed</action>
+ <action function="set">tw_complete_text1={@image_flashed=Image Flashed}</action>
<action function="page">action_page</action>
</actions>
<action function="flashimage"/>
@@ -615,7 +615,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Confirm Action</text>
+ <text>{@confirm_action=Confirm Action}</text>
</text>
<text style="text_m">
@@ -645,7 +645,7 @@
<text style="text_m">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider>
@@ -687,7 +687,7 @@
<button style="main_button_half_height">
<condition var1="tw_has_cancel" var2="1"/>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="%tw_cancel_action%">%tw_cancel_param%</action>
</button>
@@ -765,20 +765,20 @@
<text style="text_m_fail">
<condition var1="tw_operation_status" op="!=" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Failed</text>
+ <text>{@failed=Failed}</text>
</text>
<text style="text_m">
<condition var1="tw_operation_status" var2="0"/>
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Successful</text>
+ <text>{@successful=Successful}</text>
</text>
<template name="console"/>
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Back</text>
+ <text>{@back_btn=Back}</text>
<actions>
<action function="set">tw_clear_destination=%tw_back%</action>
<action function="page">clear_vars</action>
@@ -787,20 +787,20 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Reboot System</text>
+ <text>{@reboot_system_btn=Reboot System}</text>
<actions>
<action function="set">tw_back=main2</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
<action function="set">tw_text3=</action>
<action function="set">tw_text4=</action>
- <action function="set">tw_action_text1=Rebooting...</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -867,23 +867,23 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Factory Reset</text>
+ <text>{@factory_reset_hdr=Factory Reset}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Wipes Data, Cache, and Dalvik</text>
+ <text>{@factory_reset1=Wipes Data, Cache, and Dalvik}</text>
</text>
<text style="text_m_accent">
<condition var1="tw_has_data_media" var2="1"/>
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>(not including internal storage)</text>
+ <text>{@factory_reset2=(not including internal storage)}</text>
</text>
<text style="text_m_accent">
@@ -892,33 +892,33 @@
<condition var1="fileexists" var2="/and-sec"/>
</conditions>
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Android Secure</text>
+ <text>{@android_secure=Android Secure}</text>
</text>
<text style="text_m_accent">
<condition var1="tw_has_sdext_partition" var2="1"/>
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>SD-EXT</text>
+ <text>{@sdext=SD-EXT}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>Most of the time this is</text>
+ <text>{@factory_reset3=Most of the time this is}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>the only wipe that you need.</text>
+ <text>{@factory_reset4=the only wipe that you need.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row10_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Advanced Wipe</text>
+ <text>{@advanced_wipe_btn=Advanced Wipe}</text>
<actions>
<action function="set">partitionlisterror=0</action>
<action function="page">advancedwipe</action>
@@ -928,7 +928,7 @@
<button style="main_button_half_height">
<condition var1="tw_has_data_media" var2="1"/>
<placement x="%center_x%" y="%row18a_y%"/>
- <text>Format Data</text>
+ <text>{@format_data_btn=Format Data}</text>
<action function="page">formatdata</action>
</button>
@@ -938,29 +938,29 @@
<condition var1="tw_has_data_media" var2="0"/>
</conditions>
<placement x="%center_x%" y="%row18a_y%"/>
- <text>Wipe Encryption</text>
+ <text>{@wipe_enc_btn=Wipe Encryption}</text>
<actions>
<action function="set">tw_back=wipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=DATAMEDIA</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Wipe Encryption from Data?</action>
+ <action function="set">tw_text1={@wipe_enc_confirm=Wipe Encryption from Data?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting Data...</action>
- <action function="set">tw_complete_text1=Data Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Format Data</action>
+ <action function="set">tw_action_text1={@formatting_data=Formatting Data...}</action>
+ <action function="set">tw_complete_text1={@format_data_complete=Data Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_format_data=Swipe to Format Data}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<slider>
- <text>Swipe to Factory Reset</text>
+ <text>{@swipe_factory_reset=Swipe to Factory Reset}</text>
<actions>
<action function="set">tw_back=wipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=data</action>
- <action function="set">tw_action_text1=Factory Reset...</action>
- <action function="set">tw_complete_text1=Factory Reset Complete</action>
+ <action function="set">tw_action_text1={@factory_resetting=Factory Reset...}</action>
+ <action function="set">tw_complete_text1={@factory_reset_complete=Factory Reset Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -985,17 +985,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Advanced Wipe</text>
+ <text>{@advanced_wipe_hdr=Advanced Wipe}</text>
</text>
<partitionlist>
<placement x="%indent%" y="%row1a_y%" w="%content_width%" h="%partitionlist_wipe_height%"/>
- <text>Select Partitions to Wipe:</text>
+ <text>{@sel_part_wipe=Select Partitions to Wipe:}</text>
<data name="tw_wipe_list"/>
<listtype name="wipe"/>
</partitionlist>
@@ -1003,12 +1003,12 @@
<text style="text_m_fail">
<condition var1="partitionlisterror" var2="1"/>
<placement x="%center_x%" y="%row17_y%" placement="5"/>
- <text>Invalid partition selection</text>
+ <text>{@invalid_part_sel=Invalid partition selection}</text>
</text>
<button style="main_button_half_height_full_width">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Repair or Change File System</text>
+ <text>{@repair_change_btn=Repair or Change File System}</text>
<actions>
<action function="checkpartitionlist"/>
<action function="page">checkpartitionlist</action>
@@ -1016,14 +1016,14 @@
</button>
<slider>
- <text>Swipe to Wipe</text>
+ <text>{@swipe_wipe=Swipe to Wipe}</text>
<actions>
<action function="set">tw_back=advancedwipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=LIST</action>
- <action function="set">tw_text1=Wipe Selected Partition(s)?</action>
- <action function="set">tw_action_text1=Wiping Partition(s)...</action>
- <action function="set">tw_complete_text1=Wipe Complete</action>
+ <action function="set">tw_text1={@wipe_sel_confirm=Wipe Selected Partition(s)?}</action>
+ <action function="set">tw_action_text1={@wiping_part=Wiping Partition(s)...}</action>
+ <action function="set">tw_complete_text1={@wipe_complete=Wipe Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -1044,37 +1044,37 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Format Data</text>
+ <text>{@format_data_hdr=Format Data}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Format Data will wipe all of your apps,</text>
+ <text>{@format_data_ptr1=Format Data will wipe all of your apps,}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>backups, pictures, videos, media, and</text>
+ <text>{@format_data_ptr2=backups, pictures, videos, media, and}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>removes encryption on internal storage.</text>
+ <text>{@format_data_ptr3=removes encryption on internal storage.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>This cannot be undone. Press back to cancel.</text>
+ <text>{@format_data_undo=This cannot be undone.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>Type yes to continue.</text>
+ <text>{@yes_continue=Type yes to continue. Press back to cancel.}</text>
</text>
<input>
@@ -1109,8 +1109,8 @@
<action function="set">tw_back=formatdata</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=DATAMEDIA</action>
- <action function="set">tw_action_text1=Formatting Data...</action>
- <action function="set">tw_complete_text1=Data Format Complete</action>
+ <action function="set">tw_action_text1={@formatting_data=Formatting Data...}</action>
+ <action function="set">tw_complete_text1={@format_data_complete=Data Format Complete}</action>
<action function="page">action_page</action>
</actions>
</action>
@@ -1146,83 +1146,83 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Partition Options for: %tw_partition_name%</text>
+ <text>{@part_opt_hdr=Partition Options for: %tw_partition_name%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Mount Point: %tw_partition_mount_point%</text>
+ <text>{@part_mount_point=Mount Point: %tw_partition_mount_point%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Current file system: %tw_partition_file_system%</text>
+ <text>{@part_curr_fs=File system: %tw_partition_file_system%}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_is_present" var2="1"/>
<placement x="%indent%" y="%row5_y%"/>
- <text>Present: Yes</text>
+ <text>{@part_present_yes=Present: Yes}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_is_present" var2="0"/>
<placement x="%indent%" y="%row5_y%"/>
- <text>Present: No</text>
+ <text>{@part_present_no=Present: No}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_removable" var2="1"/>
<placement x="%center_x%" y="%row5_y%"/>
- <text>Removable: Yes</text>
+ <text>{@part_removable_yes=Removable: Yes}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_removable" var2="0"/>
<placement x="%center_x%" y="%row5_y%"/>
- <text>Removable: No</text>
+ <text>{@part_removable_no=Removable: No}</text>
</text>
<text style="text_m">
<placement x="%indent%" y="%row7_y%"/>
- <text>Size: %tw_partition_size%MB</text>
+ <text>{@part_size=Size: %tw_partition_size%MB}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row7_y%"/>
- <text>Used: %tw_partition_used%MB</text>
+ <text>{@part_used=Used: %tw_partition_used%MB}</text>
</text>
<text style="text_m">
<placement x="%indent%" y="%row9_y%"/>
- <text>Free: %tw_partition_free%MB</text>
+ <text>{@part_free=Free: %tw_partition_free%MB}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row9_y%"/>
- <text>Backup Size: %tw_partition_backup_size%MB</text>
+ <text>{@part_backup_size=Backup Size: %tw_partition_backup_size%MB}</text>
</text>
<button style="main_button_half_height">
<condition var1="tw_partition_can_resize" op="=" var2="1"/>
<placement x="%indent%" y="%row18a_y%"/>
- <text>Resize File System</text>
+ <text>{@resize_btn=Resize File System}</text>
<actions>
<action function="set">tw_back=partitionoptions</action>
<action function="set">tw_action=resize</action>
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=getpartitiondetails</action>
- <action function="set">tw_text1=Resize %tw_partition_name%?</action>
+ <action function="set">tw_text1={@resize_confirm=Resize %tw_partition_name%?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Resizing...</action>
- <action function="set">tw_complete_text1=Resize Complete</action>
- <action function="set">tw_slider_text=Swipe to Resize</action>
+ <action function="set">tw_action_text1={@resizing=Resizing...}</action>
+ <action function="set">tw_complete_text1={@resize_complete=Resize Complete}</action>
+ <action function="set">tw_slider_text={@swipe_resize=Swipe to Resize}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1230,24 +1230,24 @@
<button style="main_button_half_height">
<condition var1="tw_partition_can_repair" op="=" var2="1"/>
<placement x="%indent%" y="%row21a_y%"/>
- <text>Repair File System</text>
+ <text>{@repair_btn=Repair File System}</text>
<actions>
<action function="set">tw_back=partitionoptions</action>
<action function="set">tw_action=repair</action>
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Repair %tw_partition_name%?</action>
+ <action function="set">tw_text1={@repair_confirm=Repair %tw_partition_name%?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Repairing...</action>
- <action function="set">tw_complete_text1=Repair Complete</action>
- <action function="set">tw_slider_text=Swipe to Repair</action>
+ <action function="set">tw_action_text1={@repairing=Repairing...}</action>
+ <action function="set">tw_complete_text1={@repair_complete=Repair Complete}</action>
+ <action function="set">tw_slider_text={@swipe_repair=Swipe to Repair}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Change File System</text>
+ <text>{@change_fs_btn=Change File System}</text>
<action function="page">selectfilesystem</action>
</button>
@@ -1287,32 +1287,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_hdr=Wipe}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Change File System for: %tw_partition_name%</text>
+ <text>{@change_fs_for_hdr=Change File System for: %tw_partition_name%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Mount Point: %tw_partition_mount_point%</text>
+ <text>{@part_mount_point=Mount Point: %tw_partition_mount_point%}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Current file system: %tw_partition_file_system%</text>
+ <text>{@part_curr_fs=File system: %tw_partition_file_system%}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Some ROMs or kernels may not support some</text>
+ <text>{@change_fs_warn1=Some ROMs or kernels may not support some}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>file systems. Proceed with caution!</text>
+ <text>{@change_fs_warn2=file systems. Proceed with caution!}</text>
</text>
<button style="main_button_half_height">
@@ -1325,11 +1325,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext2</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT2</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1344,11 +1344,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext3</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT3</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1363,11 +1363,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext4</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT4</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1382,11 +1382,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=vfat</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=FAT</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1401,11 +1401,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=exfat</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=exFAT</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1420,11 +1420,11 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=f2fs</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text=Swipe to Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=F2FS</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_fs=Swipe to Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1445,12 +1445,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="tabs_backup"/>
@@ -1465,7 +1465,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1479,7 +1479,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_success_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1489,7 +1489,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row3a_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<text style="text_m">
@@ -1512,14 +1512,14 @@
<partitionlist>
<placement x="%indent%" y="%row6_y%" w="%content_width%" h="%partitionlist_backup_height%"/>
- <text>Select Partitions to Backup:</text>
+ <text>{@sel_part_backup=Select Partitions to Backup:}</text>
<data name="tw_backup_list"/>
<listtype name="backup"/>
</partitionlist>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=backup</action>
<action function="overlay">select_storage</action>
@@ -1528,7 +1528,7 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row18a_y%"/>
- <text>Refresh Sizes</text>
+ <text>{@refresh_sizes_btn=Refresh Sizes}</text>
<actions>
<action function="refreshsizes"/>
<action function="page">backup</action>
@@ -1536,7 +1536,7 @@
</button>
<slider>
- <text>Swipe to Backup</text>
+ <text>{@swipe_backup=Swipe to Backup}</text>
<action function="page">backup_run</action>
</slider>
@@ -1556,12 +1556,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="tabs_backup"/>
@@ -1576,7 +1576,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1590,7 +1590,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_success_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1600,19 +1600,19 @@
<checkbox>
<placement x="%indent%" y="%row3a_y%"/>
- <text>Enable compression</text>
+ <text>{@enable_backup_comp_chk=Enable compression}</text>
<data variable="tw_use_compression"/>
</checkbox>
<checkbox>
<placement x="%indent%" y="%row5_y%"/>
- <text>Skip MD5 generation during backup</text>
+ <text>{@skip_md5_backup_chk=Skip MD5 generation during backup}</text>
<data variable="tw_skip_md5_generate"/>
</checkbox>
<checkbox>
<placement x="%indent%" y="%row6a_y%"/>
- <text>Disable Free Space Check</text>
+ <text>{@disable_backup_space_chk=Disable Free Space Check}</text>
<data variable="tw_disable_free_space"/>
</checkbox>
@@ -1629,7 +1629,7 @@
<page name="backupname1">
<action>
- <condition var1="tw_backup_name" op="=" var2="(Auto Generate)"/>
+ <condition var1="tw_backup_name" op="=" var2="{@auto_generate=(Auto Generate)}"/>
<action function="generatebackupname"/>
</action>
@@ -1643,12 +1643,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="tabs_backup"/>
@@ -1663,7 +1663,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1677,7 +1677,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_success_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1687,7 +1687,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row3a_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -1715,21 +1715,21 @@
<text style="text_m_fail">
<condition var1="tw_fileexists" var2="1"/>
<placement x="%indent%" y="%row6_y%"/>
- <text>A backup with that name already exists!</text>
+ <text>{@backup_name_exists=A backup with that name already exists!}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">backup</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%center_x%" y="%row10_y%"/>
- <text>Append Date</text>
+ <text>{@append_date_btn=Append Date}</text>
<action function="appenddatetobackupname"/>
</button>
@@ -1738,7 +1738,7 @@
<action>
<touch key="home"/>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">main</action>
</actions>
</action>
@@ -1746,7 +1746,7 @@
<action>
<touch key="back"/>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">backup</action>
</actions>
</action>
@@ -1757,12 +1757,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="tabs_backup"/>
@@ -1773,7 +1773,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1787,7 +1787,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_success_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1801,12 +1801,12 @@
<text style="text_m_accent">
<placement x="%center_x%" y="%row3a_y%" placement="5"/>
- <text>Encrypt your Backup?</text>
+ <text>{@encrypt_backup=Encrypt your Backup?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Enter a Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -1829,12 +1829,12 @@
<text style="text_m_fail">
<condition var1="tw_password_not_match" var2="1"/>
<placement x="%indent%" y="%row8a_y%"/>
- <text>Passwords do not match!</text>
+ <text>{@pass_not_match=Passwords do not match!}</text>
</text>
<button style="main_button_half_height">
<placement x="%center_x%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_encrypt_backup=0</action>
<action function="set">tw_backup_password=</action>
@@ -1863,12 +1863,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Backup</text>
+ <text>{@backup_hdr=Backup}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="tabs_backup"/>
@@ -1879,7 +1879,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1893,7 +1893,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
- <text>ENCRYPTION</text>
+ <text>{@encryption_tab=ENCRYPTION}</text>
<font resource="font_s" color="%text_success_color%"/>
<actions>
<action function="set">tw_password_not_match=0</action>
@@ -1907,12 +1907,12 @@
<text style="text_m_accent">
<placement x="%center_x%" y="%row3a_y%" placement="5"/>
- <text>Encrypt your Backup?</text>
+ <text>{@encrypt_backup=Encrypt your Backup?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Enter Password again:</text>
+ <text>{@enter_pass2=Enter Password again:}</text>
</text>
<input>
@@ -1929,7 +1929,7 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_encrypt_backup=0</action>
<action function="set">tw_backup_password=</action>
@@ -1995,7 +1995,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row19_y%"/>
- <text>Progress:</text>
+ <text>{@progress=Progress:}</text>
</text>
<text style="text_m">
@@ -2010,7 +2010,7 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="cancelbackup"/>
</button>
@@ -2023,7 +2023,7 @@
<condition var1="tw_cancel_backup" var2="0"/>
<actions>
<action function="set">tw_back=backup</action>
- <action function="set">tw_complete_text1=Backup Complete</action>
+ <action function="set">tw_complete_text1={@backup_complete=Backup Complete}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2034,7 +2034,7 @@
<condition var1="tw_cancel_backup" var2="1"/>
<actions>
<action function="set">tw_back=backup</action>
- <action function="set">tw_complete_text1=Backup Cancelled</action>
+ <action function="set">tw_complete_text1={@backup_cancel=Backup Cancelled}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2046,19 +2046,19 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select Backup from %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@restore_sel_store_hdr=Select Backup from %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<template name="sort_options"/>
<fileselector>
<placement x="%indent%" y="%row3_y%" w="%content_width%" h="%fileselector_install_height%"/>
- <text>Select Package to Restore:</text>
+ <text>{@restore_sel_pack_fs=Select Package to Restore:}</text>
<filter folders="1" files="0" nav="0"/>
<path name="tw_backups_folder"/>
<data name="tw_restore" default=""/>
@@ -2067,7 +2067,7 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="overlay">select_storage</action>
@@ -2115,17 +2115,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Encrypted Backup</text>
+ <text>{@restore_enc_backup_hdr=Encrypted Backup}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Enter Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -2148,12 +2148,12 @@
<text style="text_m_fail">
<condition var1="tw_password_fail" var2="1"/>
<placement x="%indent%" y="%row5_y%"/>
- <text>Password failed, please try again!</text>
+ <text>{@restore_dec_fail=Password failed, please try again!}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">restore</action>
@@ -2162,16 +2162,17 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row10_y%"/>
- <text>Delete Backup</text>
+ <text>{@del_backup_btn=Delete Backup}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; rm -rf "%tw_restore_name%"</action>
- <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
- <action function="set">tw_text2=This cannot be undone!</action>
- <action function="set">tw_action_text1=Deleting Backup...</action>
- <action function="set">tw_complete_text1=Backup Delete Complete</action>
- <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="set">tw_text1={@del_backup_confirm=Delete Backup?}</action>
+ <action function="set">tw_text2=%tw_restore_name%</action>
+ <action function="set">tw_text4={@del_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@deleting_backup=Deleting Backup...}</action>
+ <action function="set">tw_complete_text1={@backup_deleted=Backup Delete Complete}</action>
+ <action function="set">tw_slider_text={@swipe_delete=Swipe to Delete}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -2194,12 +2195,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Encrypted Backup - Trying Decryption</text>
+ <text>{@restore_try_decrypt=Encrypted Backup - Trying Decryption}</text>
</text>
<template name="console"/>
@@ -2238,17 +2239,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Backup made on %tw_restore_file_date%</text>
+ <text>{@restore_backup_date=Backup made on %tw_restore_file_date%}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<text style="text_m">
@@ -2272,36 +2273,36 @@
<partitionlist>
<placement x="%indent%" y="%row4a_y%" w="%content_width%" h="%partitionlist_backup_height%"/>
- <text>Select Partitions to Restore:</text>
+ <text>{@restore_sel_part=Select Partitions to Restore:}</text>
<data name="tw_restore_list" selectedlist="tw_restore_selected"/>
<listtype name="restore"/>
</partitionlist>
<checkbox>
<placement x="%indent%" y="%row17_y%"/>
- <text>Enable MD5 Verification of Backup Files</text>
+ <text>{@retore_enable_md5_chk=Enable MD5 Verification of Backup Files}</text>
<data variable="tw_skip_md5_check"/>
</checkbox>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Delete Backup</text>
+ <text>{@del_backup_btn=Delete Backup}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; rm -rf "%tw_restore_name%"</action>
- <action function="set">tw_text1=Delete Backup?</action>
+ <action function="set">tw_text1={@del_backup_confirm=Delete Backup?}</action>
<action function="set">tw_text2=%tw_restore_name%</action>
- <action function="set">tw_text4=This cannot be undone!</action>
- <action function="set">tw_action_text1=Deleting Backup...</action>
- <action function="set">tw_complete_text1=Backup Delete Complete</action>
- <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="set">tw_text4={@del_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@deleting_backup=Deleting Backup...}</action>
+ <action function="set">tw_complete_text1={@backup_deleted=Backup Delete Complete}</action>
+ <action function="set">tw_slider_text={@swipe_delete=Swipe to Delete}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<slider>
- <text>Swipe to Restore</text>
+ <text>{@swipe_restore=Swipe to Restore}</text>
<action function="page">restore_run</action>
</slider>
@@ -2321,17 +2322,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Rename Backup</text>
+ <text>{@rename_backup_hdr=Rename Backup}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -2343,11 +2344,11 @@
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; mv "%tw_restore_name%" "%tw_backup_rename%"</action>
- <action function="set">tw_text1=Rename Backup?</action>
- <action function="set">tw_text2=This cannot be undone!</action>
- <action function="set">tw_action_text1=Renaming Backup...</action>
- <action function="set">tw_complete_text1=Backup Rename Complete</action>
- <action function="set">tw_slider_text=Swipe to Rename</action>
+ <action function="set">tw_text1={@rename_backup_confirm=Rename Backup?}</action>
+ <action function="set">tw_text2={@rename_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@renaming_backup=Renaming Backup...}</action>
+ <action function="set">tw_complete_text1={@rename_backup_complete=Backup Rename Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_rename=Swipe to Rename}</action>
<action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_rename%</action>
<action function="set">tw_existpage=renamebackup</action>
<action function="set">tw_notexistpage=confirm_action</action>
@@ -2367,12 +2368,12 @@
<text style="text_m_fail">
<condition var1="tw_fileexists" var2="1"/>
<placement x="%indent%" y="%row4a_y%"/>
- <text>A backup with that name already exists!</text>
+ <text>{@backup_name_exists=A backup with that name already exists!}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">restore_select</action>
</button>
@@ -2394,7 +2395,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Restore</text>
+ <text>{@restore_hdr=Restore}</text>
</text>
<text style="text_m">
@@ -2408,7 +2409,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row19_y%"/>
- <text>Progress:</text>
+ <text>{@progress=Progress:}</text>
</text>
<text style="text_m">
@@ -2420,7 +2421,7 @@
<condition var1="tw_operation_state" var2="1"/>
<actions>
<action function="set">tw_back=restore_select</action>
- <action function="set">tw_complete_text1=Restore Complete</action>
+ <action function="set">tw_complete_text1={@restore_complete=Restore Complete}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2436,24 +2437,24 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text>
+ <text>{@storage_hdr=Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)}</text>
</text>
<partitionlist>
<placement x="%indent%" y="%row1a_y%" w="%content_width%" h="%partitionlist_mount_height%"/>
- <text>Select Partitions to Mount:</text>
+ <text>{@mount_sel_part=Select Partitions to Mount:}</text>
<listtype name="mount"/>
</partitionlist>
<button style="checkbox">
<condition var1="tw_mount_system_ro" op="=" var2="0"/>
<placement x="%indent%" y="%row15a_y%" textplacement="6"/>
- <text>Mount system partition read-only</text>
+ <text>{@mount_sys_ro_chk=Mount system partition read-only}</text>
<image resource="checkbox_false"/>
<action function="mountsystemtoggle">1</action>
</button>
@@ -2461,7 +2462,7 @@
<button style="checkbox">
<condition var1="tw_mount_system_ro" op="!=" var2="0"/>
<placement x="%indent%" y="%row15a_y%" textplacement="6"/>
- <text>Mount system partition read-only</text>
+ <text>{@mount_sys_ro_chk=Mount system partition read-only}</text>
<image resource="checkbox_true"/>
<actions>
<action function="set">tw_lifetime_writes=2</action>
@@ -2472,7 +2473,7 @@
<button style="main_button_half_height">
<condition var1="tw_has_usb_storage" var2="1"/>
<placement x="%indent%" y="%row18a_y%"/>
- <text>Mount USB Storage</text>
+ <text>{@mount_usb_storage_btn=Mount USB Storage}</text>
<action function="page">usb_mount</action>
</button>
@@ -2482,13 +2483,13 @@
<condition var1="tw_is_decrypted" var2="0"/>
</conditions>
<placement x="%center_x%" y="%row18a_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_btn=Decrypt Data}</text>
<action function="page">decrypt</action>
</button>
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Select Storage</text>
+ <text>{@select_storage_btn=Select Storage}</text>
<actions>
<action function="set">tw_back=mount</action>
<action function="overlay">select_storage</action>
@@ -2501,7 +2502,7 @@
<condition var1="tw_mtp_enabled" var2="0"/>
</conditions>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Enable MTP</text>
+ <text>{@enable_mtp_btn=Enable MTP}</text>
<action function="startmtp"/>
</button>
@@ -2511,7 +2512,7 @@
<condition var1="tw_mtp_enabled" var2="1"/>
</conditions>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Disable MTP</text>
+ <text>{@disable_mtp_btn=Disable MTP}</text>
<action function="stopmtp"/>
</button>
@@ -2531,32 +2532,32 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>USB Storage</text>
+ <text>{usb_storage_hdr=USB Storage}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>USB Storage Mounted</text>
+ <text>{@usb_stor_mnt1=USB Storage Mounted}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Be sure to safely remove your device</text>
+ <text>{@usb_stor_mnt2=Be sure to safely remove your device}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>from your computer before unmounting!</text>
+ <text>{@usb_stor_mnt3=from your computer before unmounting!}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Unmount</text>
+ <text>{@unmount_btn=Unmount}</text>
<action function="page">usb_umount</action>
</button>
@@ -2604,23 +2605,23 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Reboot Menu</text>
+ <text>{@reboot_hdr=Reboot Menu}</text>
</text>
<button style="main_button">
<condition var1="tw_reboot_system" var2="1"/>
<placement x="%indent%" y="%row2a_y%"/>
- <text>System</text>
+ <text>{@rb_system_btn=System}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2628,17 +2629,17 @@
<button style="main_button">
<condition var1="tw_reboot_poweroff" var2="1"/>
<placement x="%center_x%" y="%row2a_y%"/>
- <text>Power Off</text>
+ <text>{@rb_poweroff_btn=Power Off}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=poweroff</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to power off?</action>
- <action function="set">tw_action_text1=Turning Off...</action>
- <action function="set">tw_complete_text1=Turning Off...</action>
- <action function="set">tw_slider_text=Swipe to Power Off</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_ospo=sure you wish to power off?}</action>
+ <action function="set">tw_action_text1={@turning_off=Turning Off...}</action>
+ <action function="set">tw_complete_text1={@turning_off=Turning Off...}</action>
+ <action function="set">tw_slider_text={@swipe_power_off=Swipe to Power Off}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2646,17 +2647,17 @@
<button style="main_button">
<condition var1="tw_reboot_recovery" var2="1"/>
<placement x="%indent%" y="%row8_y%"/>
- <text>Recovery</text>
+ <text>{@rb_recovery_btn=Recovery}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=recovery</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2664,17 +2665,17 @@
<button style="main_button">
<condition var1="tw_reboot_bootloader" var2="1"/>
<placement x="%center_x%" y="%row8_y%"/>
- <text>Bootloader</text>
+ <text>{@rb_bootloader_btn=Bootloader}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=bootloader</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2682,17 +2683,17 @@
<button style="main_button">
<condition var1="tw_download_mode" var2="1"/>
<placement x="%indent%" y="%row13a_y%"/>
- <text>Download</text>
+ <text>{@rb_download_btn=Download}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=download</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Swipe to Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -2713,54 +2714,54 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Unmodified System Partition</text>
+ <text>{@sys_ro_hdr=Unmodified System Partition}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Keep System Read only?</text>
+ <text>{@sys_ro_keep=Keep System Read only?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>TWRP can leave your system partition unmodified</text>
+ <text>{@sys_rop1=TWRP can leave your system partition unmodified}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>to make it easier for you to take official updates.</text>
+ <text>{@sys_rop2=to make it easier for you to take official updates.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>TWRP will be unable to prevent the stock ROM from</text>
+ <text>{@sys_rop3=TWRP will be unable to prevent the stock ROM from}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>replacing TWRP and will not offer to root your device.</text>
+ <text>{@sys_rop4=replacing TWRP and will not offer to root your device.}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row9_y%" placement="5"/>
- <text>Installing zips or performing adb operations may still</text>
+ <text>{@sys_rop5=Installing zips or performing adb operations may still}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row10_y%" placement="5"/>
- <text>modify the system partition.</text>
+ <text>{@sys_rop6=modify the system partition.}</text>
</text>
<checkbox>
<condition var1="tw_is_encrypted" var2="0"/>
<placement x="%indent%" y="%row15_y%"/>
- <text>Never show this screen during boot again</text>
+ <text>{@sys_ro_never_show_chk=Never show this screen during boot again}</text>
<data variable="tw_never_show_system_ro_page"/>
</checkbox>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Keep Read Only</text>
+ <text>{@sys_ro_keep_ro_btn=Keep Read Only}</text>
<actions>
<action function="mountsystemtoggle">1</action>
<action function="set">tw_page_done=1</action>
@@ -2769,7 +2770,7 @@
</button>
<slider>
- <text>Swipe to Allow Modifications</text>
+ <text>{@swipe_allow_mod=Swipe to Allow Modifications}</text>
<actions>
<action function="mountsystemtoggle">0</action>
<action function="set">tw_page_done=1</action>
@@ -2783,45 +2784,45 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>General Settings</text>
+ <text>{@settings_gen_hdr=General Settings}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="0" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="0" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<listbox style="scrolllist">
<placement x="%indent%" y="%row3a_y%" w="%content_width%" h="%listbox_settings_height%"/>
<icon selected="checkbox_true" unselected="checkbox_false"/>
- <listitem name="Zip file signature verification">
+ <listitem name="{@zip_sig_chk=Zip signature verification}">
<data variable="tw_signed_zip_verify"/>
</listitem>
- <listitem name="Use rm -rf instead of formatting">
+ <listitem name="{@use_rmrf_chk=Use rm -rf instead of formatting}">
<data variable="tw_rm_rf"/>
</listitem>
- <listitem name="Skip MD5 generation during backup">
+ <listitem name="{@skip_md5_backup_chk=Skip MD5 generation during backup}">
<data variable="tw_skip_md5_generate"/>
</listitem>
- <listitem name="Enable MD5 verification of backup files">
+ <listitem name="{@retore_enable_md5_chk=Enable MD5 verification of backup files}">
<data variable="tw_skip_md5_check"/>
</listitem>
- <listitem name="Use 24-hour clock">
+ <listitem name="{@use24clock_chk=Use 24-hour clock}">
<data variable="tw_military_time"/>
</listitem>
- <listitem name="Reversed navbar layout">
+ <listitem name="{@rev_navbar_chk=Reversed navbar layout}">
<data variable="tw_samsung_navbar"/>
</listitem>
- <listitem name="Simulate actions for theme testing">
+ <listitem name="{@simact_chk=Simulate actions for theme testing}">
<data variable="tw_simulate_actions"/>
</listitem>
- <listitem name="Simulate failure for actions">
+ <listitem name="{@simfail_chk=Simulate failure for actions}">
<condition var1="tw_simulate_actions" var2="1"/>
<data variable="tw_simulate_fail"/>
</listitem>
@@ -2829,7 +2830,7 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Restore Defaults</text>
+ <text>{@restore_defaults_btn=Restore Defaults}</text>
<action function="restoredefaultsettings"/>
</button>
@@ -2849,83 +2850,83 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Time Zone Settings</text>
+ <text>{@time_zone_hdr=Time Zone}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="%tab4_col2_x%" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="%tab5_col2_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<listbox>
<placement x="%indent%" y="%row3_y%" w="%content_width%" h="%listbox_timezone_height%"/>
- <text>Select Time Zone:</text>
+ <text>{@sel_tz_list=Select Time Zone:}</text>
<data name="tw_time_zone_guisel"/>
- <listitem name="(UTC -11) Samoa, Midway Island">BST11;BDT</listitem>
- <listitem name="(UTC -10) Hawaii">HST10;HDT</listitem>
- <listitem name="(UTC -9) Alaska">AST9;ADT</listitem>
- <listitem name="(UTC -8) Pacific Time">PST8;PDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -7) Mountain Time">MST7;MDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -6) Central Time">CST6;CDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -5) Eastern Time">EST5;EDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -4) Atlantic Time">AST4;ADT</listitem>
- <listitem name="(UTC -3) Brazil, Buenos Aires">GRNLNDST3;GRNLNDDT</listitem>
- <listitem name="(UTC -2) Mid-Atlantic">FALKST2;FALKDT</listitem>
- <listitem name="(UTC -1) Azores, Cape Verde">AZOREST1;AZOREDT</listitem>
- <listitem name="(UTC 0) London, Dublin, Lisbon">GMT0;BST,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +1) Berlin, Brussels, Paris">CET-1;CEST,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +3) Moscow, Baghdad">SAUST-3;SAUDT</listitem>
- <listitem name="(UTC +4) Abu Dhabi, Tbilisi, Muscat">WST-4;WDT</listitem>
- <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem>
- <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem>
- <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem>
- <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem>
- <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem>
- <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem>
- <listitem name="(UTC +11) Vladivostok, Solomon Islands">MET-11;METDT</listitem>
- <listitem name="(UTC +12) Auckland, Wellington, Fiji">NZST-12;NZDT</listitem>
+ <listitem name="{@utcm11=(UTC -11) Samoa, Midway Island}">BST11;BDT</listitem>
+ <listitem name="{@utcm10=(UTC -10) Hawaii}">HST10;HDT</listitem>
+ <listitem name="{@utcm9=(UTC -9) Alaska}">AST9;ADT</listitem>
+ <listitem name="{@utcm8=(UTC -8) Pacific Time}">PST8;PDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm7=(UTC -7) Mountain Time}">MST7;MDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm6=(UTC -6) Central Time}">CST6;CDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm5=(UTC -5) Eastern Time}">EST5;EDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm4=(UTC -4) Atlantic Time}">AST4;ADT</listitem>
+ <listitem name="{@utcm3=(UTC -3) Brazil, Buenos Aires}">GRNLNDST3;GRNLNDDT</listitem>
+ <listitem name="{@utcm2=(UTC -2) Mid-Atlantic}">FALKST2;FALKDT</listitem>
+ <listitem name="{@utcm1=(UTC -1) Azores, Cape Verde}">AZOREST1;AZOREDT</listitem>
+ <listitem name="{@utc0=(UTC 0) London, Dublin, Lisbon}">GMT0;BST,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp1=(UTC +1) Berlin, Brussels, Paris}">CET-1;CEST,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp2=(UTC +2) Athens, Istanbul, South Africa}">WET-2;WET,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp3=(UTC +3) Moscow, Baghdad}">SAUST-3;SAUDT</listitem>
+ <listitem name="{@utcp4=(UTC +4) Abu Dhabi, Tbilisi, Muscat}">WST-4;WDT</listitem>
+ <listitem name="{@utcp5=(UTC +5) Yekaterinburg, Islamabad}">PAKST-5;PAKDT</listitem>
+ <listitem name="{@utcp6=(UTC +6) Almaty, Dhaka, Colombo}">TASHST-6;TASHDT</listitem>
+ <listitem name="{@utcp7=(UTC +7) Bangkok, Hanoi, Jakarta}">THAIST-7;THAIDT</listitem>
+ <listitem name="{@utcp8=(UTC +8) Beijing, Singapore, Hong Kong}">TAIST-8;TAIDT</listitem>
+ <listitem name="{@utcp9=(UTC +9) Tokyo, Seoul, Yakutsk}">JST-9;JSTDT</listitem>
+ <listitem name="{@utcp10=(UTC +10) Eastern Australia, Guam}">EET-10;EETDT</listitem>
+ <listitem name="{@utcp11=(UTC +11) Vladivostok, Solomon Islands}">MET-11;METDT</listitem>
+ <listitem name="{@utcp12=(UTC +12) Auckland, Wellington, Fiji}">NZST-12;NZDT</listitem>
</listbox>
<text style="text_m_accent">
<placement x="%indent%" y="%row15a_y%"/>
- <text>Select Offset (usually 0): %tw_time_zone_guioffset%</text>
+ <text>{@sel_tz_offset=Select Offset (usually 0): %tw_time_zone_guioffset%}</text>
</text>
<button style="button_quarter_width">
<placement x="%indent%" y="%row16a_y%"/>
- <text>None</text>
+ <text>{@tz_offset_none=None}</text>
<action function="set">tw_time_zone_guioffset=0</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col2_x%" y="%row16a_y%"/>
- <text>15</text>
+ <text>{@tz_offset_15=15}</text>
<action function="set">tw_time_zone_guioffset=15</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col3_x%" y="%row16a_y%"/>
- <text>30</text>
+ <text>{@tz_offset_30=30}</text>
<action function="set">tw_time_zone_guioffset=30</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col4_x%" y="%row16a_y%"/>
- <text>45</text>
+ <text>{@tz_offset_45=45}</text>
<action function="set">tw_time_zone_guioffset=45</action>
</button>
<checkbox>
<placement x="%indent%" y="%row18a_y%"/>
<font resource="font_m" color="%text_color%"/>
- <text>Use daylight savings time (DST)</text>
+ <text>{@use_dst_chk=Use daylight savings time (DST)}</text>
<data variable="tw_time_zone_guidst"/>
<image checked="checkbox_true" unchecked="checkbox_false"/>
</checkbox>
@@ -2933,14 +2934,14 @@
<text color="%text_color%">
<font resource="font_m"/>
<placement x="%indent%" y="%row20_y%"/>
- <text>Current Time Zone: %tw_time_zone%</text>
+ <text>{@curr_tz=Current Time Zone: %tw_time_zone%}</text>
</text>
<button>
<highlight color="%highlight_color%"/>
<placement x="%center_x%" y="%row21a_y%"/>
<font resource="font_m" color="%text_button_color%"/>
- <text>Set Time Zone</text>
+ <text>{@set_tz_btn=Set Time Zone}</text>
<image resource="main_button_half_height"/>
<action function="setguitimezone"/>
</button>
@@ -2961,18 +2962,18 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Screen Settings</text>
+ <text>{@settings_screen_hdr=Screen Settings}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="%center_x%" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="%tab5_col3_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<button>
@@ -2980,7 +2981,7 @@
<font resource="font_m" color="%text_color%"/>
<condition var1="tw_screen_timeout_secs" op="=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
- <text>Enable screen timeout</text>
+ <text>{@enable_timeout_chk=Enable screen timeout}</text>
<image resource="checkbox_false"/>
<action function="set">tw_screen_timeout_secs=60</action>
</button>
@@ -2990,7 +2991,7 @@
<font resource="font_m" color="%text_color%"/>
<condition var1="tw_screen_timeout_secs" op="!=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
- <text>Enable screen timeout</text>
+ <text>{@enable_timeout_chk=Enable screen timeout}</text>
<image resource="checkbox_true"/>
<action function="set">tw_screen_timeout_secs=0</action>
</button>
@@ -2999,14 +3000,14 @@
<condition var1="tw_screen_timeout_secs" op="!=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
<placement x="indent" y="%row5_y%" w="%content_width%"/>
- <text>Screen timeout in seconds:</text>
+ <text>{@screen_to_slider=Screen timeout in seconds:}</text>
<data variable="tw_screen_timeout_secs" min="15" max="300"/>
</slidervalue>
<slidervalue>
<condition var1="tw_has_brightnesss_file" var2="1"/>
<placement x="indent" y="%row10_y%" w="%content_width%"/>
- <text>Brightness: %tw_brightness_pct%%</text>
+ <text>{@screen_bright_slider=Brightness: %tw_brightness_pct%%}</text>
<data variable="tw_brightness_pct" min="10" max="100"/>
<actions>
<action function="set">tw_brightness=%tw_brightness_max%</action>
@@ -3032,35 +3033,35 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Vibration Settings</text>
+ <text>{@vibration_hdr=Vibration}</text>
</text>
<template name="tabs_settings"/>
<fill color="%text_color%">
- <placement x="%tab4_col4_x%" y="%row_tab_y%" w="%tab4_width%" h="%tab_indicator_height%"/>
+ <placement x="%tab5_col4_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
</fill>
<slidervalue>
<placement x="indent" y="%row4_y%" w="%content_width%"/>
- <text>Button Vibration:</text>
+ <text>{@button_vibration=Button Vibration:}</text>
<data variable="tw_button_vibrate" min="0" max="300"/>
</slidervalue>
<slidervalue>
<placement x="indent" y="%row9_y%" w="%content_width%"/>
- <text>Keyboard Vibration:</text>
+ <text>{@kb_vibration=Keyboard Vibration:}</text>
<data variable="tw_keyboard_vibrate" min="0" max="300"/>
</slidervalue>
<slidervalue>
<placement x="indent" y="%row14_y%" w="%content_width%"/>
- <text>Action Vibration:</text>
+ <text>{@act_vibration=Action Vibration:}</text>
<data variable="tw_action_vibrate" min="0" max="500"/>
</slidervalue>
@@ -3075,83 +3076,126 @@
</action>
</page>
+ <page name="settings_language">
+ <template name="page"/>
+
+ <text style="text_l">
+ <placement x="%col1_x_header%" y="%row3_header_y%"/>
+ <text>{@settings_hdr=Settings}</text>
+ </text>
+
+ <text style="text_m">
+ <placement x="%col1_x_header%" y="%row4_header_y%"/>
+ <text>{@language_hdr=Language - %tw_language_display%}</text>
+ </text>
+
+ <template name="tabs_settings"/>
+
+ <fill color="%text_color%">
+ <placement x="%tab5_col5_x%" y="%row_tab_y%" w="%tab5_width%" h="%tab_indicator_height%"/>
+ </fill>
+
+ <listbox>
+ <placement x="%indent%" y="%row3_y%" w="%content_width%" h="%listbox_settings_height%"/>
+ <text>{@select_language=Select Language:}</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <data name="tw_language" />
+ </listbox>
+
+ <button style="main_button_half_height">
+ <placement x="%center_x%" y="%row21a_y%"/>
+ <text>{@set_language_btn=Set Language}</text>
+ <action function="setlanguage"></action>
+ </button>
+
+ <action>
+ <touch key="home" />
+ <action function="page">main</action>
+ </action>
+
+ <action>
+ <touch key="back" />
+ <action function="page">settings</action>
+ </action>
+ </page>
+
<page name="advanced">
<template name="page"/>
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<button style="main_button">
<placement x="%indent%" y="%row2a_y%"/>
- <text>Copy Log to SD</text>
+ <text>{@copy_log_btn=Copy Log}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=copylog</action>
- <action function="set">tw_text1=Copy Log to SD Card?</action>
- <action function="set">tw_action_text1=Copying Log to SD Card...</action>
- <action function="set">tw_complete_text1=Log Copy Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@copy_log_confirm=Copy Log to SD Card?}</action>
+ <action function="set">tw_action_text1={@copying_log=Copying Log to SD Card...}</action>
+ <action function="set">tw_complete_text1={@copy_log_complete=Log Copy Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row2a_y%"/>
- <text>Fix Permissions</text>
+ <text>{@fix_perm_btn=Fix Permissions}</text>
<action function="page">fixperms</action>
</button>
<button style="main_button">
<condition var1="tw_allow_partition_sdcard" var2="1"/>
<placement x="%indent%" y="%row8_y%"/>
- <text>Partition SD Card</text>
+ <text>{@part_sd_btn=Partition SD Card}</text>
<action function="page">partsdcard</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row8_y%"/>
- <text>File Manager</text>
+ <text>{@file_manager_btn=File Manager}</text>
<action function="page">filemanagerlist</action>
</button>
<button style="main_button">
<placement x="%indent%" y="%row13a_y%"/>
- <text>Terminal</text>
+ <text>{@terminal_btn=Terminal}</text>
<action function="page">terminalfolder</action>
</button>
<button style="main_button">
<placement x="%center_x%" y="%row13a_y%"/>
- <text>Reload Theme</text>
+ <text>{@reload_theme_btn=Reload Theme}</text>
<action function="reload"/>
</button>
<button style="main_button">
<placement x="%indent%" y="%row19_y%"/>
- <text>ADB Sideload</text>
+ <text>{@adb_sideload_btn=ADB Sideload}</text>
<action function="page">sideload</action>
</button>
<button style="main_button">
<condition var1="tw_show_dumlock" var2="1"/>
<placement x="%center_x%" y="%row19_y%"/>
- <text>HTC Dumlock</text>
+ <text>{@dumlock_btn=HTC Dumlock}</text>
<action function="page">htcdumlock</action>
</button>
<button style="main_button">
<condition var1="tw_has_injecttwrp" var2="1"/>
<placement x="%center_x%" y="%row19_y%"/>
- <text>Re-Inject TWRP</text>
+ <text>{@inject_twrp_btn=Inject TWRP}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=reinjecttwrp</action>
- <action function="set">tw_text1=Re-Inject TWRP?</action>
- <action function="set">tw_action_text1=Re-Injecting TWRP...</action>
- <action function="set">tw_complete_text1=TWRP Injection Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action>
+ <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action>
+ <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -3172,27 +3216,27 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Partition SD Card</text>
+ <text>{@part_sd_hdr=Partition SD Card}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>You will lose all files on your SD card!</text>
+ <text>{@part_sd_lose=You will lose all files on your SD card!}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>This action cannot be undone!</text>
+ <text>{@part_sd_undo=This action cannot be undone!}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>EXT Size:</text>
+ <text>{@part_sd_ext_sz=EXT Size:}</text>
</text>
<text style="text_m">
@@ -3202,19 +3246,19 @@
<button style="button_quarter_width">
<placement x="%indent%" y="%row6_y%"/>
- <text>-</text>
+ <text>{@part_sd_m=-}</text>
<action function="addsubtract">tw_sdext_size-128</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col4_x%" y="%row6_y%"/>
- <text>+</text>
+ <text>{@part_sd_p=+}</text>
<action function="addsubtract">tw_sdext_size+128</action>
</button>
<text style="text_m_accent">
<placement x="%center_x%" y="%row9_y%" placement="5"/>
- <text>Swap Size:</text>
+ <text>{@part_sd_swap_sz=Swap Size:}</text>
</text>
<text style="text_m">
@@ -3224,19 +3268,19 @@
<button style="button_quarter_width">
<placement x="%indent%" y="%row10_y%"/>
- <text>-</text>
+ <text>{@part_sd_m=-}</text>
<action function="addsubtract">tw_swap_size-32</action>
</button>
<button style="button_quarter_width">
<placement x="%btn4_col4_x%" y="%row10_y%"/>
- <text>+</text>
+ <text>{@part_sd_p=+}</text>
<action function="addsubtract">tw_swap_size+32</action>
</button>
<text style="text_m_accent">
<placement x="%center_x%" y="%row13_y%" placement="5"/>
- <text>File System:</text>
+ <text>{@file_system=File System:}</text>
</text>
<text style="text_m">
@@ -3257,7 +3301,7 @@
</button>
<slider>
- <text>Swipe to Partition</text>
+ <text>{@swipe_part_sd=Swipe to Partition}</text>
<action function="page">partsdcardaction</action>
<actions>
<action function="set">tw_back=partsdcard</action>
@@ -3265,9 +3309,9 @@
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=set</action>
<action function="set">tw_action2_param=tw_zip_location=/sdcard</action>
- <action function="set">tw_action_text1=Partitioning SD Card...</action>
- <action function="set">tw_action_text2=This will take a few minutes.</action>
- <action function="set">tw_complete_text1=Partitioning Complete</action>
+ <action function="set">tw_action_text1={@partitioning_sd=Partitioning SD Card...}</action>
+ <action function="set">tw_action_text2={@partitioning_sd2=This will take a few minutes.}</action>
+ <action function="set">tw_complete_text1={@part_sd_complete=Partitioning Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -3288,52 +3332,52 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>HTC Dumlock</text>
+ <text>{@dumlock_hdr=HTC Dumlock}</text>
</text>
<button style="main_button_half_height_full_width">
<placement x="%indent%" y="%row15a_y%"/>
- <text>Restore Original Boot</text>
+ <text>{@dumlock_restore_btn=Restore Original Boot}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=htcdumlockrestoreboot</action>
- <action function="set">tw_text1=Restore original boot image?</action>
- <action function="set">tw_action_text1=Restoring Original Boot...</action>
- <action function="set">tw_complete_text1=Restore Original Boot Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@dumlock_restore_confirm=Restore original boot image?}</action>
+ <action function="set">tw_action_text1={@dumlock_restoring=Restoring Original Boot...}</action>
+ <action function="set">tw_complete_text1={@dumlock_restore_complete=Restore Original Boot Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_height_full_width">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Reflash Recovery</text>
+ <text>{@dumlock_reflash_btn=Reflash Recovery}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=htcdumlockreflashrecovery</action>
- <action function="set">tw_text1=Reflash recovery to boot?</action>
- <action function="set">tw_action_text1=Flashing recovery to boot...</action>
- <action function="set">tw_complete_text1=Recovery Flash to Boot Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@dumlock_reflash_confirm=Reflash recovery to boot?}</action>
+ <action function="set">tw_action_text1={@dumlock_reflashing=Flashing recovery to boot...}</action>
+ <action function="set">tw_complete_text1={@dumlock_reflash_complete=Recovery Flash to Boot Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_height_full_width">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Install HTC Dumlock</text>
+ <text>{@dumlock_install_btn=Install HTC Dumlock}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=installhtcdumlock</action>
- <action function="set">tw_text1=Install HTC dumlock files to ROM?</action>
- <action function="set">tw_action_text1=Installing HTC Dumlock...</action>
- <action function="set">tw_complete_text1=HTC Dumlock Install Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_text1={@dumlock_install_confirm=Install HTC dumlock files to ROM?}</action>
+ <action function="set">tw_action_text1={@dumlock_installing=Installing HTC Dumlock...}</action>
+ <action function="set">tw_complete_text1={@dumlock_install_complete=HTC Dumlock Install Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -3358,7 +3402,7 @@
</image>
<slider>
- <text>Swipe to Unlock</text>
+ <text>{@swipe_to_unlock=Swipe to Unlock}</text>
<action function="overlay"/>
</slider>
</page>
@@ -3368,12 +3412,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select a File or Folder</text>
+ <text>{@fm_sel_file=Select a File or Folder}</text>
</text>
<template name="sort_options"/>
@@ -3392,14 +3436,14 @@
<actions>
<action function="set">tw_filename1=tw_file_location1</action>
<action function="set">tw_fm_isfolder=1</action>
- <action function="set">tw_fm_type=Folder</action>
+ <action function="set">tw_fm_type={@fm_type_folder=Folder}</action>
<action function="page">filemanageroptions</action>
</actions>
</button>
<action>
<actions>
- <action function="set">tw_fm_type=File</action>
+ <action function="set">tw_fm_type={@fm_type_file=File}</action>
<action function="set">tw_fm_isfolder=0</action>
</actions>
</action>
@@ -3425,17 +3469,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Choose Action</text>
+ <text>{@fm_choose_act=Choose Action}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>%tw_fm_type% selected:</text>
+ <text>{@fm_selected=%tw_fm_type% selected:}</text>
</text>
<text style="text_m">
@@ -3446,10 +3490,10 @@
<button style="main_button_half_height">
<condition var1="tw_fm_isfolder" var2="0"/>
<placement x="%indent%" y="%row15a_y%"/>
- <text>Copy File</text>
+ <text>{@fm_copy_file_btn=Copy File}</text>
<actions>
<action function="set">tw_filemanager_command=cp</action>
- <action function="set">tw_fm_text1=Copying</action>
+ <action function="set">tw_fm_text1={@fm_copying=Copying}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
@@ -3457,30 +3501,30 @@
<button style="main_button_half_height">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%indent%" y="%row15a_y%"/>
- <text>Copy Folder</text>
+ <text>{@fm_copy_folder_btn=Copy Folder}</text>
<actions>
<action function="set">tw_filemanager_command=cd "%tw_file_location1%" &amp;&amp; cd .. &amp;&amp; cp -R</action>
- <action function="set">tw_fm_text1=Copying</action>
+ <action function="set">tw_fm_text1={@fm_copying=Copying}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%center_x%" y="%row15a_y%"/>
- <text>Move</text>
+ <text>{@fm_move_btn=Move}</text>
<actions>
<action function="set">tw_filemanager_command=mv</action>
- <action function="set">tw_fm_text1=Moving</action>
+ <action function="set">tw_fm_text1={@fm_moving=Moving}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>chmod 755</text>
+ <text>{@fm_chmod755_btn=chmod 755}</text>
<actions>
<action function="set">tw_filemanager_command=chmod 755</action>
- <action function="set">tw_fm_text1=chmod 755</action>
+ <action function="set">tw_fm_text1={@fm_chmod755ing=chmod 755}</action>
<action function="set">tw_fm_text2=</action>
<action function="set">tw_fm_text3=</action>
<action function="set">tw_include_text3=0</action>
@@ -3491,7 +3535,7 @@
<button style="main_button_half_height">
<placement x="%center_x%" y="%row18a_y%"/>
- <text>chmod</text>
+ <text>{@fm_chmod_btn=chmod}</text>
<actions>
<action function="set">tw_filemanager_rename=0000</action>
<action function="set">tw_fm_text2=</action>
@@ -3504,10 +3548,10 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Delete</text>
+ <text>{@fm_delete_btn=Delete}</text>
<actions>
<action function="set">tw_filemanager_command=rm -rf</action>
- <action function="set">tw_fm_text1=Deleting</action>
+ <action function="set">tw_fm_text1={@fm_deleting=Deleting}</action>
<action function="set">tw_fm_text2=</action>
<action function="set">tw_fm_text3=</action>
<action function="set">tw_include_text3=0</action>
@@ -3519,10 +3563,10 @@
<button style="main_button_half_height">
<condition var1="tw_fm_isfolder" var2="0"/>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Rename File</text>
+ <text>{@fm_rename_file_btn=Rename File}</text>
<actions>
<action function="set">tw_filemanager_rename=tw_selection1</action>
- <action function="set">tw_fm_text1=Renaming</action>
+ <action function="set">tw_fm_text1={@fm_renaming=Renaming}</action>
<action function="set">tw_filemanager_command=mv</action>
<action function="page">filemanagerrenamefile</action>
</actions>
@@ -3531,10 +3575,10 @@
<button style="main_button_half_height">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%center_x%" y="%row21a_y%"/>
- <text>Rename Folder</text>
+ <text>{@fm_rename_folder_btn=Rename Folder}</text>
<actions>
<action function="set">tw_filemanager_rename=tw_selection1</action>
- <action function="set">tw_fm_text1=Renaming</action>
+ <action function="set">tw_fm_text1={@fm_renaming=Renaming}</action>
<action function="set">tw_filemanager_command=cd "%tw_file_location1%" &amp;&amp; cd .. &amp;&amp; mv</action>
<action function="page">filemanagerrenamefolder</action>
</actions>
@@ -3556,12 +3600,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Select Destination Folder</text>
+ <text>{@fm_sel_dest=Select Destination Folder}</text>
</text>
<template name="sort_options"/>
@@ -3602,17 +3646,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Rename %tw_fm_type%</text>
+ <text>{@fm_rename_hdr=Rename} %tw_fm_type%</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -3635,7 +3679,7 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -3657,17 +3701,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Rename %tw_fm_type%</text>
+ <text>{@fm_rename_hdr=Rename} %tw_fm_type%</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -3690,7 +3734,7 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -3712,17 +3756,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Set Permissions</text>
+ <text>{@fm_set_perms_hdr=Set Permissions}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row2_y%"/>
- <text>Permissions:</text>
+ <text>{@fm_perms=Permissions:}</text>
</text>
<input>
@@ -3744,7 +3788,7 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -3766,12 +3810,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Confirm Action</text>
+ <text>{@confirm_action=Confirm Action}</text>
</text>
<text style="text_m_accent">
@@ -3796,11 +3840,11 @@
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider>
- <text>Swipe to Confirm</text>
+ <text>{@swipe_to_confirm=Swipe to Confirm}</text>
<action function="page">filemanageraction</action>
</slider>
@@ -3820,7 +3864,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>File Manager</text>
+ <text>{@fm_hdr=File Manager}</text>
</text>
<text style="text_m">
@@ -3839,7 +3883,7 @@
</conditions>
<actions>
<action function="set">tw_back=filemanagerlist</action>
- <action function="set">tw_complete_text1=File Operation Complete</action>
+ <action function="set">tw_complete_text1={@fm_complete=File Operation Complete}</action>
<action function="page">action_complete</action>
</actions>
</action>
@@ -3850,7 +3894,7 @@
<condition var1="tw_operation_status" op="!=" var2="0"/>
</conditions>
<actions>
- <action function="set">tw_complete_text1=File Operation Complete</action>
+ <action function="set">tw_complete_text1={@fm_complete=File Operation Complete}</action>
<action function="page">action_complete</action>
</actions>
</action>
@@ -3876,17 +3920,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_hdr=Decrypt Data}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Enter Password:</text>
+ <text>{@decrypt_data_enter_pass=Enter Password:}</text>
</text>
<input>
@@ -3909,12 +3953,12 @@
<text style="text_m_fail">
<condition var1="tw_password_fail" var2="1"/>
<placement x="%indent%" y="%row5_y%"/>
- <text>Password failed, please try again!</text>
+ <text>{@decryt_data_failed=Password failed, please try again!}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row10_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">main</action>
@@ -3929,17 +3973,17 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_hdr=Decrypt Data}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Enter Pattern:</text>
+ <text>{@decrypt_data_enter_pattern=Enter Pattern.}</text>
</text>
<patternpassword>
@@ -3953,7 +3997,7 @@
<button style="main_button_half_height">
<placement x="%indent%" y="%row21a_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">main</action>
@@ -3966,12 +4010,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Mount</text>
+ <text>{@mount_hdr=Mount}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Decrypt Data - Trying Decryption</text>
+ <text>{@decrypt_data_trying=Trying Decryption}</text>
</text>
<template name="console"/>
@@ -4010,12 +4054,12 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Terminal Command</text>
+ <text>{@term_hdr=Terminal Command}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Browse to Starting Folder</text>
+ <text>{@term_sel_folder_hdr=Browse to Starting Folder}</text>
</text>
<template name="sort_options"/>
@@ -4050,7 +4094,7 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Terminal Command</text>
+ <text>{term_hdr=Terminal Command}</text>
</text>
<text style="text_m">
@@ -4077,7 +4121,7 @@
<highlight color="%highlight_color%"/>
<placement x="%btn4_col4_x%" y="%row12a_y%"/>
<font resource="font_m" color="%text_button_color%"/>
- <text>Kill</text>
+ <text>{@term_kill_btn=Kill}</text>
<image resource="tab_4"/>
<action function="killterminal"/>
</button>
@@ -4100,35 +4144,35 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>ADB Sideload</text>
+ <text>{@adb_sideload_hdr=ADB Sideload}</text>
</text>
<checkbox>
<placement x="%indent%" y="%row2_y%"/>
- <text>Wipe Dalvik Cache</text>
+ <text>{@sideload_wipe_dalvik_chk=Wipe Dalvik Cache}</text>
<data variable="tw_wipe_dalvik"/>
</checkbox>
<checkbox>
<placement x="%indent%" y="%row3a_y%"/>
- <text>Wipe Cache</text>
+ <text>{@sideload_wipe_cache_chk=Wipe Cache}</text>
<data variable="tw_wipe_cache"/>
</checkbox>
<slider>
- <text>Swipe to start Sideload</text>
+ <text>{@swipe_to_sideload=Swipe to Start Sideload}</text>
<action function="page">partsdcardaction</action>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=adbsideload</action>
- <action function="set">tw_action_text1=ADB Sideload</action>
- <action function="set">tw_action_text2=Usage: adb sideload filename.zip</action>
- <action function="set">tw_complete_text1=ADB Sideload Complete</action>
+ <action function="set">tw_action_text1={@sideload_confirm=ADB Sideload}</action>
+ <action function="set">tw_action_text2={@sideload_usage=Usage: adb sideload filename.zip}</action>
+ <action function="set">tw_complete_text1={@sideload_complete=ADB Sideload Complete}</action>
<action function="set">tw_has_cancel=1</action>
<action function="set">tw_show_reboot=1</action>
<action function="set">tw_cancel_action=adbsideloadcancel</action>
@@ -4152,43 +4196,43 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>Fix Permissions</text>
+ <text>{@fix_perms_hdr=Fix Permissions}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Note: Fixing permissions is rarely needed.</text>
+ <text>{@fix_perms_note=Note: Fixing permissions is rarely needed.}</text>
</text>
<checkbox>
<placement x="%indent%" y="%row4_y%"/>
- <text>Also fix SELinux Contexts</text>
+ <text>{@fix_perms_selinux_chk=Also fix SELinux Contexts}</text>
<data variable="tw_fixperms_restorecon"/>
</checkbox>
<text style="text_m_fail">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>Fixing SELinux Contexts may cause</text>
+ <text>{@fix_perms_sel_note1=Fixing SELinux Contexts may cause}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>your device to not boot properly.</text>
+ <text>{@fix_perms_sel_note2=your device to not boot properly.}</text>
</text>
<slider>
- <text>Swipe to Fix Permissions</text>
+ <text>{@swipe_to_fix_perms=Swipe to Fix Permissions}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=fixpermissions</action>
- <action function="set">tw_action_text1=Fixing Permissions...</action>
- <action function="set">tw_complete_text1=Fix Permissions Complete</action>
- <action function="set">tw_slider_text=Swipe to Confirm</action>
+ <action function="set">tw_action_text1={@fixing_perms=Fixing Permissions...}</action>
+ <action function="set">tw_complete_text1={@fix_perms_complete=Fix Permissions Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_page</action>
</actions>
@@ -4210,40 +4254,40 @@
<text style="text_l">
<placement x="%col1_x_header%" y="%row3_header_y%"/>
- <text>Reboot</text>
+ <text>{@reboot_hdr=Reboot}</text>
</text>
<text style="text_m">
<placement x="%col1_x_header%" y="%row4_header_y%"/>
- <text>SuperSU Check</text>
+ <text>{@su_hdr=SuperSU Check}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Your device does not appear to be rooted.</text>
+ <text>{@su_note1=Your device does not appear to be rooted.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Install SuperSU now?</text>
+ <text>{@su_note2=Install SuperSU now?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>This will root your device.</text>
+ <text>{@su_note3=This will root your device.}</text>
</text>
<button style="main_button_half_height">
<placement x="%indent%" y="%row18a_y%"/>
- <text>Do not Install</text>
+ <text>{@su_cancel=Do not Install}</text>
<action function="set">tw_page_done=1</action>
</button>
<slider>
- <text>Swipe to Install</text>
+ <text>{@swipe_su_to_install=Swipe to Install}</text>
<actions>
<action function="set">tw_action=installsu</action>
- <action function="set">tw_action_text1=Installing SuperSU</action>
+ <action function="set">tw_action_text1={@su_installing=Installing SuperSU}</action>
<action function="set">tw_action_text2=</action>
<action function="page">singleaction_page</action>
</actions>
@@ -4281,14 +4325,14 @@
</fill>
<partitionlist style="partitionlist_storage">
- <text>Select Storage</text>
+ <text>{@sel_storage_list=Select Storage}</text>
<data name="tw_storage_path"/>
<listtype name="storage"/>
</partitionlist>
<button style="button_third_width">
<placement x="%dialog_button_x%" y="%row14_y%"/>
- <text>OK</text>
+ <text>{@ok_btn=OK}</text>
<actions>
<action function="set">tw_clear_destination=%tw_back%</action>
<action function="overlay"/>
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index 62d0b017f..2ed266aad 100644..100755
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -184,19 +184,19 @@
<button style="main_button">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Install</text>
+ <text>{@install_btn=Install}</text>
<action function="page">install_type</action>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Wipe</text>
+ <text>{@wipe_btn=Wipe}</text>
<action function="page">wipe_type1</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Backup</text>
+ <text>{@backup_btn=Backup}</text>
<actions>
<action function="set">tw_back=main</action>
<action function="page">backup_selectstorage</action>
@@ -205,13 +205,13 @@
<button style="main_button">
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Restore</text>
+ <text>{@restore_btn=Restore}</text>
<action function="page">restore</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Reboot</text>
+ <text>{@reboot_btn=Reboot}</text>
<action function="page">reboot</action>
</button>
@@ -228,39 +228,39 @@
<button style="main_button">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Mount</text>
+ <text>{@mount_btn=Mount}</text>
<action function="page">mount</action>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Settings</text>
+ <text>{@settings_btn=Settings}</text>
<action function="page">settings</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Files</text>
+ <text>{@files_btn=Files}</text>
<action function="page">filemanagerlist</action>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Copy Log</text>
+ <text>{@copy_log_btn=Copy Log}</text>
<actions>
<action function="set">tw_back=main3</action>
<action function="set">tw_action=copylog</action>
- <action function="set">tw_text1=Copy Log to SD Card?</action>
- <action function="set">tw_action_text1=Copying Log to SD Card...</action>
- <action function="set">tw_complete_text1=Log Copy Complete</action>
- <action function="set">tw_slider_text= Confirm</action>
+ <action function="set">tw_text1={@copy_log_confirm=Copy Log to SD Card?}</action>
+ <action function="set">tw_action_text1={@copying_log=Copying Log to SD Card...}</action>
+ <action function="set">tw_complete_text1={@copy_log_complete=Log Copy Complete}</action>
+ <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row11_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_btn=Advanced}</text>
<action function="page">advanced</action>
</button>
@@ -289,12 +289,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install &gt; Select Type</text>
+ <text>{@install_hdr=Install} &gt; {@select_type_hdr=Select Type}</text>
</text>
<button style="main_button_full_width">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Install Zip</text>
+ <text>{@install_zip_btn=Install Zip}</text>
<actions>
<action function="queueclear"/>
<action function="set">tw_selectimage=0</action>
@@ -304,7 +304,7 @@
<button style="main_button_full_width">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Install Image</text>
+ <text>{@install_image_btn=Install Image}</text>
<actions>
<action function="queueclear"/>
<action function="set">tw_selectimage=1</action>
@@ -314,7 +314,7 @@
<button style="main_button_full_width">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>ADB Sideload</text>
+ <text>{@adb_sideload_btn=ADB Sideload}</text>
<action function="page">sideload</action>
</button>
@@ -337,13 +337,13 @@
<text style="text_m">
<condition var1="tw_selectimage" var2="0"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Zip &gt; Select File</text>
+ <text>{@install_zip_hdr=Install Zip} &gt; {@install_select_file_hdr=Select File}</text>
</text>
<text style="text_m">
<condition var1="tw_selectimage" var2="1"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Image &gt; Select File</text>
+ <text>{@install_image_hdr=Install Image} &gt; {@install_select_file_hdr=Select File}</text>
</text>
<fileselector>
@@ -371,7 +371,7 @@
<highlight color="%highlight_color%"/>
<image resource="q_btn_storage"/>
<actions>
- <action function="set">tw_storagetext=Install &gt; Select Storage</action>
+ <action function="set">tw_storagetext={@install_hdr=Install} &gt; {@select_storage_hdr=Select Storage}</action>
<action function="set">tw_back=install</action>
<action function="page">select_storage</action>
</actions>
@@ -414,12 +414,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Zip &gt; Queue</text>
+ <text>{@install_zip_hdr=Install Zip} &gt; {@queue_hdr=Queue}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row1_y%"/>
- <text>File %tw_zip_queue_count% of 10:</text>
+ <text>{@zip_queue_count_s=File %tw_zip_queue_count% of 10:}</text>
</text>
<text style="text_m">
@@ -429,7 +429,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row4_y%"/>
- <text>Folder:</text>
+ <text>{@folder=Folder:}</text>
</text>
<text style="text_m">
@@ -439,7 +439,7 @@
<text style="text_m">
<placement x="%indent%" y="%row8_y%"/>
- <text>Press back button to clear the queue.</text>
+ <text>{@zip_back_clear=Press back button to clear the queue.}</text>
</text>
<button>
@@ -495,19 +495,19 @@
<text style="text_m">
<condition var1="tw_selectimage" var2="0"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Zip &gt; Options</text>
+ <text>{@install_zip_hdr=Install Zip} &gt; {@options_hdr=Options}</text>
</text>
<checkbox>
<placement x="%indent%" y="%row1_y%"/>
- <text>Zip file signature verification</text>
+ <text>{@zip_sig_chk=Zip file signature verification}</text>
<data variable="tw_signed_zip_verify"/>
</checkbox>
<checkbox>
<condition var1="tw_has_injecttwrp" var2="1"/>
<placement x="%indent%" y="%row2a_y%"/>
- <text>Inject TWRP after install</text>
+ <text>{@inject_twrp_chk=Inject TWRP after install}</text>
<data variable="tw_inject_after_zip"/>
</checkbox>
@@ -543,12 +543,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Zip &gt; Confirm Flash</text>
+ <text>{@install_zip_hdr=Install Zip} &gt; {@confirm_flash_hdr=Confirm Flash}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row1_y%"/>
- <text>File:</text>
+ <text>{@file=File:}</text>
</text>
<text style="text_m">
@@ -564,12 +564,12 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row4_y%"/>
- <text>Queue:</text>
+ <text>{@zip_queue=Queue:}</text>
</text>
<text style="text_m">
<placement x="%indent%" y="%row5_y%"/>
- <text>%tw_zip_queue_count% of 10 files queued</text>
+ <text>{@zip_queue_count_s=File %tw_zip_queue_count% of 10:}</text>
</text>
<button>
@@ -580,21 +580,21 @@
<listbox style="listbox_options">
<placement x="%col1_x_left%" y="%row8_y%" w="%content_width%" h="80"/>
- <listitem name="Zip file signature verification">
+ <listitem name="{@zip_sig_chk=Zip signature verification}">
<data variable="tw_signed_zip_verify"/>
</listitem>
</listbox>
<text style="text_m_accent">
<placement x="%indent%" y="%row7_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<text style="text_m">
<condition var1="tw_has_injecttwrp" var2="1"/>
<condition var1="tw_inject_after_zip" var2="1"/>
<placement x="%indent%" y="%row9_y%"/>
- <text>Inject TWRP after install</text>
+ <text>{@inject_twrp_chk=Inject TWRP after install}</text>
</text>
<button>
@@ -604,7 +604,7 @@
</button>
<slider>
- <text> Confirm</text>
+ <text>{@swipe_confirm= Confirm}</text>
<action function="flash">flash_zip</action>
</slider>
@@ -629,7 +629,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Installing Zip: %tw_file%</text>
+ <text>{@installing_zip=Installing Zip: %tw_file%}</text>
</text>
<template name="console"/>
@@ -650,20 +650,20 @@
<text style="text_m_fail">
<condition var1="tw_operation_status" op="!=" var2="0"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Installation Failed</text>
+ <text>{@install_failed=Installation Failed}</text>
</text>
<text style="text_m">
<condition var1="tw_operation_status" var2="0"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Installation Successful</text>
+ <text>{@install_successful=Installation Successful}</text>
</text>
<template name="console"/>
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row13_y%"/>
- <text>Wipe cache/dalvik</text>
+ <text>{@wipe_cache_dalvik_btn=Wipe cache/dalvik}</text>
<actions>
<action function="set">tw_back=flash_done</action>
<action function="set">tw_action=wipe</action>
@@ -671,30 +671,30 @@
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=wipe</action>
<action function="set">tw_action2_param=dalvik</action>
- <action function="set">tw_text1=Wipe Cache &amp; Dalvik?</action>
- <action function="set">tw_action_text1=Wiping Cache &amp; Dalvik...</action>
- <action function="set">tw_complete_text1=Cache &amp; Dalvik Wipe Complete</action>
- <action function="set">tw_slider_text= Wipe</action>
+ <action function="set">tw_text1={@wipe_cache_dalvik_confirm=Wipe Cache &amp; Dalvik?}</action>
+ <action function="set">tw_action_text1={@wiping_cache_dalvik=Wiping Cache &amp; Dalvik...}</action>
+ <action function="set">tw_complete_text1={@wipe_cache_dalvik_complete=Cache &amp; Dalvik Wipe Complete}</action>
+ <action function="set">tw_slider_text={@swipe_wipe_s= Wipe}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row13_y%"/>
- <text>Reboot System</text>
+ <text>{@reboot_system_btn=Reboot System}</text>
<actions>
<action function="set">tw_back=main2</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
<action function="set">tw_text3=</action>
<action function="set">tw_text4=</action>
- <action function="set">tw_action_text1=Rebooting...</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text= Reboot</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -723,7 +723,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Image &gt; Select Target Partition</text>
+ <text>{@install_image_hdr=Install Image} &gt; {install_sel_target=Select Target Partition}</text>
</text>
<partitionlist style="partitionlist_headerless_rb">
@@ -763,12 +763,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install Image &gt; Confirm Flash</text>
+ <text>{@install_image_hdr=Install Image} &gt; {@confirm_flash_hdr=Confirm Flash}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row1_y%"/>
- <text>File:</text>
+ <text>{@file=File:}</text>
</text>
<text style="text_m">
@@ -784,7 +784,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row4_y%"/>
- <text>Target Partition:</text>
+ <text>{@target_partition=Target Partition:}</text>
</text>
<text style="text_m">
@@ -799,14 +799,14 @@
</button>
<slider>
- <text> Confirm</text>
+ <text>{@swipe_confirm= Confirm}</text>
<actions>
<action function="set">tw_back=flashimage_confirm</action>
<action function="set">tw_action=flashimage</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_action_text1=Flashing Image...</action>
+ <action function="set">tw_action_text1={@flashing_image=Flashing Image...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Image Flashed</action>
+ <action function="set">tw_complete_text1={@image_flashed=Image Flashed}</action>
<action function="page">action_page</action>
</actions>
<action function="flashimage"/>
@@ -858,7 +858,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Confirm Action</text>
+ <text>{@confirm_action=Confirm Action}</text>
</text>
<text style="text_m_accent">
@@ -897,7 +897,7 @@
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider>
@@ -936,7 +936,7 @@
<button style="main_button_half_height">
<condition var1="tw_has_cancel" var2="1"/>
<placement x="%col1_x_right%" y="%row13_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="%tw_cancel_action%">%tw_cancel_param%</action>
</button>
@@ -1008,20 +1008,20 @@
<text style="text_m_fail">
<condition var1="tw_operation_status" op="!=" var2="0"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>%tw_complete_text1% Failed</text>
+ <text>%tw_complete_text1% {@failed=Failed}</text>
</text>
<text style="text_m">
<condition var1="tw_operation_status" var2="0"/>
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>%tw_complete_text1% Successful</text>
+ <text>%tw_complete_text1% {@successful=Successful}</text>
</text>
<template name="console"/>
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row13_y%"/>
- <text>Back</text>
+ <text>{@back_btn=Back}</text>
<actions>
<action function="set">tw_clear_destination=%tw_back%</action>
<action function="page">clear_vars</action>
@@ -1030,20 +1030,20 @@
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row13_y%"/>
- <text>Reboot System</text>
+ <text>{@reboot_system_btn=Reboot System}</text>
<actions>
<action function="set">tw_back=main2</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
<action function="set">tw_text3=</action>
<action function="set">tw_text4=</action>
- <action function="set">tw_action_text1=Rebooting...</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
<action function="set">tw_action_text2=</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text= Reboot</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -1112,18 +1112,18 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; Select Type</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@select_type_hdr=Select Type}</text>
</text>
<button style="main_button_full_width">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Factory Reset</text>
+ <text>{@factory_reset_btn=Factory Reset}</text>
<action function="page">wipe</action>
</button>
<button style="main_button_full_width">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Advanced Wipe</text>
+ <text>{@advanced_wipe_btn=Advanced Wipe}</text>
<actions>
<action function="set">partitionlisterror=0</action>
<action function="page">advancedwipe</action>
@@ -1155,13 +1155,13 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; Select Type</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@select_type_hdr=Select Type}</text>
</text>
<button style="main_button_full_width">
<condition var1="tw_has_data_media" var2="1"/>
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Format Data</text>
+ <text>{@format_data_btn=Format Data}</text>
<action function="page">formatdata</action>
</button>
@@ -1171,24 +1171,24 @@
<condition var1="tw_has_data_media" var2="0"/>
</conditions>
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Wipe Encryption</text>
+ <text>{@wipe_enc_btn=Wipe Encryption}</text>
<actions>
<action function="set">tw_back=wipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=DATAMEDIA</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Wipe Encryption from Data?</action>
+ <action function="set">tw_text1={@wipe_enc_confirm=Wipe Encryption from Data?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Formatting Data...</action>
- <action function="set">tw_complete_text1=Data Format Complete</action>
- <action function="set">tw_slider_text= Format Data</action>
+ <action function="set">tw_action_text1={@formatting_data=Formatting Data...}</action>
+ <action function="set">tw_complete_text1={@format_data_complete=Data Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_format_data_s= Format Data}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_full_width">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>File System Options</text><actions>
+ <text>{@file_sys_opt=File System Options}</text><actions>
<action function="set">partitionlisterror=0</action>
<action function="page">partitionoptions_select</action>
</actions>
@@ -1219,18 +1219,18 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; Factory Reset</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@factory_reset_hdr=Factory Reset}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>Wipes Data, Cache, and Dalvik</text>
+ <text>{@factory_reset1=Wipes Data, Cache, and Dalvik}</text>
</text>
<text style="text_m_accent">
<condition var1="tw_has_data_media" var2="1"/>
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>(not including internal storage)</text>
+ <text>{@factory_reset2=(not including internal storage)}</text>
</text>
<text style="text_m_accent">
@@ -1239,38 +1239,38 @@
<condition var1="fileexists" var2="/and-sec"/>
</conditions>
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Android Secure</text>
+ <text>{@android_secure=Android Secure}</text>
</text>
<text style="text_m_accent">
<condition var1="tw_has_sdext_partition" var2="1"/>
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>SD-EXT</text>
+ <text>{@sdext=SD-EXT}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>Most of the time this is</text>
+ <text>{@factory_reset3=Most of the time this is}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>the only wipe that you need.</text>
+ <text>{@factory_reset4=the only wipe that you need.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row9_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider>
- <text> Wipe</text>
+ <text>{@swipe_wipe_s= Wipe}</text>
<actions>
<action function="set">tw_back=wipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=data</action>
- <action function="set">tw_action_text1=Factory Reset...</action>
- <action function="set">tw_complete_text1=Factory Reset Complete</action>
+ <action function="set">tw_action_text1={@factory_resetting=Factory Reset...}</action>
+ <action function="set">tw_complete_text1={@factory_reset_complete=Factory Reset Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -1297,7 +1297,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; Advanced Wipe &gt; Select Partitions</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@advanced_wipe_hdr=Advanced Wipe} &gt; {@sel_part_hdr=Select Partitions}</text>
</text>
<partitionlist style="partitionlist_headerless_cb">
@@ -1311,14 +1311,14 @@
</fill>
<slider>
- <text> Wipe</text>
+ <text>{@swipe_wipe_s= Wipe}</text>
<actions>
<action function="set">tw_back=advancedwipe</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=LIST</action>
- <action function="set">tw_text1=Wipe Selected Partition(s)?</action>
- <action function="set">tw_action_text1=Wiping Partition(s)...</action>
- <action function="set">tw_complete_text1=Wipe Complete</action>
+ <action function="set">tw_text1={@wipe_sel_confirm=Wipe Selected Partition(s)?}</action>
+ <action function="set">tw_action_text1={@wiping_part=Wiping Partition(s)...}</action>
+ <action function="set">tw_complete_text1={@wipe_complete=Wipe Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -1341,22 +1341,22 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; Format Data</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@format_data_hdr=Format Data}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>Format Data will wipe all of your apps,</text>
+ <text>{@format_data_wtc1=Format Data will wipe all of your apps,}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>backups and media. This cannot be undone.</text>
+ <text>{@format_data_wtc2=backups and media. This cannot be undone.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Type yes to continue. Press back to cancel.</text>
+ <text>{@yes_continue=Type yes to continue. Press back to cancel.}</text>
</text>
<input>
@@ -1391,8 +1391,8 @@
<action function="set">tw_back=formatdata</action>
<action function="set">tw_action=wipe</action>
<action function="set">tw_action_param=DATAMEDIA</action>
- <action function="set">tw_action_text1=Formatting Data...</action>
- <action function="set">tw_complete_text1=Data Format Complete</action>
+ <action function="set">tw_action_text1={@formatting_data=Formatting Data...}</action>
+ <action function="set">tw_complete_text1={@format_data_complete=Data Format Complete}</action>
<action function="page">action_page</action>
</actions>
</action>
@@ -1434,7 +1434,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; File System Options &gt; Select Partitions</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@file_sys_opt=File System Options} &gt; {@sel_part_hdr=Select Partitions}</text>
</text>
<partitionlist style="partitionlist_headerless_cb">
@@ -1447,27 +1447,10 @@
<placement x="%col1_x_left%" y="row10a_y" w="%content_width%" h="input_line_width"/>
</fill>
- <text style="text_m">
- <placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Select only one partition!</text>
- </text>
-
<text style="text_m_fail">
<condition var1="partitionlisterror" var2="1"/>
<placement x="%col1_x_left%" y="%row12_y%"/>
- <text>Invalid selection!</text>
- </text>
-
- <text style="text_m">
- <condition var1="partitionlisterror" var2="1"/>
- <placement x="%col1_x_left%" y="%row13_y%"/>
- <text>Not all listed partitions</text>
- </text>
-
- <text style="text_m">
- <condition var1="partitionlisterror" var2="1"/>
- <placement x="%col1_x_left%" y="%row14_y%"/>
- <text>can be modified.</text>
+ <text>{@invalid_part_sel=Invalid partition selection}</text>
</text>
<button>
@@ -1498,78 +1481,78 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Wipe &gt; File System Options &gt; Select Action</text>
+ <text>{@wipe_hdr=Wipe} &gt; {@file_sys_opt=File System Options} &gt; {@sel_act_hdr=Select Action}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Partition: %tw_partition_name%</text>
+ <text>{@partition=Partition: %tw_partition_name%}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>File system: %tw_partition_file_system%</text>
+ <text>{@part_curr_fs=File system: %tw_partition_file_system%}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_is_present" var2="1"/>
<placement x="%col1_x_left%" y="%row2a_y%"/>
- <text>Present: Yes</text>
+ <text>{@part_present_yes=Present: Yes}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_is_present" var2="0"/>
<placement x="%col1_x_left%" y="%row2a_y%"/>
- <text>Present: No</text>
+ <text>{@part_present_no=Present: No}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_removable" var2="1"/>
<placement x="%col1_x_right%" y="%row2a_y%"/>
- <text>Removable: Yes</text>
+ <text>{@part_removable_yes=Removable: Yes}</text>
</text>
<text style="text_m">
<condition var1="tw_partition_removable" var2="0"/>
<placement x="%col1_x_right%" y="%row2a_y%"/>
- <text>Removable: No</text>
+ <text>{@part_removable_no=Removable: No}</text>
</text>
<text style="text_m">
<placement x="%col1_x_left%" y="%row3a_y%"/>
- <text>Size: %tw_partition_size%MB</text>
+ <text>{@part_size=Size: %tw_partition_size%MB}</text>
</text>
<text style="text_m">
<placement x="%col1_x_right%" y="%row3a_y%"/>
- <text>Used: %tw_partition_used%MB</text>
+ <text>{@part_used=Used: %tw_partition_used%MB}</text>
</text>
<text style="text_m">
<placement x="%col1_x_left%" y="%row4a_y%"/>
- <text>Free: %tw_partition_free%MB</text>
+ <text>{@part_free=Free: %tw_partition_free%MB}</text>
</text>
<text style="text_m">
<placement x="%col1_x_right%" y="%row4a_y%"/>
- <text>Backup Size: %tw_partition_backup_size%MB</text>
+ <text>{@part_backup_size=Backup Size: %tw_partition_backup_size%MB}</text>
</text>
<button style="main_button">
<condition var1="tw_partition_can_resize" op="=" var2="1"/>
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Resize</text>
+ <text>{@resize_btn_s=Resize}</text>
<actions>
<action function="set">tw_back=partitionoptions</action>
<action function="set">tw_action=resize</action>
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=getpartitiondetails</action>
- <action function="set">tw_text1=Resize %tw_partition_name%?</action>
+ <action function="set">tw_text1={@resize_confirm=Resize %tw_partition_name%?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Resizing...</action>
- <action function="set">tw_complete_text1=Resize Complete</action>
- <action function="set">tw_slider_text= Resize</action>
+ <action function="set">tw_action_text1={@resizing=Resizing...}</action>
+ <action function="set">tw_complete_text1={@resize_complete=Resize Complete}</action>
+ <action function="set">tw_slider_text={@swipe_resize_s= Resize}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1577,17 +1560,17 @@
<button style="main_button">
<condition var1="tw_partition_can_repair" op="=" var2="1"/>
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Repair</text>
+ <text>{@repair_btn_s=Repair}</text>
<actions>
<action function="set">tw_back=partitionoptions</action>
<action function="set">tw_action=repair</action>
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Repair %tw_partition_name%?</action>
+ <action function="set">tw_text1={@repair_confirm=Repair %tw_partition_name%?}</action>
<action function="set">tw_text2=</action>
- <action function="set">tw_action_text1=Repairing...</action>
- <action function="set">tw_complete_text1=Repair Complete</action>
- <action function="set">tw_slider_text= Repair</action>
+ <action function="set">tw_action_text1={@repairing=Repairing...}</action>
+ <action function="set">tw_complete_text1={@repair_complete=Repair Complete}</action>
+ <action function="set">tw_slider_text={@swipe_repair_s= Repair}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1601,7 +1584,7 @@
<button style="main_button">
<placement x="%col1_x_right%" y="%row11_y%"/>
- <text>Change</text>
+ <text>{@change_fs_btn_s=Change}</text>
<action function="page">selectfilesystem</action>
</button>
@@ -1643,7 +1626,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Partition: %tw_partition_name% &gt; Select File System</text>
+ <text>{@change_fs_for_hdr_s=Partition: %tw_partition_name% &gt; Select File System}</text>
</text>
<button style="main_button">
@@ -1656,13 +1639,13 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext2</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_text3=Not all file systems are supported</action>
- <action function="set">tw_text4=by all kernels. Proceed with caution!</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text= Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT2</action>
+ <action function="set">tw_text3={@change_fs_warn1=Some ROMs or kernels may not support some}</action>
+ <action function="set">tw_text4={@change_fs_warn2=file systems. Proceed with caution!}</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_s= Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1677,13 +1660,13 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext3</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_text3=Not all file systems are supported</action>
- <action function="set">tw_text4=by all kernels. Proceed with caution!</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text= Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT3</action>
+ <action function="set">tw_text3={@change_fs_warn1=Some ROMs or kernels may not support some}</action>
+ <action function="set">tw_text4={@change_fs_warn2=file systems. Proceed with caution!}</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_s= Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1698,13 +1681,13 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=ext4</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_text3=Not all file systems are supported by all kernels.</action>
- <action function="set">tw_text4=Proceed with caution!</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text= Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=EXT4</action>
+ <action function="set">tw_text3={@change_fs_warn1=Some ROMs or kernels may not support some}</action>
+ <action function="set">tw_text4={@change_fs_warn2=file systems. Proceed with caution!}</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_s= Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1719,13 +1702,13 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=vfat</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_text3=Not all file systems are supported</action>
- <action function="set">tw_text4=by all kernels. Proceed with caution!</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text= Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=FAT</action>
+ <action function="set">tw_text3={@change_fs_warn1=Some ROMs or kernels may not support some}</action>
+ <action function="set">tw_text4={@change_fs_warn2=file systems. Proceed with caution!}</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_s= Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1740,13 +1723,13 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=exfat</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_text3=Not all file systems are supported</action>
- <action function="set">tw_text4=by all kernels. Proceed with caution!</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text= Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=exFAT</action>
+ <action function="set">tw_text3={@change_fs_warn1=Some ROMs or kernels may not support some}</action>
+ <action function="set">tw_text4={@change_fs_warn2=file systems. Proceed with caution!}</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_s= Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1761,13 +1744,13 @@
<action function="set">tw_action_param=%tw_partition_mount_point%</action>
<action function="set">tw_action_new_file_system=f2fs</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action>
- <action function="set">tw_text2=</action>
- <action function="set">tw_text3=Not all file systems are supported</action>
- <action function="set">tw_text4=by all kernels. Proceed with caution!</action>
- <action function="set">tw_action_text1=Formatting...</action>
- <action function="set">tw_complete_text1=Format Complete</action>
- <action function="set">tw_slider_text= Change</action>
+ <action function="set">tw_text1={@change_fs_confirm=Change %tw_partition_name%?}</action>
+ <action function="set">tw_text2=F2FS</action>
+ <action function="set">tw_text3={@change_fs_warn1=Some ROMs or kernels may not support some}</action>
+ <action function="set">tw_text4={@change_fs_warn2=file systems. Proceed with caution!}</action>
+ <action function="set">tw_action_text1={@formatting=Formatting...}</action>
+ <action function="set">tw_complete_text1={@format_complete=Format Complete}</action>
+ <action function="set">tw_slider_text={@swipe_change_s= Change}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -1790,7 +1773,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Select Storage</text>
+ <text>{@backup_hdr=Backup} &gt; {@select_storage_hdr=Select Storage}</text>
</text>
<partitionlist style="partitionlist_headerless_rb">
@@ -1849,7 +1832,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Select Partitions</text>
+ <text>{@backup_hdr=Backup} &gt; {@sel_part_hdr=Select Partitions}</text>
</text>
<partitionlist style="partitionlist_headerless_cb">
@@ -1916,18 +1899,18 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Options</text>
+ <text>{@backup_hdr=Backup} &gt; {@options_hdr=Options}</text>
</text>
<listbox style="scrolllist">
<placement x="%col1_x_left%" y="%row2_header_y%" w="%content_width%" h="%partitionlist_wipe_height%"/>
- <listitem name="Enable compression">
+ <listitem name="{@enable_backup_comp_chk=Enable compression}">
<data variable="tw_use_compression"/>
</listitem>
- <listitem name="Skip MD5 generation during backup">
+ <listitem name="{@skip_md5_backup_chk=Skip MD5 generation during backup}">
<data variable="tw_skip_md5_generate"/>
</listitem>
- <listitem name="Disable Free Space Check">
+ <listitem name="{@disable_backup_space_chk=Disable Free Space Check}">
<data variable="tw_disable_free_space"/>
</listitem>
</listbox>
@@ -2002,12 +1985,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Confirm Backup</text>
+ <text>{@backup_hdr=Backup} &gt; {@backup_confirm_hdr=Confirm Backup{</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<text style="text_m">
@@ -2035,7 +2018,7 @@
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row3a_y%"/>
- <text>Partitions:</text>
+ <text>{@partitions=Partitions:}</text>
</text>
<partitionlist style="partitionlist_summary">
@@ -2055,7 +2038,7 @@
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Storage:</text>
+ <text>{@storage=Storage:}</text>
</text>
<text style="text_m">
@@ -2074,7 +2057,7 @@
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row3a_y%"/>
- <text>Encryption:</text>
+ <text>{@encryption=Encryption:}</text>
</text>
<text style="text_m">
@@ -2083,7 +2066,7 @@
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%col1_x_right%" y="%row4a_y%"/>
- <text>Disabled</text>
+ <text>{@disabled=Disabled}</text>
</text>
<text style="text_m">
@@ -2092,7 +2075,7 @@
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%col1_x_right%" y="%row4a_y%"/>
- <text>Enabled</text>
+ <text>{@enabled=Enabled}</text>
</text>
<button>
@@ -2106,20 +2089,20 @@
<listbox style="listbox_options">
<placement x="%col1_x_right%" y="%row7_y%" w="%content_half_width%" h="80"/>
- <listitem name="Enable Compression">
+ <listitem name="{@enable_backup_comp_chk=Enable compression}">
<data variable="tw_use_compression"/>
</listitem>
- <listitem name="Skip MD5 generation">
+ <listitem name="{@skip_md5_backup_chk=Skip MD5 generation during backup}">
<data variable="tw_skip_md5_generate"/>
</listitem>
- <listitem name="Skip Free Space Check">
+ <listitem name="{@disable_backup_space_chk=Disable Free Space Check}">
<data variable="tw_disable_free_space"/>
</listitem>
</listbox>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<button>
@@ -2132,7 +2115,7 @@
</button>
<slider>
- <text> Confirm</text>
+ <text>{@swipe_confirm= Confirm}</text>
<action function="page">backup_run</action>
</slider>
@@ -2149,7 +2132,7 @@
<page name="backup_name1">
<action>
- <condition var1="tw_backup_name" op="=" var2="(Auto Generate)"/>
+ <condition var1="tw_backup_name" op="=" var2="{@auto_generate=(Auto Generate)}"/>
<action function="generatebackupname"/>
</action>
@@ -2165,12 +2148,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Set Backup Name</text>
+ <text>{@backup_hdr=Backup} &gt; {@backup_name_hdr=Set Backup Name}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -2198,21 +2181,21 @@
<text style="text_m_fail">
<condition var1="tw_fileexists" var2="1"/>
<placement x="%col1_x_left%" y="%row3_input_y%"/>
- <text>A backup with that name already exists!</text>
+ <text>{@backup_name_exists=A backup with that name already exists!}</text>
</text>
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">backup_confirm</action>
</actions>
</button>
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Append Date</text>
+ <text>{@append_date_btn=Append Date}</text>
<action function="appenddatetobackupname"/>
</button>
@@ -2221,7 +2204,7 @@
<action>
<touch key="home"/>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">main</action>
</actions>
</action>
@@ -2229,7 +2212,7 @@
<action>
<touch key="back"/>
<actions>
- <action function="set">tw_backup_name=(Auto Generate)</action>
+ <action function="set">tw_backup_name={@auto_generate=(Auto Generate)}</action>
<action function="page">backup_confirm</action>
</actions>
</action>
@@ -2242,12 +2225,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Enable Encryption</text>
+ <text>{@backup_hdr=Backup} &gt; {@encrypt_backup=Encrypt your Backup?}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Enter Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -2270,12 +2253,12 @@
<text style="text_m_fail">
<condition var1="tw_password_not_match" var2="1"/>
<placement x="%col1_x_left%" y="%row3_input_y%"/>
- <text>Passwords do not match!</text>
+ <text>{@pass_not_match=Passwords do not match!}</text>
</text>
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_encrypt_backup=0</action>
<action function="set">tw_backup_password=</action>
@@ -2306,12 +2289,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Backup &gt; Enable Encryption</text>
+ <text>{@backup_hdr=Backup} &gt; {@encrypt_backup=Encrypt your Backup?}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Enter Password again:</text>
+ <text>{@enter_pass2=Enter Password again:}</text>
</text>
<input>
@@ -2328,7 +2311,7 @@
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_encrypt_backup=0</action>
<action function="set">tw_backup_password=</action>
@@ -2401,7 +2384,7 @@
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row13_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="cancelbackup"/>
</button>
@@ -2414,7 +2397,7 @@
<condition var1="tw_cancel_backup" var2="0"/>
<actions>
<action function="set">tw_back=backup_selectpartitions</action>
- <action function="set">tw_complete_text1=Backup Complete</action>
+ <action function="set">tw_complete_text1={@backup_complete=Backup Complete}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2425,7 +2408,7 @@
<condition var1="tw_cancel_backup" var2="1"/>
<actions>
<action function="set">tw_back=backup_selectpartitions</action>
- <action function="set">tw_complete_text1=Backup Cancelled</action>
+ <action function="set">tw_complete_text1={@backup_cancel=Backup Cancelled}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2439,7 +2422,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Select Backup</text>
+ <text>{@restore_hdr=Restore} &gt; {@sel_backup_hdr=Select Backup}</text>
</text>
<fileselector>
@@ -2456,7 +2439,7 @@
<highlight color="%highlight_color%"/>
<image resource="q_btn_storage"/>
<actions>
- <action function="set">tw_storagetext=Restore &gt; Select Storage</action>
+ <action function="set">tw_storagetext={@restore_btn=Restore} &gt; {@select_storage_btn=Select Storage}</action>
<action function="set">tw_back=restore</action>
<action function="page">select_storage</action>
</actions>
@@ -2506,12 +2489,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Encrypted Backup</text>
+ <text>{@restore_hdr=Restore} &gt; {@restore_enc_backup_hdr=Encrypted Backup}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Enter Password:</text>
+ <text>{@enter_pass=Enter Password:}</text>
</text>
<input>
@@ -2534,12 +2517,12 @@
<text style="text_m_fail">
<condition var1="tw_password_fail" var2="1"/>
<placement x="%col1_x_left%" y="%row3_input_y%"/>
- <text>Password failed, please try again!</text>
+ <text>{@restore_dec_fail=Password failed, please try again!}</text>
</text>
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">restore</action>
@@ -2548,16 +2531,17 @@
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Delete Backup</text>
+ <text>{@del_backup_btn=Delete Backup}</text>
<actions>
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; rm -rf "%tw_restore_name%"</action>
- <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
- <action function="set">tw_text2=This cannot be undone!</action>
- <action function="set">tw_action_text1=Deleting Backup...</action>
- <action function="set">tw_complete_text1=Backup Delete Complete</action>
- <action function="set">tw_slider_text=Delete</action>
+ <action function="set">tw_text1={@del_backup_confirm=Delete Backup?}</action>
+ <action function="set">tw_text2=%tw_restore_name%</action>
+ <action function="set">tw_text4={@del_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@deleting_backup=Deleting Backup...}</action>
+ <action function="set">tw_complete_text1={@backup_deleted=Backup Delete Complete}</action>
+ <action function="set">tw_slider_text={@swipe_delete_s= Delete}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -2582,7 +2566,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Trying Decryption</text>
+ <text>{@restore_hdr=Restore} &gt; {@restore_try_decrypt_s=Trying Decryption}</text>
</text>
<template name="console"/>
@@ -2623,7 +2607,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Select Partitions</text>
+ <text>{@restore_hdr=Restore} &gt; {@sel_part_hdr=Select Partitions}</text>
</text>
<partitionlist style="partitionlist_headerless_cb">
@@ -2651,12 +2635,12 @@
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; rm -rf "%tw_restore_name%"</action>
- <action function="set">tw_text1=Delete Backup?</action>
+ <action function="set">tw_text1={@del_backup_confirm=Delete Backup?}</action>
<action function="set">tw_text2=%tw_restore_name%</action>
- <action function="set">tw_text4=This cannot be undone!</action>
- <action function="set">tw_action_text1=Deleting Backup...</action>
- <action function="set">tw_complete_text1=Backup Delete Complete</action>
- <action function="set">tw_slider_text= Delete</action>
+ <action function="set">tw_text4={@del_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@deleting_backup=Deleting Backup...}</action>
+ <action function="set">tw_complete_text1={@backup_deleted=Backup Delete Complete}</action>
+ <action function="set">tw_slider_text={@swipe_delete_s= Delete}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -2696,12 +2680,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Options</text>
+ <text>{@restore_hdr=Restore} &gt; {@options_hdr=Options}</text>
</text>
<listbox style="scrolllist">
<placement x="%col1_x_left%" y="%row2_header_y%" w="%content_width%" h="%partitionlist_wipe_height%"/>
- <listitem name="Enable MD5 verification of backup files">
+ <listitem name="{@retore_enable_md5_chk=Enable MD5 Verification of Backup Files}">
<data variable="tw_skip_md5_check"/>
</listitem>
</listbox>
@@ -2746,12 +2730,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Rename Backup</text>
+ <text>{@restore_hdr=Restore} &gt; {@rename_backup_hdr=Rename Backup}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -2763,11 +2747,11 @@
<action function="set">tw_back=restore</action>
<action function="set">tw_action=cmd</action>
<action function="set">tw_action_param=cd %tw_backups_folder% &amp;&amp; mv "%tw_restore_name%" "%tw_backup_rename%"</action>
- <action function="set">tw_text1=Rename Backup?</action>
- <action function="set">tw_text2=This cannot be undone!</action>
- <action function="set">tw_action_text1=Renaming Backup...</action>
- <action function="set">tw_complete_text1=Backup Rename Complete</action>
- <action function="set">tw_slider_text=Rename</action>
+ <action function="set">tw_text1={@rename_backup_confirm=Rename Backup?}</action>
+ <action function="set">tw_text2={@rename_backup_confirm2=This cannot be undone!}</action>
+ <action function="set">tw_action_text1={@renaming_backup=Renaming Backup...}</action>
+ <action function="set">tw_complete_text1={@rename_backup_complete=Backup Rename Complete}</action>
+ <action function="set">tw_slider_text={@swipe_rename= Rename}</action>
<action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_rename%</action>
<action function="set">tw_existpage=renamebackup</action>
<action function="set">tw_notexistpage=confirm_action</action>
@@ -2787,12 +2771,12 @@
<text style="text_m_fail">
<condition var1="tw_fileexists" var2="1"/>
<placement x="%col1_x_left%" y="%row3_input_y%"/>
- <text>A backup with that name already exists!</text>
+ <text>{@backup_name_exists=A backup with that name already exists!}</text>
</text>
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">restore_confirm</action>
</button>
@@ -2816,12 +2800,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Restore &gt; Confirm</text>
+ <text>{@restore_hdr=Restore} &gt; {@confirm_hdr=Confirm}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row1_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<text style="text_m">
@@ -2846,7 +2830,7 @@
<text style="text_m_accent">
<placement x="%indent%" y="%row3a_y%"/>
- <text>Partitions:</text>
+ <text>{@partitions=Partitions:}</text>
</text>
<partitionlist style="partitionlist_summary">
@@ -2866,14 +2850,14 @@
<listbox style="listbox_options">
<placement x="%col1_x_right%" y="%row4a_y%" w="%content_half_width%" h="80"/>
- <listitem name="MD5 verification">
+ <listitem name="{@retore_enable_md5_chk=Enable MD5 Verification of Backup Files}">
<data variable="tw_skip_md5_check"/>
</listitem>
</listbox>
<text style="text_m_accent">
<placement x="%col1_x_right%" y="%row3a_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<button>
@@ -2886,7 +2870,7 @@
</button>
<slider>
- <text> Restore</text>
+ <text>{@swipe_restore_s= Restore}</text>
<action function="page">restore_run</action>
</slider>
@@ -2924,7 +2908,7 @@
<condition var1="tw_operation_state" var2="1"/>
<actions>
<action function="set">tw_back=restore</action>
- <action function="set">tw_complete_text1=Restore Complete</action>
+ <action function="set">tw_complete_text1={@restore_complete=Restore Complete}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_complete</action>
</actions>
@@ -2942,7 +2926,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Mount &gt; %tw_storage_display_name%</text>
+ <text>{@mount_hdr=Mount} &gt; %tw_storage_display_name%</text>
</text>
<partitionlist style="partitionlist_headerless_cb">
@@ -2957,7 +2941,7 @@
<button style="checkbox">
<condition var1="tw_mount_system_ro" op="=" var2="0"/>
<placement x="%col1_x_left%" y="%row11_y%" textplacement="6"/>
- <text>Mount System RO</text>
+ <text>{@mount_sys_ro_s_chk=Mount System RO}</text>
<image resource="checkbox_false"/>
<action function="mountsystemtoggle">1</action>
</button>
@@ -2965,7 +2949,7 @@
<button style="checkbox">
<condition var1="tw_mount_system_ro" op="!=" var2="0"/>
<placement x="%col1_x_left%" y="%row11_y%" textplacement="6"/>
- <text>Mount System RO</text>
+ <text>{@mount_sys_ro_s_chk=Mount System RO}</text>
<image resource="checkbox_true"/>
<actions>
<action function="set">tw_lifetime_writes=2</action>
@@ -2980,7 +2964,7 @@
</conditions>
<placement x="%col1_x_left%" y="%row13_y%" textplacement="6"/>
<image resource="checkbox_false"/>
- <text>Enable MTP</text>
+ <text>{@enable_mtp_btn=Enable MTP}</text>
<action function="startmtp"/>
</button>
@@ -2991,7 +2975,7 @@
</conditions>
<placement x="%col1_x_left%" y="%row13_y%" textplacement="6"/>
<image resource="checkbox_true"/>
- <text>Enable MTP</text>
+ <text>{@disable_mtp_btn=Disable MTP}</text>
<action function="stopmtp"/>
</button>
@@ -3000,7 +2984,7 @@
<highlight color="%highlight_color%"/>
<image resource="q_btn_storage"/>
<actions>
- <action function="set">tw_storagetext=Mount &gt; Select Storage</action>
+ <action function="set">tw_storagetext={@mount_hdr=Mount} &gt; {@select_storage_hdr=Select Storage}</action>
<action function="set">tw_back=mount</action>
<action function="page">select_storage</action>
</actions>
@@ -3031,13 +3015,13 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Mount &gt; %tw_storage_display_name%</text>
+ <text>{@mount_hdr=Mount} &gt; %tw_storage_display_name%</text>
</text>
<button style="main_button_full_width">
<condition var1="tw_has_usb_storage" var2="1"/>
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Mount USB Storage</text>
+ <text>{@mount_usb_storage_btn=Mount USB Storage}</text>
<action function="page">usb_mount</action>
</button>
@@ -3047,7 +3031,7 @@
<condition var1="tw_is_decrypted" var2="0"/>
</conditions>
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Decrypt Data</text>
+ <text>{@decrypt_data_btn=Decrypt Data}</text>
<action function="page">decrypt</action>
</button>
@@ -3076,27 +3060,27 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Mount &gt; USB Storage</text>
+ <text>{@mount_hdr=Mount} &gt; {usb_storage_hdr=USB Storage}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>Device mounted as USB Storage</text>
+ <text>{@usb_stor_mnt1=USB Storage Mounted}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>Be sure to safely remove your device</text>
+ <text>{@usb_stor_mnt2=Be sure to safely remove your device}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>from your computer before unmounting!</text>
+ <text>{@usb_stor_mnt3=from your computer before unmounting!}</text>
</text>
<button style="main_button">
<placement x="%btn4_col2_x%" y="%row11_y%"/>
- <text>Unmount</text>
+ <text>{@unmount_btn=Unmount}</text>
<action function="page">usb_umount</action>
</button>
@@ -3146,23 +3130,23 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Reboot Menu</text>
+ <text>{@reboot_hdr=Reboot Menu}</text>
</text>
<button style="main_button">
<condition var1="tw_reboot_system" var2="1"/>
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>System</text>
+ <text>{@rb_system_btn=System}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=system</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -3170,17 +3154,17 @@
<button style="main_button">
<condition var1="tw_reboot_poweroff" var2="1"/>
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Power Off</text>
+ <text>{@rb_poweroff_btn=Power Off}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=poweroff</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to power off?</action>
- <action function="set">tw_action_text1=Turning Off...</action>
- <action function="set">tw_complete_text1=Turning Off...</action>
- <action function="set">tw_slider_text=Power Off</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_ospo=sure you wish to power off?}</action>
+ <action function="set">tw_action_text1={@turning_off=Turning Off...}</action>
+ <action function="set">tw_complete_text1={@turning_off=Turning Off...}</action>
+ <action function="set">tw_slider_text={@swipe_power_off_s=Power Off}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -3188,17 +3172,17 @@
<button style="main_button">
<condition var1="tw_reboot_recovery" var2="1"/>
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Recovery</text>
+ <text>{@rb_recovery_btn=Recovery}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=recovery</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -3206,17 +3190,17 @@
<button style="main_button">
<condition var1="tw_reboot_bootloader" var2="1"/>
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Bootloader</text>
+ <text>{@rb_bootloader_btn=Bootloader}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=bootloader</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -3224,17 +3208,17 @@
<button style="main_button">
<condition var1="tw_download_mode" var2="1"/>
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Download</text>
+ <text>{@rb_download_btn=Download}</text>
<actions>
<action function="set">tw_back=reboot</action>
<action function="set">tw_action=reboot</action>
<action function="set">tw_action_param=download</action>
<action function="set">tw_has_action2=0</action>
- <action function="set">tw_text1=No OS Installed! Are you</action>
- <action function="set">tw_text2=sure you wish to reboot?</action>
- <action function="set">tw_action_text1=Rebooting...</action>
- <action function="set">tw_complete_text1=Rebooting...</action>
- <action function="set">tw_slider_text=Reboot</action>
+ <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action>
+ <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action>
+ <action function="set">tw_action_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action>
+ <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action>
<action function="page">rebootcheck</action>
</actions>
</button>
@@ -3257,54 +3241,54 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Unmodified System Partition</text>
+ <text>{@sys_ro_hdr=Unmodified System Partition}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>TWRP has detected an unmodified system partition</text>
+ <text>{@sys_ro_keep=Keep System Read only?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>TWRP can leave your system partition unmodified</text>
+ <text>{@sys_rop1=TWRP can leave your system partition unmodified}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row3_y%" placement="5"/>
- <text>to make it easier for you to take official updates.</text>
+ <text>{@sys_rop2=to make it easier for you to take official updates.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>TWRP will be unable to prevent the stock ROM from</text>
+ <text>{@sys_rop3=TWRP will be unable to prevent the stock ROM from}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>replacing TWRP and will not offer to root your device.</text>
+ <text>{@sys_rop4=replacing TWRP and will not offer to root your device.}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row7_y%" placement="5"/>
- <text>Installing zips or performing adb operations may still</text>
+ <text>{@sys_rop5=Installing zips or performing adb operations may still}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>modify the system partition.</text>
+ <text>{@sys_rop6=modify the system partition.}</text>
</text>
<checkbox>
<condition var1="tw_is_encrypted" var2="0"/>
<placement x="%indent%" y="%row10_y%"/>
- <text>Never show this screen during boot again</text>
+ <text>{@sys_ro_never_show_chk=Never show this screen during boot again}</text>
<data variable="tw_never_show_system_ro_page"/>
</checkbox>
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row13_y%"/>
- <text>Keep Read Only</text>
+ <text>{@sys_ro_keep_ro_btn=Keep Read Only}</text>
<actions>
<action function="mountsystemtoggle">1</action>
<action function="set">tw_page_done=1</action>
@@ -3314,7 +3298,7 @@
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row13_y%"/>
- <text>Allow Modifications</text>
+ <text>{@swipe_allow_mod_s=Allow Modifications}</text>
<actions>
<action function="mountsystemtoggle">0</action>
<action function="set">tw_page_done=1</action>
@@ -3330,36 +3314,36 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings</text>
+ <text>{@settings_hdr=Settings}</text>
</text>
<button style="main_button">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>General</text>
+ <text>{@settings_gen_btn=General}</text>
<action function="page">settings_general</action>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Time Zone</text>
+ <text>{@settings_tz_btn=Time Zone}</text>
<action function="page">settings_timezone</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Screen</text>
+ <text>{@settings_screen_btn=Screen}</text>
<action function="page">settings_screen</action>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>Vibration</text>
+ <text>{@settings_vibration_btn=Vibration}</text>
<action function="page">settings_vibration</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Language</text>
+ <text>{@settings_language_btn=Language}</text>
<action function="page">settings_language</action>
</button>
@@ -3388,30 +3372,30 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; General</text>
+ <text>{@settings_hdr=Settings} &gt; {@settings_gen_s_hdr=General}</text>
</text>
<listbox style="scrolllist">
<placement x="%col1_x_left%" y="%row2_header_y%" w="%content_width%" h="%listbox_settings_height%"/>
- <listitem name="Zip file signature verification">
+ <listitem name="{@zip_sig_chk=Zip signature verification}">
<data variable="tw_signed_zip_verify"/>
</listitem>
- <listitem name="Use rm -rf instead of formatting">
+ <listitem name="{@use_rmrf_chk=Use rm -rf instead of formatting}">
<data variable="tw_rm_rf"/>
</listitem>
- <listitem name="Skip MD5 generation during backup">
+ <listitem name="{@skip_md5_backup_chk=Skip MD5 generation during backup}">
<data variable="tw_skip_md5_generate"/>
</listitem>
- <listitem name="Enable MD5 verification of backup files">
+ <listitem name="{@retore_enable_md5_chk=Enable MD5 verification of backup files}">
<data variable="tw_skip_md5_check"/>
</listitem>
- <listitem name="Use 24-hour clock">
+ <listitem name="{@use24clock_chk=Use 24-hour clock}">
<data variable="tw_military_time"/>
</listitem>
- <listitem name="Simulate actions for theme testing">
+ <listitem name="{@simact_chk=Simulate actions for theme testing}">
<data variable="tw_simulate_actions"/>
</listitem>
- <listitem name="Simulate failure for actions">
+ <listitem name="{@simfail_chk=Simulate failure for actions}">
<data variable="tw_simulate_fail"/>
<condition var1="tw_simulate_actions" var2="1"/>
</listitem>
@@ -3435,7 +3419,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Time Zone</text>
+ <text>{@settings_hdr=Settings} &gt; {@time_zone_hdr=Time Zone}</text>
</text>
<text color="%text_color%">
@@ -3447,30 +3431,30 @@
<listbox style="listbox_headerless">
<placement x="%col1_x_left%" y="%row2_header_y%" w="%content_width%" h="%listbox_timezone_height%"/>
<data name="tw_time_zone_guisel"/>
- <listitem name="(UTC -11) Samoa, Midway Island">BST11;BDT</listitem>
- <listitem name="(UTC -10) Hawaii">HST10;HDT</listitem>
- <listitem name="(UTC -9) Alaska">AST9;ADT</listitem>
- <listitem name="(UTC -8) Pacific Time">PST8;PDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -7) Mountain Time">MST7;MDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -6) Central Time">CST6;CDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -5) Eastern Time">EST5;EDT,M3.2.0,M11.1.0</listitem>
- <listitem name="(UTC -4) Atlantic Time">AST4;ADT</listitem>
- <listitem name="(UTC -3) Brazil, Buenos Aires">GRNLNDST3;GRNLNDDT</listitem>
- <listitem name="(UTC -2) Mid-Atlantic">FALKST2;FALKDT</listitem>
- <listitem name="(UTC -1) Azores, Cape Verde">AZOREST1;AZOREDT</listitem>
- <listitem name="(UTC 0) London, Dublin, Lisbon">GMT0;BST,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +1) Berlin, Brussels, Paris">CET-1;CEST,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET,M3.5.0,M10.5.0</listitem>
- <listitem name="(UTC +3) Moscow, Baghdad">SAUST-3;SAUDT</listitem>
- <listitem name="(UTC +4) Abu Dhabi, Tbilisi, Muscat">WST-4;WDT</listitem>
- <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem>
- <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem>
- <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem>
- <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem>
- <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem>
- <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem>
- <listitem name="(UTC +11) Vladivostok, Solomon Islands">MET-11;METDT</listitem>
- <listitem name="(UTC +12) Auckland, Wellington, Fiji">NZST-12;NZDT</listitem>
+ <listitem name="{@utcm11=(UTC -11) Samoa, Midway Island}">BST11;BDT</listitem>
+ <listitem name="{@utcm10=(UTC -10) Hawaii}">HST10;HDT</listitem>
+ <listitem name="{@utcm9=(UTC -9) Alaska}">AST9;ADT</listitem>
+ <listitem name="{@utcm8=(UTC -8) Pacific Time}">PST8;PDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm7=(UTC -7) Mountain Time}">MST7;MDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm6=(UTC -6) Central Time}">CST6;CDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm5=(UTC -5) Eastern Time}">EST5;EDT,M3.2.0,M11.1.0</listitem>
+ <listitem name="{@utcm4=(UTC -4) Atlantic Time}">AST4;ADT</listitem>
+ <listitem name="{@utcm3=(UTC -3) Brazil, Buenos Aires}">GRNLNDST3;GRNLNDDT</listitem>
+ <listitem name="{@utcm2=(UTC -2) Mid-Atlantic}">FALKST2;FALKDT</listitem>
+ <listitem name="{@utcm1=(UTC -1) Azores, Cape Verde}">AZOREST1;AZOREDT</listitem>
+ <listitem name="{@utc0=(UTC 0) London, Dublin, Lisbon}">GMT0;BST,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp1=(UTC +1) Berlin, Brussels, Paris}">CET-1;CEST,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp2=(UTC +2) Athens, Istanbul, South Africa}">WET-2;WET,M3.5.0,M10.5.0</listitem>
+ <listitem name="{@utcp3=(UTC +3) Moscow, Baghdad}">SAUST-3;SAUDT</listitem>
+ <listitem name="{@utcp4=(UTC +4) Abu Dhabi, Tbilisi, Muscat}">WST-4;WDT</listitem>
+ <listitem name="{@utcp5=(UTC +5) Yekaterinburg, Islamabad}">PAKST-5;PAKDT</listitem>
+ <listitem name="{@utcp6=(UTC +6) Almaty, Dhaka, Colombo}">TASHST-6;TASHDT</listitem>
+ <listitem name="{@utcp7=(UTC +7) Bangkok, Hanoi, Jakarta}">THAIST-7;THAIDT</listitem>
+ <listitem name="{@utcp8=(UTC +8) Beijing, Singapore, Hong Kong}">TAIST-8;TAIDT</listitem>
+ <listitem name="{@utcp9=(UTC +9) Tokyo, Seoul, Yakutsk}">JST-9;JSTDT</listitem>
+ <listitem name="{@utcp10=(UTC +10) Eastern Australia, Guam}">EET-10;EETDT</listitem>
+ <listitem name="{@utcp11=(UTC +11) Vladivostok, Solomon Islands}">MET-11;METDT</listitem>
+ <listitem name="{@utcp12=(UTC +12) Auckland, Wellington, Fiji}">NZST-12;NZDT</listitem>
</listbox>
<button>
@@ -3517,7 +3501,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Time Zone</text>
+ <text>{@settings_hdr=Settings} &gt; {@time_zone_hdr=Time Zone}</text>
</text>
<text color="%text_color%">
@@ -3529,19 +3513,19 @@
<checkbox>
<placement x="%col1_x_left%" y="%row1_y%"/>
<font resource="font_m" color="%text_color%"/>
- <text>Use daylight savings time (DST)</text>
+ <text>{@use_dst_chk=Use daylight savings time (DST)}</text>
<data variable="tw_time_zone_guidst"/>
<image checked="checkbox_true" unchecked="checkbox_false"/>
</checkbox>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Select Offset (usually 0): %tw_time_zone_guioffset%</text>
+ <text>{@sel_tz_offset=Select Offset (usually 0): %tw_time_zone_guioffset%}</text>
</text>
<button style="main_button_quarter_width">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>0</text>
+ <text>{@tz_offset_0=0}</text>
<actions>
<action function="set">tw_time_zone_guioffset=0</action>
<action function="setguitimezone"/>
@@ -3550,7 +3534,7 @@
<button style="main_button_quarter_width">
<placement x="%btn4_col2_x%" y="%row6_y%"/>
- <text>15</text>
+ <text>{@tz_offset_15=15}</text>
<actions>
<action function="set">tw_time_zone_guioffset=15</action>
<action function="setguitimezone"/>
@@ -3559,7 +3543,7 @@
<button style="main_button_quarter_width">
<placement x="%btn4_col3_x%" y="%row6_y%"/>
- <text>30</text>
+ <text>{@tz_offset_30=30}</text>
<actions>
<action function="set">tw_time_zone_guioffset=30</action>
<action function="setguitimezone"/>
@@ -3568,7 +3552,7 @@
<button style="main_button_quarter_width">
<placement x="%btn4_col4_x%" y="%row6_y%"/>
- <text>45</text>
+ <text>{@tz_offset_45=45}</text>
<actions>
<action function="set">tw_time_zone_guioffset=45</action>
<action function="setguitimezone"/>
@@ -3587,7 +3571,7 @@
<text style="text_m_accent">
<placement x="%btn4_col2_x%" y="%row11_y%"/>
- <text>Current Time Zone:</text>
+ <text>{@curr_tz_s=Current Time Zone:}</text>
</text>
<text style="text_m">
@@ -3624,14 +3608,14 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Screen Timeout</text>
+ <text>{@settings_hdr=Settings} &gt; {@settings_screen_timeout_hdr=Screen Timeout}</text>
</text>
<button style="checkbox">
<condition var1="tw_screen_timeout_secs" op="=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
<placement x="%indent%" y="%row1_y%" textplacement="6"/>
- <text>Enable screen timeout</text>
+ <text>{@enable_timeout_chk=Enable screen timeout}</text>
<image resource="checkbox_false"/>
<action function="set">tw_screen_timeout_secs=60</action>
</button>
@@ -3640,7 +3624,7 @@
<condition var1="tw_screen_timeout_secs" op="!=" var2="0"/>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
<placement x="%indent%" y="%row1_y%" textplacement="6"/>
- <text>Enable screen timeout</text>
+ <text>{@enable_timeout_chk=Enable screen timeout}</text>
<image resource="checkbox_true"/>
<action function="set">tw_screen_timeout_secs=0</action>
</button>
@@ -3648,14 +3632,14 @@
<slidervalue>
<condition var1="tw_no_screen_timeout" op="!=" var2="1"/>
<placement x="col1_x_left" y="%row2a_y%" w="%content_width%"/>
- <text>Screen timeout in seconds (0=disabled): %tw_screen_timeout_secs%</text>
+ <text>{@screen_to_slider_s=Screen timeout in seconds (0=disabled): %tw_screen_timeout_secs%}</text>
<data variable="tw_screen_timeout_secs" min="15" max="300"/>
</slidervalue>
<text style="text_m_fail">
<condition var1="tw_no_screen_timeout" op="=" var2="1"/>
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>Screen timeout setting unavailable</text>
+ <text>{@screen_to_na=Screen timeout setting unavailable}</text>
</text>
<button>
@@ -3683,13 +3667,13 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Screen Brightness</text>
+ <text>{@settings_hdr=Settings} &gt; {@settings_screen_bright_btn=Screen Brightness}</text>
</text>
<slidervalue>
<condition var1="tw_has_brightnesss_file" var2="1"/>
<placement x="col1_x_left" y="%row1_y%" w="%content_width%"/>
- <text>Brightness: %tw_brightness_pct%%</text>
+ <text>{@screen_bright_slider=Brightness: %tw_brightness_pct%%}</text>
<data variable="tw_brightness_pct" min="10" max="100"/>
<actions>
<action function="set">tw_brightness=%tw_brightness_max%</action>
@@ -3702,7 +3686,7 @@
<text style="text_m_fail">
<condition var1="tw_has_brightnesss_file" var2="0"/>
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>Brightness setting unavailable</text>
+ <text>{@screen_bright_na=Brightness setting unavailable}</text>
</text>
<button>
@@ -3730,12 +3714,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Vibration - Button Vibration</text>
+ <text>{@settings_hdr=Settings} &gt; {@vibration_hdr=Vibration} - {@button_vibration_hdr=Button Vibration}</text>
</text>
<slidervalue>
<placement x="col1_x_left" y="%row1_y%" w="%content_width%"/>
- <text>Button Vibration:</text>
+ <text>{@button_vibration=Button Vibration:}</text>
<data variable="tw_button_vibrate" min="0" max="300"/>
</slidervalue>
@@ -3764,12 +3748,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Vibration - Keyboard Vibration</text>
+ <text>{@settings_hdr=Settings} &gt; {@vibration_hdr=Vibration} - {@kb_vibration_hdr=Keyboard Vibration}</text>
</text>
<slidervalue>
<placement x="col1_x_left" y="%row1_y%" w="%content_width%"/>
- <text>Keyboard Vibration:</text>
+ <text>{@kb_vibration=Keyboard Vibration:}</text>
<data variable="tw_keyboard_vibrate" min="0" max="300"/>
</slidervalue>
@@ -3805,12 +3789,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Settings &gt; Vibration - Action Vibration</text>
+ <text>{@settings_hdr=Settings} &gt; {@vibration_hdr=Vibration} - {@act_vibration_hdr=Action Vibration}</text>
</text>
<slidervalue>
<placement x="col1_x_left" y="%row1_y%" w="%content_width%"/>
- <text>Action Vibration:</text>
+ <text>{@act_vibration=Action Vibration:}</text>
<data variable="tw_action_vibrate" min="0" max="500"/>
</slidervalue>
@@ -3832,6 +3816,40 @@
</action>
</page>
+ <page name="settings_language">
+ <template name="page"/>
+
+ <template name="statusbar"/>
+
+ <text style="text_m">
+ <placement x="%col1_x_left%" y="%row1_header_y%"/>
+ <text>{@settings_hdr=Settings} &gt; {@language_hdr=Language} - %tw_language_display%</text>
+ </text>
+
+ <object type="listbox" style="scrolllist">
+ <placement x="%col1_x_left%" y="%row2_header_y%" w="%content_width%" h="%fileselector_filemanager_height%"/>
+ <icon selected="radio_true" unselected="radio_false" />
+ <data name="tw_language" />
+ </object>
+
+ <button>
+ <placement x="%btn4_col4_x%" y="%row11_y%"/>
+ <highlight color="%highlight_color%"/>
+ <image resource="q_btn_folder"/>
+ <action function="setlanguage"></action>
+ </button>
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">settings</action>
+ </object>
+ </page>
+
<page name="advanced">
<template name="page"/>
@@ -3839,52 +3857,52 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced</text>
+ <text>{@advanced_hdr=Advanced}</text>
</text>
<button style="main_button">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Terminal</text>
+ <text>{@terminal_btn=Terminal}</text>
<action function="page">terminalfolder</action>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Fix Perms</text>
+ <text>{@fix_perm_s_btn=Fix Perms}</text>
<action function="page">fixperms</action>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>Reload Theme</text>
+ <text>{@reload_theme_btn=Reload Theme}</text>
<action function="reload"/>
</button>
<button style="main_button">
<condition var1="tw_allow_partition_sdcard" var2="1"/>
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>SD Card</text>
+ <text>{@part_sd_s_btn=SD Card}</text>
<action function="page">partsdcard</action>
</button>
<button style="main_button">
<condition var1="tw_show_dumlock" var2="1"/>
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>HTC Dumlock</text>
+ <text>{@dumlock_btn=HTC Dumlock}</text>
<action function="page">htcdumlock</action>
</button>
<button style="main_button">
<condition var1="tw_has_injecttwrp" var2="1"/>
<placement x="%col1_x_right%" y="%row11_y%"/>
- <text>Inject TWRP</text>
+ <text>{@inject_twrp_btn=Inject TWRP}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=reinjecttwrp</action>
- <action function="set">tw_text1=Re-Inject TWRP?</action>
- <action function="set">tw_action_text1=Re-Injecting TWRP...</action>
- <action function="set">tw_complete_text1=TWRP Injection Complete</action>
- <action function="set">tw_slider_text= Confirm</action>
+ <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action>
+ <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action>
+ <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action>
+ <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -3907,22 +3925,22 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced &gt; Partition SD Card</text>
+ <text>{@advanced_hdr=Advanced} &gt; {@part_sd_hdr=Partition SD Card}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>You will lose all files on your SD card!</text>
+ <text>{@part_sd_lose=You will lose all files on your SD card!}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This action cannot be undone!</text>
+ <text>{@part_sd_undo=This action cannot be undone!}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>EXT Size:</text>
+ <text>{@part_sd_ext_sz=EXT Size:}</text>
</text>
<text style="text_m">
@@ -3932,13 +3950,13 @@
<button style="main_button_quarter_width">
<placement x="%indent%" y="%row6_y%"/>
- <text>-</text>
+ <text>{@part_sd_m=-}</text>
<action function="addsubtract">tw_sdext_size-128</action>
</button>
<button style="main_button_quarter_width">
<placement x="%btn4_col4_x%" y="%row6_y%"/>
- <text>+</text>
+ <text>{@part_sd_p=+}</text>
<action function="addsubtract">tw_sdext_size+128</action>
</button>
@@ -3967,22 +3985,22 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced &gt; Partition SD Card</text>
+ <text>{@advanced_hdr=Advanced} &gt; {@part_sd_hdr=Partition SD Card}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>You will lose all files on your SD card!</text>
+ <text>{@part_sd_lose=You will lose all files on your SD card!}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This action cannot be undone!</text>
+ <text>{@part_sd_undo=This action cannot be undone!}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Swap Size:</text>
+ <text>{@part_sd_swap_sz=Swap Size:}</text>
</text>
<text style="text_m">
@@ -3992,13 +4010,13 @@
<button style="main_button_quarter_width">
<placement x="%indent%" y="%row6_y%"/>
- <text>-</text>
+ <text>{@part_sd_m=-}</text>
<action function="addsubtract">tw_swap_size-32</action>
</button>
<button style="main_button_quarter_width">
<placement x="%btn4_col4_x%" y="%row6_y%"/>
- <text>+</text>
+ <text>{@part_sd_p=+}</text>
<action function="addsubtract">tw_swap_size+32</action>
</button>
@@ -4034,22 +4052,22 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced &gt; Partition SD Card</text>
+ <text>{@advanced_hdr=Advanced} &gt; {@part_sd_hdr=Partition SD Card}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>You will lose all files on your SD card!</text>
+ <text>{@part_sd_lose=You will lose all files on your SD card!}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This action cannot be undone!</text>
+ <text>{@part_sd_undo=This action cannot be undone!}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>File System:</text>
+ <text>{@file_system=File System:}</text>
</text>
<text style="text_m">
@@ -4101,36 +4119,36 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced &gt; Partition SD Card</text>
+ <text>{@advanced_hdr=Advanced} &gt; {@part_sd_hdr=Partition SD Card}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row1_y%" placement="5"/>
- <text>You will lose all files on your SD card!</text>
+ <text>{@part_sd_lose=You will lose all files on your SD card!}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>This action cannot be undone!</text>
+ <text>{@part_sd_undo=This action cannot be undone!}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>EXT Size: %tw_sdext_size%</text>
+ <text>{@part_sd_ext_sz=EXT Size:} %tw_sdext_size%</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row6_y%" placement="5"/>
- <text>Swap Size: %tw_swap_size%</text>
+ <text>{@part_sd_swap_sz=Swap Size:} %tw_swap_size%</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>File System: %tw_sdpart_file_system%</text>
+ <text>{@file_system=File System:} %tw_sdpart_file_system%</text>
</text>
<slider>
- <text>Partition</text>
+ <text>{@swipe_part_sd_s=Partition}</text>
<action function="page">partsdcardaction</action>
<actions>
<action function="set">tw_back=partsdcard</action>
@@ -4138,9 +4156,9 @@
<action function="set">tw_has_action2=1</action>
<action function="set">tw_action2=set</action>
<action function="set">tw_action2_param=tw_zip_location=/sdcard</action>
- <action function="set">tw_action_text1=Partitioning SD Card...</action>
- <action function="set">tw_action_text2=This will take a few minutes.</action>
- <action function="set">tw_complete_text1=Partitioning Complete</action>
+ <action function="set">tw_action_text1={@partitioning_sd=Partitioning SD Card...}</action>
+ <action function="set">tw_action_text2={@partitioning_sd2=This will take a few minutes.}</action>
+ <action function="set">tw_complete_text1={@part_sd_complete=Partitioning Complete}</action>
<action function="page">action_page</action>
</actions>
</slider>
@@ -4163,47 +4181,47 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced &gt; HTC Dumlock</text>
+ <text>{@advanced_hdr=Advanced} &gt; {@dumlock_hdr=HTC Dumlock}</text>
</text>
<button style="main_button_full_width">
<placement x="%indent%" y="%row1_y%"/>
- <text>Restore Original Boot</text>
+ <text>{@dumlock_restore_btn=Restore Original Boot}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=htcdumlockrestoreboot</action>
- <action function="set">tw_text1=Restore original boot image?</action>
- <action function="set">tw_action_text1=Restoring Original Boot...</action>
- <action function="set">tw_complete_text1=Restore Original Boot Complete</action>
- <action function="set">tw_slider_text= Confirm</action>
+ <action function="set">tw_text1={@dumlock_restore_confirm=Restore original boot image?}</action>
+ <action function="set">tw_action_text1={@dumlock_restoring=Restoring Original Boot...}</action>
+ <action function="set">tw_complete_text1={@dumlock_restore_complete=Restore Original Boot Complete}</action>
+ <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_full_width">
<placement x="%indent%" y="%row6_y%"/>
- <text>Reflash Recovery</text>
+ <text>{@dumlock_reflash_btn=Reflash Recovery}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=htcdumlockreflashrecovery</action>
- <action function="set">tw_text1=Reflash recovery to boot?</action>
- <action function="set">tw_action_text1=Flashing recovery to boot...</action>
- <action function="set">tw_complete_text1=Recovery Flash to Boot Complete</action>
- <action function="set">tw_slider_text= Confirm</action>
+ <action function="set">tw_text1={@dumlock_reflash_confirm=Reflash recovery to boot?}</action>
+ <action function="set">tw_action_text1={@dumlock_reflashing=Flashing recovery to boot...}</action>
+ <action function="set">tw_complete_text1={@dumlock_reflash_complete=Recovery Flash to Boot Complete}</action>
+ <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
<button style="main_button_full_width">
<placement x="%indent%" y="%row11_y%"/>
- <text>Install HTC Dumlock</text>
+ <text>{@dumlock_install_btn=Install HTC Dumlock}</text>
<actions>
<action function="set">tw_back=htcdumlock</action>
<action function="set">tw_action=installhtcdumlock</action>
- <action function="set">tw_text1=Install HTC dumlock files to ROM?</action>
- <action function="set">tw_action_text1=Installing HTC Dumlock...</action>
- <action function="set">tw_complete_text1=HTC Dumlock Install Complete</action>
- <action function="set">tw_slider_text= Confirm</action>
+ <action function="set">tw_action_text1={@dumlock_installing=Installing HTC Dumlock...}</action>
+ <action function="set">tw_complete_text1={@dumlock_install_complete=HTC Dumlock Install Complete}</action>
+ <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action>
+ <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action>
<action function="page">confirm_action</action>
</actions>
</button>
@@ -4228,7 +4246,7 @@
</image>
<slider>
- <text> Unlock</text>
+ <text>{@swipe_unlock= Unlock}</text>
<action function="overlay"/>
</slider>
</page>
@@ -4240,7 +4258,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; Select File or Folder</text>
+ <text>{@fm_hdr=File Manager} &gt; {@fm_sel_file=Select a File or Folder}</text>
</text>
<fileselector>
@@ -4259,14 +4277,14 @@
<actions>
<action function="set">tw_filename1=tw_file_location1</action>
<action function="set">tw_fm_isfolder=1</action>
- <action function="set">tw_fm_type=Folder</action>
+ <action function="set">tw_fm_type={@fm_type_folder=Folder}</action>
<action function="page">filemanageroptions</action>
</actions>
</button>
<action>
<actions>
- <action function="set">tw_fm_type=File</action>
+ <action function="set">tw_fm_type={@fm_type_file=File}</action>
<action function="set">tw_fm_isfolder=0</action>
</actions>
</action>
@@ -4294,16 +4312,16 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>%tw_fm_type%: %tw_filename1%</text>
+ <text>%tw_fm_type% &gt; %tw_filename1%</text>
</text>
<button style="main_button">
<condition var1="tw_fm_isfolder" var2="0"/>
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Copy</text>
+ <text>{@fm_copy_btn=Copy}</text>
<actions>
<action function="set">tw_filemanager_command=cp</action>
- <action function="set">tw_fm_text1=Copying</action>
+ <action function="set">tw_fm_text1={@fm_copying=Copying}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
@@ -4311,30 +4329,30 @@
<button style="main_button">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Copy</text>
+ <text>{@fm_copy_btn=Copy}</text>
<actions>
<action function="set">tw_filemanager_command=cd "%tw_file_location1%" &amp;&amp; cd .. &amp;&amp; cp -R</action>
- <action function="set">tw_fm_text1=Copying</action>
+ <action function="set">tw_fm_text1={@fm_copying=Copying}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
<button style="main_button">
<placement x="%col1_x_right%" y="%row1_y%"/>
- <text>Move</text>
+ <text>{@fm_move_btn=Move}</text>
<actions>
<action function="set">tw_filemanager_command=mv</action>
- <action function="set">tw_fm_text1=Moving</action>
+ <action function="set">tw_fm_text1={@fm_moving=Moving}</action>
<action function="page">choosedestinationfolder</action>
</actions>
</button>
<button style="main_button">
<placement x="%col1_x_left%" y="%row6_y%"/>
- <text>chmod 755</text>
+ <text>{@fm_chmod755_btn=chmod 755}</text>
<actions>
<action function="set">tw_filemanager_command=chmod 755</action>
- <action function="set">tw_fm_text1=chmod 755</action>
+ <action function="set">tw_fm_text1={@fm_chmod755ing=chmod 755}</action>
<action function="set">tw_fm_text2=</action>
<action function="set">tw_fm_text3=</action>
<action function="set">tw_include_text3=0</action>
@@ -4345,7 +4363,7 @@
<button style="main_button">
<placement x="%col1_x_right%" y="%row6_y%"/>
- <text>chmod</text>
+ <text>{@fm_chmod_btn=chmod}</text>
<actions>
<action function="set">tw_filemanager_rename=0000</action>
<action function="set">tw_fm_text2=</action>
@@ -4358,10 +4376,10 @@
<button style="main_button">
<placement x="%col1_x_left%" y="%row11_y%"/>
- <text>Delete</text>
+ <text>{@fm_delete_btn=Delete}</text>
<actions>
<action function="set">tw_filemanager_command=rm -rf</action>
- <action function="set">tw_fm_text1=Deleting</action>
+ <action function="set">tw_fm_text1={@fm_deleting=Deleting}</action>
<action function="set">tw_fm_text2=</action>
<action function="set">tw_fm_text3=</action>
<action function="set">tw_include_text3=0</action>
@@ -4373,10 +4391,10 @@
<button style="main_button">
<condition var1="tw_fm_isfolder" var2="0"/>
<placement x="%col1_x_right%" y="%row11_y%"/>
- <text>Rename</text>
+ <text>{@fm_rename_btn=Rename}</text>
<actions>
<action function="set">tw_filemanager_rename=tw_selection1</action>
- <action function="set">tw_fm_text1=Renaming</action>
+ <action function="set">tw_fm_text1={@fm_renaming=Renaming}</action>
<action function="set">tw_filemanager_command=mv</action>
<action function="page">filemanagerrenamefile</action>
</actions>
@@ -4385,10 +4403,10 @@
<button style="main_button">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%col1_x_right%" y="%row11_y%"/>
- <text>Rename</text>
+ <text>{@fm_rename_btn=Rename}</text>
<actions>
<action function="set">tw_filemanager_rename=tw_selection1</action>
- <action function="set">tw_fm_text1=Renaming</action>
+ <action function="set">tw_fm_text1={@fm_renaming=Renaming}</action>
<action function="set">tw_filemanager_command=cd "%tw_file_location1%" &amp;&amp; cd .. &amp;&amp; mv</action>
<action function="page">filemanagerrenamefolder</action>
</actions>
@@ -4412,7 +4430,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; Select Destination Folder</text>
+ <text>{@fm_hdr=File Manager} &gt; {@fm_sel_dest=Select Destination Folder}</text>
</text>
<fileselector>
@@ -4455,12 +4473,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; Rename %tw_fm_type%</text>
+ <text>{@fm_hdr=File Manager} &gt; {@fm_rename_hdr=Rename} %tw_fm_type%</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -4483,7 +4501,7 @@
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -4507,12 +4525,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; Rename %tw_fm_type%</text>
+ <text>{@fm_hdr=File Manager} &gt; {@fm_rename_hdr=Rename} %tw_fm_type%</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Name:</text>
+ <text>{@name=Name:}</text>
</text>
<input>
@@ -4535,7 +4553,7 @@
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -4559,12 +4577,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; Set Permissions</text>
+ <text>{@fm_hdr=File Manager} &gt; {@fm_set_perms_hdr=Set Permissions}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Permissions:</text>
+ <text>{@fm_perms=Permissions:}</text>
</text>
<input>
@@ -4586,7 +4604,7 @@
<button style="main_button_half_height">
<placement x="%col1_x_left%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<action function="page">filemanageroptions</action>
</button>
@@ -4610,7 +4628,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; Confirm Action</text>
+ <text>{@fm_hdr=File Manager} &gt; {@confirm_action=Confirm Action}</text>
</text>
<text style="text_m_accent">
@@ -4635,11 +4653,11 @@
<text style="text_m">
<placement x="%center_x%" y="%row8_y%" placement="5"/>
- <text>Press back button to cancel.</text>
+ <text>{@back_cancel=Press back button to cancel.}</text>
</text>
<slider>
- <text>Confirm</text>
+ <text>{@swipe_confirm= Confirm}</text>
<action function="page">filemanageraction</action>
</slider>
@@ -4661,7 +4679,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>File Manager &gt; %tw_fm_text1%</text>
+ <text>{@fm_hdr=File Manager} &gt; %tw_fm_text1%</text>
</text>
<template name="console"/>
@@ -4675,7 +4693,7 @@
</conditions>
<actions>
<action function="set">tw_back=filemanagerlist</action>
- <action function="set">tw_complete_text1=File Operation Complete</action>
+ <action function="set">tw_complete_text1={@fm_complete=File Operation Complete}</action>
<action function="page">action_complete</action>
</actions>
</action>
@@ -4686,7 +4704,7 @@
<condition var1="tw_operation_status" op="!=" var2="0"/>
</conditions>
<actions>
- <action function="set">tw_complete_text1=File Operation Complete</action>
+ <action function="set">tw_complete_text1={@fm_complete=File Operation Complete}</action>
<action function="page">action_complete</action>
</actions>
</action>
@@ -4714,12 +4732,12 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Mount &gt; Decrypt Data</text>
+ <text>{@mount_hdr=Mount} &gt; {@decrypt_data_hdr=Decrypt Data}</text>
</text>
<text style="text_m_accent">
<placement x="%col1_x_left%" y="%row1_y%"/>
- <text>Enter Password:</text>
+ <text>{@decrypt_data_enter_pass=Enter Password:}</text>
</text>
<input>
@@ -4742,12 +4760,12 @@
<text style="text_m_fail">
<condition var1="tw_password_fail" var2="1"/>
<placement x="%col1_x_left%" y="%row3_input_y%"/>
- <text>Password failed, please try again!</text>
+ <text>{@decryt_data_failed=Password failed, please try again!}</text>
</text>
<button style="main_button_half_height">
<placement x="%col1_x_right%" y="%row4_y%"/>
- <text>Cancel</text>
+ <text>{@cancel_btn=Cancel}</text>
<actions>
<action function="set">tw_page_done=1</action>
<action function="page">main</action>
@@ -4764,17 +4782,17 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Mount &gt; Decrypt Data</text>
+ <text>{@mount_hdr=Mount} &gt; {@decrypt_data_hdr=Decrypt Data}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>Enter Pattern.</text>
+ <text>{@decrypt_data_enter_pattern=Enter Pattern.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row10_y%" placement="5"/>
- <text>Press back to cancel.</text>
+ <text>{@back_cancel=Press back to cancel.}</text>
</text>
<patternpassword>
@@ -4808,7 +4826,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Mount &gt; Trying Decryption</text>
+ <text>{@mount_hdr=Mount} &gt; {@decrypt_data_trying=Trying Decryption}</text>
</text>
<template name="console"/>
@@ -4849,7 +4867,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Terminal &gt; Select Starting Folder</text>
+ <text>{@term_s_hdr=Terminal} &gt; {@term_sel_folder_hdr=Browse to Starting Folder}</text>
</text>
<fileselector>
@@ -4886,7 +4904,7 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Terminal &gt; %tw_terminal_location%</text>
+ <text>{@term_s_hdr=Terminal} &gt; %tw_terminal_location%</text>
</text>
<template name="console_terminal"/>
@@ -4932,35 +4950,35 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Install &gt; ADB Sideload</text>
+ <text>{@install_hdr=Install} &gt; {@adb_sideload_hdr=ADB Sideload}</text>
</text>
<text style="text_m_accent">
<placement x="%indent%" y="%row1_y%"/>
- <text>Options:</text>
+ <text>{@options=Options:}</text>
</text>
<checkbox>
<placement x="%indent%" y="%row2_y%"/>
- <text>Wipe Dalvik Cache</text>
+ <text>{@sideload_wipe_dalvik_chk=Wipe Dalvik Cache}</text>
<data variable="tw_wipe_dalvik"/>
</checkbox>
<checkbox>
<placement x="%indent%" y="%row4a_y%"/>
- <text>Wipe Cache</text>
+ <text>{@sideload_wipe_cache_chk=Wipe Cache}</text>
<data variable="tw_wipe_cache"/>
</checkbox>
<slider>
- <text> Start</text>
+ <text>{@swipe_sideload= Start}</text>
<action function="page">partsdcardaction</action>
<actions>
<action function="set">tw_back=install_type</action>
<action function="set">tw_action=adbsideload</action>
- <action function="set">tw_action_text1=ADB Sideload</action>
- <action function="set">tw_action_text2=Usage: adb sideload filename.zip</action>
- <action function="set">tw_complete_text1=ADB Sideload Complete</action>
+ <action function="set">tw_action_text1={@sideload_confirm=ADB Sideload}</action>
+ <action function="set">tw_action_text2={@sideload_usage=Usage: adb sideload filename.zip}</action>
+ <action function="set">tw_complete_text1={@sideload_complete=ADB Sideload Complete}</action>
<action function="set">tw_has_cancel=1</action>
<action function="set">tw_show_reboot=1</action>
<action function="set">tw_cancel_action=adbsideloadcancel</action>
@@ -4986,38 +5004,38 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Advanced &gt; Fix Permissions</text>
+ <text>{@advanced_hdr=Advanced} &gt; {@fix_perms_hdr=Fix Permissions}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Note: Fixing permissions is rarely needed.</text>
+ <text>{@fix_perms_note=Note: Fixing permissions is rarely needed.}</text>
</text>
<checkbox>
<placement x="%indent%" y="%row4_y%"/>
- <text>Also fix SELinux Contexts</text>
+ <text>{@fix_perms_selinux_chk=Also fix SELinux Contexts}</text>
<data variable="tw_fixperms_restorecon"/>
</checkbox>
<text style="text_m_fail">
<placement x="%center_x%" y="%row6a_y%" placement="5"/>
- <text>Fixing SELinux Contexts may cause</text>
+ <text>{@fix_perms_sel_note1=Fixing SELinux Contexts may cause}</text>
</text>
<text style="text_m_fail">
<placement x="%center_x%" y="%row7a_y%" placement="5"/>
- <text>your device to not boot properly.</text>
+ <text>{@fix_perms_sel_note2=your device to not boot properly.}</text>
</text>
<slider>
- <text> Fix Perms</text>
+ <text>{@swipe_fix_perms= Fix Perms}</text>
<actions>
<action function="set">tw_back=advanced</action>
<action function="set">tw_action=fixpermissions</action>
- <action function="set">tw_action_text1=Fixing Permissions...</action>
- <action function="set">tw_complete_text1=Fix Permissions Complete</action>
- <action function="set">tw_slider_text= Confirm</action>
+ <action function="set">tw_action_text1={@fixing_perms=Fixing Permissions...}</action>
+ <action function="set">tw_complete_text1={@fix_perms_complete=Fix Permissions Complete}</action>
+ <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action>
<action function="set">tw_show_reboot=1</action>
<action function="page">action_page</action>
</actions>
@@ -5041,35 +5059,35 @@
<text style="text_m">
<placement x="%col1_x_left%" y="%row1_header_y%"/>
- <text>Reboot &gt; SuperSU Check</text>
+ <text>{@reboot_hdr=Reboot} &gt; {@su_hdr=SuperSU Check}</text>
</text>
<text style="text_m_accent">
<placement x="%center_x%" y="%row2_y%" placement="5"/>
- <text>Your device does not appear to be rooted.</text>
+ <text>{@su_note1=Your device does not appear to be rooted.}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row4_y%" placement="5"/>
- <text>Install SuperSU now?</text>
+ <text>{@su_note2=Install SuperSU now?}</text>
</text>
<text style="text_m">
<placement x="%center_x%" y="%row5_y%" placement="5"/>
- <text>This will root your device.</text>
+ <text>{@su_note3=This will root your device.}</text>
</text>
<button style="main_button_full_width">
<placement x="%indent%" y="%row6_y%"/>
- <text>Do not Install</text>
+ <text>{@su_cancel=Do not Install}</text>
<action function="set">tw_page_done=1</action>
</button>
<slider>
- <text> Install</text>
+ <text>{@swipe_su_install= Install}</text>
<actions>
<action function="set">tw_action=installsu</action>
- <action function="set">tw_action_text1=Installing SuperSU</action>
+ <action function="set">tw_action_text1={@su_installing=Installing SuperSU}</action>
<action function="set">tw_action_text2=</action>
<action function="page">singleaction_page</action>
</actions>
diff --git a/gui/theme/landscape_hdpi/ui.xml b/gui/theme/landscape_hdpi/ui.xml
index ef967f5a7..824164137 100644
--- a/gui/theme/landscape_hdpi/ui.xml
+++ b/gui/theme/landscape_hdpi/ui.xml
@@ -94,8 +94,13 @@
<variable name="tab_height" value="72" />
<variable name="tab_indicator_height" value="4" />
<variable name="tab4_width" value="480" />
+ <variable name="tab5_width" value="384" />
<variable name="tab4_col2_x" value="480" />
<variable name="tab4_col4_x" value="1440" />
+ <variable name="tab5_col2_x" value="384" />
+ <variable name="tab5_col3_x" value="768" />
+ <variable name="tab5_col4_x" value="1152" />
+ <variable name="tab5_col5_x" value="1536" />
<variable name="btn4_col2_x_left" value="282" />
<variable name="btn4_col3_x_left" value="516" />
<variable name="btn4_col4_x_left" value="750" />
@@ -255,7 +260,7 @@
<condition var1="tw_no_cpu_temp" var2="0" />
<font resource="font_m" />
<placement x="%indent%" y="%row1_header_y%" />
- <text>CPU: %tw_cpu_temp% &#xB0;C</text>
+ <text>{@cpu_temp=CPU: %tw_cpu_temp% &#xB0;C}</text>
</object>
<object type="text" color="%text_color%">
@@ -272,7 +277,7 @@
</conditions>
<font resource="font_m" />
<placement x="%indent_right%" y="%row1_header_y%" placement="1" />
- <text>Battery: %tw_battery%</text>
+ <text>{@battery_pct=Battery: %tw_battery%}</text>
</object>
<object type="fill" color="#000000">
@@ -456,14 +461,14 @@
<object type="button" style="sort_asc">
<condition var1="tw_gui_sort_order" op="=" var2="1" />
<placement x="%col_button_right%" y="%row1a_y%" />
- <text>Sort by Name</text>
+ <text>{@sort_by_name=Sort by Name}</text>
<action function="set">tw_gui_sort_order=-1</action>
</object>
<object type="button" style="sort_desc">
<condition var1="tw_gui_sort_order" op="=" var2="-1" />
<placement x="%col_button_right%" y="%row1a_y%" />
- <text>Sort by Name</text>
+ <text>{@sort_by_name=Sort by Name}</text>
<action function="set">tw_gui_sort_order=1</action>
</object>
@@ -473,21 +478,21 @@
<condition var1="tw_gui_sort_order" op="!=" var2="-1" />
</conditions>
<placement x="%col_button_right%" y="%row1a_y%" />
- <text>Sort by Name</text>
+ <text>{@sort_by_name=Sort by Name}</text>
<action function="set">tw_gui_sort_order=1</action>
</object>
<object type="button" style="sort_asc">
<condition var1="tw_gui_sort_order" op="=" var2="2" />
<placement x="%col_button_right%" y="%row4a_y%" />
- <text>Sort by Date</text>
+ <text>{@sort_by_date=Sort by Date}</text>
<action function="set">tw_gui_sort_order=-2</action>
</object>
<object type="button" style="sort_desc">
<condition var1="tw_gui_sort_order" op="=" var2="-2" />
<placement x="%col_button_right%" y="%row4a_y%" />
- <text>Sort by Date</text>
+ <text>{@sort_by_date=Sort by Date}</text>
<action function="set">tw_gui_sort_order=2</action>
</object>
@@ -497,21 +502,21 @@
<condition var1="tw_gui_sort_order" op="!=" var2="-2" />
</conditions>
<placement x="%col_button_right%" y="%row4a_y%" />
- <text>Sort by Date</text>
+ <text>{@sort_by_date=Sort by Date}</text>
<action function="set">tw_gui_sort_order=2</action>
</object>
<object type="button" style="sort_asc">
<condition var1="tw_gui_sort_order" op="=" var2="3" />
<placement x="%col_button_right%" y="%row7a_y%" />
- <text>Sort by Size</text>
+ <text>{@sort_by_size=Sort by Size}</text>
<action function="set">tw_gui_sort_order=-3</action>
</object>
<object type="button" style="sort_desc">
<condition var1="tw_gui_sort_order" op="=" var2="-3" />
<placement x="%col_button_right%" y="%row7a_y%" />
- <text>Sort by Size</text>
+ <text>{@sort_by_size=Sort by Size}</text>
<action function="set">tw_gui_sort_order=3</action>
</object>
@@ -521,35 +526,41 @@
<condition var1="tw_gui_sort_order" op="!=" var2="-3" />
</conditions>
<placement x="%col_button_right%" y="%row7a_y%" />
- <text>Sort by Size</text>
+ <text>{@sort_by_size=Sort by Size}</text>
<action function="set">tw_gui_sort_order=3</action>
</object>
</template>
<template name="tabs_settings">
<object type="button" style="tab">
- <placement x="0" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>GENERAL</text>
+ <placement x="0" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_general=GENERAL}</text>
<action function="page">settings</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col2_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>TIME ZONE</text>
+ <placement x="%tab5_col2_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_time_zone=TIME ZONE}</text>
<action function="page">settings_timezone</action>
</object>
<object type="button" style="tab">
- <placement x="%center_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>SCREEN</text>
+ <placement x="%tab5_col3_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_screen=SCREEN}</text>
<action function="page">settings_screen</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col4_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>VIBRATION</text>
+ <placement x="%tab5_col4_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_vibration=VIBRATION}</text>
<action function="page">settings_vibration</action>
</object>
+
+ <object type="button" style="tab">
+ <placement x="%tab5_col5_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_language=LANGUAGE}</text>
+ <action function="page">settings_language</action>
+ </object>
</template>
<template name="console">
diff --git a/gui/theme/landscape_mdpi/ui.xml b/gui/theme/landscape_mdpi/ui.xml
index 563f16ee4..818c23d17 100644
--- a/gui/theme/landscape_mdpi/ui.xml
+++ b/gui/theme/landscape_mdpi/ui.xml
@@ -94,8 +94,13 @@
<variable name="tab_height" value="30" />
<variable name="tab_indicator_height" value="2" />
<variable name="tab4_width" value="200" />
+ <variable name="tab5_width" value="160" />
<variable name="tab4_col2_x" value="200" />
<variable name="tab4_col4_x" value="600" />
+ <variable name="tab5_col2_x" value="160" />
+ <variable name="tab5_col3_x" value="320" />
+ <variable name="tab5_col4_x" value="480" />
+ <variable name="tab5_col5_x" value="640" />
<variable name="btn4_col2_x_left" value="117" />
<variable name="btn4_col3_x_left" value="216" />
<variable name="btn4_col4_x_left" value="313" />
@@ -255,7 +260,7 @@
<condition var1="tw_no_cpu_temp" var2="0" />
<font resource="font_m" />
<placement x="%indent%" y="%row1_header_y%" />
- <text>CPU: %tw_cpu_temp% &#xB0;C</text>
+ <text>{@cpu_temp=CPU: %tw_cpu_temp% &#xB0;C}</text>
</object>
<object type="text" color="%text_color%">
@@ -272,7 +277,7 @@
</conditions>
<font resource="font_m" />
<placement x="%indent_right%" y="%row1_header_y%" placement="1" />
- <text>Battery: %tw_battery%</text>
+ <text>{@battery_pct=Battery: %tw_battery%}</text>
</object>
<object type="fill" color="#000000">
@@ -456,14 +461,14 @@
<object type="button" style="sort_asc">
<condition var1="tw_gui_sort_order" op="=" var2="1" />
<placement x="%col_button_right%" y="%row1a_y%" />
- <text>Sort by Name</text>
+ <text>{@sort_by_name=Sort by Name}</text>
<action function="set">tw_gui_sort_order=-1</action>
</object>
<object type="button" style="sort_desc">
<condition var1="tw_gui_sort_order" op="=" var2="-1" />
<placement x="%col_button_right%" y="%row1a_y%" />
- <text>Sort by Name</text>
+ <text>{@sort_by_name=Sort by Name}</text>
<action function="set">tw_gui_sort_order=1</action>
</object>
@@ -473,21 +478,21 @@
<condition var1="tw_gui_sort_order" op="!=" var2="-1" />
</conditions>
<placement x="%col_button_right%" y="%row1a_y%" />
- <text>Sort by Name</text>
+ <text>{@sort_by_name=Sort by Name}</text>
<action function="set">tw_gui_sort_order=1</action>
</object>
<object type="button" style="sort_asc">
<condition var1="tw_gui_sort_order" op="=" var2="2" />
<placement x="%col_button_right%" y="%row4a_y%" />
- <text>Sort by Date</text>
+ <text>{@sort_by_date=Sort by Date}</text>
<action function="set">tw_gui_sort_order=-2</action>
</object>
<object type="button" style="sort_desc">
<condition var1="tw_gui_sort_order" op="=" var2="-2" />
<placement x="%col_button_right%" y="%row4a_y%" />
- <text>Sort by Date</text>
+ <text>{@sort_by_date=Sort by Date}</text>
<action function="set">tw_gui_sort_order=2</action>
</object>
@@ -497,21 +502,21 @@
<condition var1="tw_gui_sort_order" op="!=" var2="-2" />
</conditions>
<placement x="%col_button_right%" y="%row4a_y%" />
- <text>Sort by Date</text>
+ <text>{@sort_by_date=Sort by Date}</text>
<action function="set">tw_gui_sort_order=2</action>
</object>
<object type="button" style="sort_asc">
<condition var1="tw_gui_sort_order" op="=" var2="3" />
<placement x="%col_button_right%" y="%row7a_y%" />
- <text>Sort by Size</text>
+ <text>{@sort_by_size=Sort by Size}</text>
<action function="set">tw_gui_sort_order=-3</action>
</object>
<object type="button" style="sort_desc">
<condition var1="tw_gui_sort_order" op="=" var2="-3" />
<placement x="%col_button_right%" y="%row7a_y%" />
- <text>Sort by Size</text>
+ <text>{@sort_by_size=Sort by Size}</text>
<action function="set">tw_gui_sort_order=3</action>
</object>
@@ -521,35 +526,41 @@
<condition var1="tw_gui_sort_order" op="!=" var2="-3" />
</conditions>
<placement x="%col_button_right%" y="%row7a_y%" />
- <text>Sort by Size</text>
+ <text>{@sort_by_size=Sort by Size}</text>
<action function="set">tw_gui_sort_order=3</action>
</object>
</template>
<template name="tabs_settings">
<object type="button" style="tab">
- <placement x="0" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>GENERAL</text>
+ <placement x="0" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_general=GENERAL}</text>
<action function="page">settings</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col2_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>TIME ZONE</text>
+ <placement x="%tab5_col2_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_time_zone=TIME ZONE}</text>
<action function="page">settings_timezone</action>
</object>
<object type="button" style="tab">
- <placement x="%center_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>SCREEN</text>
+ <placement x="%tab5_col3_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_screen=SCREEN}</text>
<action function="page">settings_screen</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col4_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>VIBRATION</text>
+ <placement x="%tab5_col4_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_vibration=VIBRATION}</text>
<action function="page">settings_vibration</action>
</object>
+
+ <object type="button" style="tab">
+ <placement x="%tab5_col5_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_language=LANGUAGE}</text>
+ <action function="page">settings_language</action>
+ </object>
</template>
<template name="console">
diff --git a/gui/theme/portrait_hdpi/ui.xml b/gui/theme/portrait_hdpi/ui.xml
index f8e1181f5..7708f926b 100644
--- a/gui/theme/portrait_hdpi/ui.xml
+++ b/gui/theme/portrait_hdpi/ui.xml
@@ -82,10 +82,15 @@
<variable name="tab_indicator_height" value="6" />
<variable name="tab3_width" value="360" />
<variable name="tab4_width" value="270" />
+ <variable name="tab5_width" value="216" />
<variable name="tab3_col2_x" value="360" />
<variable name="tab3_col3_x" value="720" />
<variable name="tab4_col2_x" value="270" />
<variable name="tab4_col4_x" value="810" />
+ <variable name="tab5_col2_x" value="216" />
+ <variable name="tab5_col3_x" value="432" />
+ <variable name="tab5_col4_x" value="648" />
+ <variable name="tab5_col5_x" value="864" />
<variable name="btn3_col2_x" value="384" />
<variable name="btn3_col3_x" value="732" />
<variable name="btn4_col2_x" value="297" />
@@ -247,7 +252,7 @@
<condition var1="tw_no_cpu_temp" var2="0" />
<font resource="font_m" />
<placement x="%indent%" y="%row1_header_y%" />
- <text>CPU: %tw_cpu_temp% &#xB0;C</text>
+ <text>{@cpu_temp=CPU: %tw_cpu_temp% &#xB0;C}</text>
</object>
<object type="text" color="%text_color%">
@@ -264,7 +269,7 @@
</conditions>
<font resource="font_m" />
<placement x="%indent_right%" y="%row1_header_y%" placement="1" />
- <text>Battery: %tw_battery%</text>
+ <text>{@battery_pct=Battery: %tw_battery%}</text>
</object>
<object type="fill" color="#000000">
@@ -357,7 +362,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="1" />
<placement x="%indent%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Name</text>
+ <text>{@sort_by_name_only=Name}</text>
<image resource="sort_asc" />
<action function="set">tw_gui_sort_order=-1</action>
</object>
@@ -367,7 +372,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="-1" />
<placement x="%indent%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Name</text>
+ <text>{@sort_by_name_only=Name}</text>
<image resource="sort_desc" />
<action function="set">tw_gui_sort_order=1</action>
</object>
@@ -380,7 +385,7 @@
</conditions>
<placement x="%indent%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Name</text>
+ <text>{@sort_by_name_only=Name}</text>
<image resource="sort_empty" />
<action function="set">tw_gui_sort_order=1</action>
</object>
@@ -390,7 +395,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="2" />
<placement x="%btn3_col2_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Date</text>
+ <text>{@sort_by_date_only=Date}</text>
<image resource="sort_asc" />
<action function="set">tw_gui_sort_order=-2</action>
</object>
@@ -400,7 +405,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="-2" />
<placement x="%btn3_col2_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Date</text>
+ <text>{@sort_by_date_only=Date}</text>
<image resource="sort_desc" />
<action function="set">tw_gui_sort_order=2</action>
</object>
@@ -413,7 +418,7 @@
</conditions>
<placement x="%btn3_col2_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Date</text>
+ <text>{@sort_by_date_only=Date}</text>
<image resource="sort_empty" />
<action function="set">tw_gui_sort_order=2</action>
</object>
@@ -423,7 +428,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="3" />
<placement x="%btn3_col3_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Size</text>
+ <text>{@sort_by_size_only=Size}</text>
<image resource="sort_asc" />
<action function="set">tw_gui_sort_order=-3</action>
</object>
@@ -433,7 +438,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="-3" />
<placement x="%btn3_col3_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Size</text>
+ <text>{@sort_by_size_only=Size}</text>
<image resource="sort_desc" />
<action function="set">tw_gui_sort_order=3</action>
</object>
@@ -446,7 +451,7 @@
</conditions>
<placement x="%btn3_col3_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Size</text>
+ <text>{@sort_by_size_only=Size}</text>
<image resource="sort_empty" />
<action function="set">tw_gui_sort_order=3</action>
</object>
@@ -455,41 +460,47 @@
<template name="tabs_backup">
<object type="button" style="tab">
<placement x="0" y="%row1_y%" w="%tab3_width%" h="%tab_height%" />
- <text>BACKUP</text>
+ <text>{@tab_backup=BACKUP}</text>
<action function="page">backup</action>
</object>
<object type="button" style="tab">
<placement x="%tab3_col2_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%" />
- <text>OPTIONS</text>
+ <text>{@tab_options=OPTIONS}</text>
<action function="page">backup_options</action>
</object>
</template>
<template name="tabs_settings">
<object type="button" style="tab">
- <placement x="0" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>GENERAL</text>
+ <placement x="0" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_general=GENERAL}</text>
<action function="page">settings</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col2_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>TIME ZONE</text>
+ <placement x="%tab5_col2_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_time_zone=TIME ZONE}</text>
<action function="page">settings_timezone</action>
</object>
<object type="button" style="tab">
- <placement x="%center_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>SCREEN</text>
+ <placement x="%tab5_col3_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_screen=SCREEN}</text>
<action function="page">settings_screen</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col4_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>VIBRATION</text>
+ <placement x="%tab5_col4_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_vibration=VIBRATION}</text>
<action function="page">settings_vibration</action>
</object>
+
+ <object type="button" style="tab">
+ <placement x="%tab5_col5_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_language=LANGUAGE}</text>
+ <action function="page">settings_language</action>
+ </object>
</template>
<template name="console">
diff --git a/gui/theme/portrait_mdpi/ui.xml b/gui/theme/portrait_mdpi/ui.xml
index 1ba10a380..68fd32459 100644
--- a/gui/theme/portrait_mdpi/ui.xml
+++ b/gui/theme/portrait_mdpi/ui.xml
@@ -82,10 +82,15 @@
<variable name="tab_indicator_height" value="3" />
<variable name="tab3_width" value="160" />
<variable name="tab4_width" value="120" />
+ <variable name="tab5_width" value="96" />
<variable name="tab3_col2_x" value="160" />
<variable name="tab3_col3_x" value="320" />
<variable name="tab4_col2_x" value="120" />
<variable name="tab4_col4_x" value="360" />
+ <variable name="tab5_col2_x" value="96" />
+ <variable name="tab5_col3_x" value="192" />
+ <variable name="tab5_col4_x" value="288" />
+ <variable name="tab5_col5_x" value="384" />
<variable name="btn3_col2_x" value="170" />
<variable name="btn3_col3_x" value="325" />
<variable name="btn4_col2_x" value="131" />
@@ -247,7 +252,7 @@
<condition var1="tw_no_cpu_temp" var2="0" />
<font resource="font_m" />
<placement x="%indent%" y="%row1_header_y%" />
- <text>CPU: %tw_cpu_temp% &#xB0;C</text>
+ <text>{@cpu_temp=CPU: %tw_cpu_temp% &#xB0;C}</text>
</object>
<object type="text" color="%text_color%">
@@ -264,7 +269,7 @@
</conditions>
<font resource="font_m" />
<placement x="%indent_right%" y="%row1_header_y%" placement="1" />
- <text>Battery: %tw_battery%</text>
+ <text>{@battery_pct=Battery: %tw_battery%}</text>
</object>
<object type="fill" color="#000000">
@@ -357,7 +362,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="1" />
<placement x="%indent%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Name</text>
+ <text>{@sort_by_name_only=Name}</text>
<image resource="sort_asc" />
<action function="set">tw_gui_sort_order=-1</action>
</object>
@@ -367,7 +372,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="-1" />
<placement x="%indent%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Name</text>
+ <text>{@sort_by_name_only=Name}</text>
<image resource="sort_desc" />
<action function="set">tw_gui_sort_order=1</action>
</object>
@@ -380,7 +385,7 @@
</conditions>
<placement x="%indent%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Name</text>
+ <text>{@sort_by_name_only=Name}</text>
<image resource="sort_empty" />
<action function="set">tw_gui_sort_order=1</action>
</object>
@@ -390,7 +395,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="2" />
<placement x="%btn3_col2_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Date</text>
+ <text>{@sort_by_date_only=Date}</text>
<image resource="sort_asc" />
<action function="set">tw_gui_sort_order=-2</action>
</object>
@@ -400,7 +405,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="-2" />
<placement x="%btn3_col2_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Date</text>
+ <text>{@sort_by_date_only=Date}</text>
<image resource="sort_desc" />
<action function="set">tw_gui_sort_order=2</action>
</object>
@@ -413,7 +418,7 @@
</conditions>
<placement x="%btn3_col2_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Date</text>
+ <text>{@sort_by_date_only=Date}</text>
<image resource="sort_empty" />
<action function="set">tw_gui_sort_order=2</action>
</object>
@@ -423,7 +428,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="3" />
<placement x="%btn3_col3_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Size</text>
+ <text>{@sort_by_size_only=Size}</text>
<image resource="sort_asc" />
<action function="set">tw_gui_sort_order=-3</action>
</object>
@@ -433,7 +438,7 @@
<condition var1="tw_gui_sort_order" op="=" var2="-3" />
<placement x="%btn3_col3_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Size</text>
+ <text>{@sort_by_size_only=Size}</text>
<image resource="sort_desc" />
<action function="set">tw_gui_sort_order=3</action>
</object>
@@ -446,7 +451,7 @@
</conditions>
<placement x="%btn3_col3_x%" y="%row1a_y%" />
<font resource="font_s" color="%text_button_color%" />
- <text>Size</text>
+ <text>{@sort_by_size_only=Size}</text>
<image resource="sort_empty" />
<action function="set">tw_gui_sort_order=3</action>
</object>
@@ -455,41 +460,47 @@
<template name="tabs_backup">
<object type="button" style="tab">
<placement x="0" y="%row1_y%" w="%tab3_width%" h="%tab_height%" />
- <text>BACKUP</text>
+ <text>{@tab_backup=BACKUP}</text>
<action function="page">backup</action>
</object>
<object type="button" style="tab">
<placement x="%tab3_col2_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%" />
- <text>OPTIONS</text>
+ <text>{@tab_options=OPTIONS}</text>
<action function="page">backup_options</action>
</object>
</template>
<template name="tabs_settings">
<object type="button" style="tab">
- <placement x="0" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>GENERAL</text>
+ <placement x="0" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_general=GENERAL}</text>
<action function="page">settings</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col2_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>TIME ZONE</text>
+ <placement x="%tab5_col2_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_time_zone=TIME ZONE}</text>
<action function="page">settings_timezone</action>
</object>
<object type="button" style="tab">
- <placement x="%center_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>SCREEN</text>
+ <placement x="%tab5_col3_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_screen=SCREEN}</text>
<action function="page">settings_screen</action>
</object>
<object type="button" style="tab">
- <placement x="%tab4_col4_x%" y="%row1_y%" w="%tab4_width%" h="%tab_height%" />
- <text>VIBRATION</text>
+ <placement x="%tab5_col4_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_vibration=VIBRATION}</text>
<action function="page">settings_vibration</action>
</object>
+
+ <object type="button" style="tab">
+ <placement x="%tab5_col5_x%" y="%row1_y%" w="%tab5_width%" h="%tab_height%" />
+ <text>{@tab_language=LANGUAGE}</text>
+ <action function="page">settings_language</action>
+ </object>
</template>
<template name="console">
diff --git a/gui/theme/watch_mdpi/ui.xml b/gui/theme/watch_mdpi/ui.xml
index f47dfa12c..7c7715a2c 100644
--- a/gui/theme/watch_mdpi/ui.xml
+++ b/gui/theme/watch_mdpi/ui.xml
@@ -193,14 +193,14 @@
<condition var1="tw_no_cpu_temp" var2="1" />
<font resource="font_m" />
<placement x="%indent%" y="%row1_header_y%" />
- <text>TWRP %tw_version%</text>
+ <text>{@twrp_watch_header=TWRP %tw_version%}</text>
</object>
<object type="text" color="%text_color%">
<condition var1="tw_no_cpu_temp" var2="0" />
<font resource="font_m" />
<placement x="%indent%" y="%row1_header_y%" />
- <text>CPU: %tw_cpu_temp% &#xB0;C</text>
+ <text>{@cpu_temp=CPU: %tw_cpu_temp% &#xB0;C}</text>
</object>
<object type="text" color="%text_color%">
@@ -217,7 +217,7 @@
</conditions>
<font resource="font_m" />
<placement x="%indent_right%" y="%row1_header_y%" placement="1" />
- <text>Battery: %tw_battery%</text>
+ <text>{@battery_pct=Battery: %tw_battery%}</text>
</object>
<object type="fill" color="#000000">
diff --git a/gui/twmsg.cpp b/gui/twmsg.cpp
new file mode 100644
index 000000000..00c693150
--- /dev/null
+++ b/gui/twmsg.cpp
@@ -0,0 +1,129 @@
+/*
+ Copyright 2015 _that/TeamWin
+ This file is part of TWRP/TeamWin Recovery Project.
+
+ TWRP is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ TWRP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with TWRP. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "../data.hpp"
+#include "pages.hpp"
+#include "resources.hpp"
+
+#include "twmsg.h"
+
+std::string Message::GetFormatString(const std::string& name) const
+{
+ std::string resname;
+ size_t pos = name.find('=');
+ if (pos == std::string::npos)
+ resname = name;
+ else
+ resname = name.substr(0, pos);
+
+ std::string formatstr = resourceLookup(resname);
+ bool notfound = formatstr.empty() || formatstr[0] == '['; // HACK: TODO: integrate this with resource-not-found logic
+ if (notfound && pos != std::string::npos)
+ // resource not found - use the default format string specified after "="
+ formatstr = name.substr(pos + 1);
+ return formatstr;
+}
+
+// Look up in local replacement vars first, if not found then use outer lookup object
+class LocalLookup : public StringLookup
+{
+ const std::vector<std::string>& vars;
+ const StringLookup& next;
+ public:
+ LocalLookup(const std::vector<std::string>& vars, const StringLookup& next) : vars(vars), next(next) {}
+ virtual std::string operator()(const std::string& name) const
+ {
+ if (!name.empty() && isdigit(name[0])) { // {1}..{9}
+ int i = atoi(name.c_str());
+ if (i > 0 && i <= (int)vars.size())
+ return vars[i - 1];
+ }
+ return next(name);
+ }
+};
+
+// conversion to final string
+Message::operator std::string() const
+{
+ // do resource lookup
+ std::string str = GetFormatString(name);
+
+ LocalLookup lookup(variables, varLookup);
+
+ // now insert stuff into curly braces
+
+ size_t pos = 0;
+ while ((pos = str.find('{', pos)) < std::string::npos) {
+ size_t end = str.find('}', pos);
+ if (end == std::string::npos)
+ break;
+
+ std::string varname = str.substr(pos + 1, end - pos - 1);
+ std::string vartext = lookup(varname);
+
+ str.replace(pos, end - pos + 1, vartext);
+ }
+ // TODO: complain about too many or too few numbered replacement variables
+ return str;
+}
+
+/*
+Resource manager lookup
+*/
+class ResourceLookup : public StringLookup
+{
+public:
+ virtual std::string operator()(const std::string& name) const
+ {
+ const ResourceManager* res = PageManager::GetResources();
+ if (res)
+ return res->FindString(name);
+ return name;
+ }
+};
+ResourceLookup resourceLookup;
+
+
+/*
+DataManager lookup
+*/
+class DataLookup : public StringLookup
+{
+public:
+ virtual std::string operator()(const std::string& name) const
+ {
+ std::string value;
+ if (DataManager::GetValue(name, value) == 0)
+ return value;
+ else
+ return "";
+ }
+};
+DataLookup dataLookup;
+
+
+// Utility functions to create messages. Short names to make usage convenient.
+Message Msg(const char* name)
+{
+ return Message(msg::kNormal, name, resourceLookup, dataLookup);
+}
+
+Message Msg(msg::Kind kind, const char* name)
+{
+ return Message(kind, name, resourceLookup, dataLookup);
+}
diff --git a/gui/twmsg.h b/gui/twmsg.h
new file mode 100644
index 000000000..cd035d1f5
--- /dev/null
+++ b/gui/twmsg.h
@@ -0,0 +1,97 @@
+/*
+ Copyright 2015 _that/TeamWin
+ This file is part of TWRP/TeamWin Recovery Project.
+
+ TWRP is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ TWRP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with TWRP. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef twmsg_h
+#define twmsg_h
+
+#include <cstdlib>
+#include <cstring>
+#include <string>
+#include <sstream>
+#include <vector>
+#include <errno.h>
+
+/*
+Abstract interface for something that can look up strings by name.
+*/
+class StringLookup
+{
+public:
+ virtual std::string operator()(const std::string& name) const = 0;
+ virtual ~StringLookup() {};
+};
+
+
+namespace msg
+{
+ // These get translated to colors in the GUI console
+ enum Kind
+ {
+ kNormal,
+ kHighlight,
+ kWarning,
+ kError
+ };
+
+
+ template<typename T> std::string to_string(const T& v)
+ {
+ std::ostringstream ss;
+ ss << v;
+ return ss.str();
+ }
+}
+
+
+/*
+Generic message formatting class.
+Designed to decouple message generation from actual resource string lookup and variable insertion,
+so that messages can be re-translated at any later time.
+*/
+class Message
+{
+ msg::Kind kind; // severity or similar message kind
+ std::string name; // the resource string name. may be of format "name=default value".
+ std::vector<std::string> variables; // collected insertion variables to replace {1}, {2}, ...
+ const StringLookup& resourceLookup; // object to resolve resource string name into a final format string
+ const StringLookup& varLookup; // object to resolve any non-numeric insertion strings
+
+ std::string GetFormatString(const std::string& name) const;
+
+public:
+ Message(msg::Kind kind, const char* name, const StringLookup& resourceLookup, const StringLookup& varLookup)
+ : kind(kind), name(name), resourceLookup(resourceLookup), varLookup(varLookup) {}
+
+ // Variable insertion.
+ template<typename T>
+ Message& operator()(const T& v) { variables.push_back(msg::to_string(v)); return *this; }
+
+ // conversion to final string
+ operator std::string() const;
+
+ // Get Message Kind
+ msg::Kind GetKind() {return kind;};
+};
+
+
+// Utility functions to create messages with standard resource and data manager lookups.
+// Short names to make usage convenient.
+Message Msg(const char* name);
+Message Msg(msg::Kind kind, const char* name);
+
+#endif
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index cf24cbade..ebf765441 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -40,6 +40,7 @@
#include "data.hpp"
#include "adb_install.h"
#include "fuse_sideload.h"
+#include "gui/gui.hpp"
extern "C" {
#include "twinstall.h"
#include "gui/gui.h"
@@ -51,7 +52,8 @@ extern "C" {
int OpenRecoveryScript::check_for_script_file(void) {
if (!PartitionManager.Mount_By_Path(SCRIPT_FILE_CACHE, false)) {
- LOGERR("Unable to mount /cache for OpenRecoveryScript support.\n");
+ LOGINFO("Unable to mount /cache for OpenRecoveryScript support.\n");
+ gui_msg(Msg(msg::kError, "unable_to_mount=Unable to mount {1}")(SCRIPT_FILE_CACHE));
return 0;
}
if (TWFunc::Path_Exists(SCRIPT_FILE_CACHE)) {
@@ -134,24 +136,18 @@ int OpenRecoveryScript::run_script_file(void) {
} else if (strcmp(command, "wipe") == 0) {
// Wipe
if (strcmp(value, "cache") == 0 || strcmp(value, "/cache") == 0) {
- gui_print("-- Wiping Cache Partition...\n");
PartitionManager.Wipe_By_Path("/cache");
- gui_print("-- Cache Partition Wipe Complete!\n");
} else if (strcmp(value, "dalvik") == 0 || strcmp(value, "dalvick") == 0 || strcmp(value, "dalvikcache") == 0 || strcmp(value, "dalvickcache") == 0) {
- gui_print("-- Wiping Dalvik Cache...\n");
PartitionManager.Wipe_Dalvik_Cache();
- gui_print("-- Dalvik Cache Wipe Complete!\n");
} else if (strcmp(value, "data") == 0 || strcmp(value, "/data") == 0 || strcmp(value, "factory") == 0 || strcmp(value, "factoryreset") == 0) {
- gui_print("-- Wiping Data Partition...\n");
PartitionManager.Factory_Reset();
- gui_print("-- Data Partition Wipe Complete!\n");
} else {
LOGERR("Error with wipe command value: '%s'\n", value);
ret_val = 1;
}
} else if (strcmp(command, "backup") == 0) {
// Backup
- DataManager::SetValue("tw_action_text2", "Backing Up");
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@backing}"));
tok = strtok(value, " ");
strcpy(value1, tok);
tok = strtok(NULL, " ");
@@ -168,7 +164,7 @@ int OpenRecoveryScript::run_script_file(void) {
remove_nl = 0;
strncpy(value2, tok, line_len - remove_nl);
DataManager::SetValue(TW_BACKUP_NAME, value2);
- gui_print("Backup folder set to '%s'\n", value2);
+ gui_msg(Msg("backup_folder=Backup folder set to '{1}'")(value2));
if (PartitionManager.Check_Backup_Name(true) != 0) {
ret_val = 1;
continue;
@@ -181,7 +177,7 @@ int OpenRecoveryScript::run_script_file(void) {
ret_val = Backup_Command(value1);
} else if (strcmp(command, "restore") == 0) {
// Restore
- DataManager::SetValue("tw_action_text2", "Restoring");
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@restore}"));
PartitionManager.Mount_All_Storage();
DataManager::SetValue(TW_SKIP_MD5_CHECK_VAR, 0);
char folder_path[512], partitions[512];
@@ -198,7 +194,7 @@ int OpenRecoveryScript::run_script_file(void) {
}
strcpy(folder_path, restore_folder.c_str());
LOGINFO("Restore folder is: '%s' and partitions: '%s'\n", folder_path, partitions);
- gui_print("Restoring '%s'\n", folder_path);
+ gui_msg(Msg("restoring=Restoring {1}...")(folder_path));
if (folder_path[0] != '/') {
char backup_folder[512];
@@ -225,7 +221,7 @@ int OpenRecoveryScript::run_script_file(void) {
strcat(folder_path, "/.");
}
if (!TWFunc::Path_Exists(folder_path)) {
- gui_print("Unable to locate backup '%s'\n", folder_path);
+ gui_msg(Msg(msg::kError, "locate_backup_err=Unable to locate backup '{1}'")(folder_path));
ret_val = 1;
continue;
}
@@ -241,20 +237,21 @@ int OpenRecoveryScript::run_script_file(void) {
memset(value2, 0, sizeof(value2));
strcpy(value2, partitions);
- gui_print("Setting restore options: '%s':\n", value2);
+ gui_msg(Msg("set_restore_opt=Setting restore options: '{1}':")(value2));
line_len = strlen(value2);
for (i=0; i<line_len; i++) {
if ((value2[i] == 'S' || value2[i] == 's') && Partition_List.find("/system;") != string::npos) {
Restore_List += "/system;";
- gui_print("System\n");
+ gui_msg("system=System");
} else if ((value2[i] == 'D' || value2[i] == 'd') && Partition_List.find("/data;") != string::npos) {
Restore_List += "/data;";
- gui_print("Data\n");
+ gui_msg("data=Data");
} else if ((value2[i] == 'C' || value2[i] == 'c') && Partition_List.find("/cache;") != string::npos) {
Restore_List += "/cache;";
- gui_print("Cache\n");
+ gui_msg("cache=Cache");
} else if ((value2[i] == 'R' || value2[i] == 'r') && Partition_List.find("/recovery;") != string::npos) {
- gui_print("Recovery -- Not allowed to restore recovery\n");
+ Restore_List += "/recovery;";
+ gui_msg("recovery=Recovery");
} else if (value2[i] == '1' && DataManager::GetIntValue(TW_RESTORE_SP1_VAR) > 0) {
gui_print("%s\n", "Special1 -- No Longer Supported...");
} else if (value2[i] == '2' && DataManager::GetIntValue(TW_RESTORE_SP2_VAR) > 0) {
@@ -263,16 +260,16 @@ int OpenRecoveryScript::run_script_file(void) {
gui_print("%s\n", "Special3 -- No Longer Supported...");
} else if ((value2[i] == 'B' || value2[i] == 'b') && Partition_List.find("/boot;") != string::npos) {
Restore_List += "/boot;";
- gui_print("Boot\n");
+ gui_msg("boot=Boot");
} else if ((value2[i] == 'A' || value2[i] == 'a') && Partition_List.find("/and-sec;") != string::npos) {
Restore_List += "/and-sec;";
- gui_print("Android Secure\n");
+ gui_msg("android_secure=Android Secure");
} else if ((value2[i] == 'E' || value2[i] == 'e') && Partition_List.find("/sd-ext;") != string::npos) {
Restore_List += "/sd-ext;";
- gui_print("SD-Ext\n");
+ gui_msg("sdext=SD-EXT");
} else if (value2[i] == 'M' || value2[i] == 'm') {
DataManager::SetValue(TW_SKIP_MD5_CHECK_VAR, 1);
- gui_print("MD5 check skip is on\n");
+ gui_msg("md5_check_skip=MD5 check skip is on");
}
}
@@ -281,32 +278,32 @@ int OpenRecoveryScript::run_script_file(void) {
DataManager::SetValue("tw_restore_selected", Partition_List);
}
if (is_encrypted) {
- LOGERR("Unable to use OpenRecoveryScript to restore an encrypted backup.\n");
+ gui_err("ors_encrypt_restore_err=Unable to use OpenRecoveryScript to restore an encrypted backup.");
ret_val = 1;
} else if (!PartitionManager.Run_Restore(folder_path))
ret_val = 1;
else
- gui_print("Restore complete!\n");
+ gui_msg("done=Done.");
} else if (strcmp(command, "mount") == 0) {
// Mount
- DataManager::SetValue("tw_action_text2", "Mounting");
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@mounting}"));
if (value[0] != '/') {
strcpy(mount, "/");
strcat(mount, value);
} else
strcpy(mount, value);
if (PartitionManager.Mount_By_Path(mount, true))
- gui_print("Mounted '%s'\n", mount);
+ gui_msg(Msg("mounted=Mounted '{1}'")(mount));
} else if (strcmp(command, "unmount") == 0 || strcmp(command, "umount") == 0) {
// Unmount
- DataManager::SetValue("tw_action_text2", "Unmounting");
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@unmounting}"));
if (value[0] != '/') {
strcpy(mount, "/");
strcat(mount, value);
} else
strcpy(mount, value);
if (PartitionManager.UnMount_By_Path(mount, true))
- gui_print("Unmounted '%s'\n", mount);
+ gui_msg(Msg("unmounted=Unounted '{1}'")(mount));
} else if (strcmp(command, "set") == 0) {
// Set value
size_t len = strlen(value);
@@ -314,18 +311,18 @@ int OpenRecoveryScript::run_script_file(void) {
strcpy(value1, tok);
if (len > strlen(value1) + 1) {
char *val2 = value + strlen(value1) + 1;
- gui_print("Setting '%s' to '%s'\n", value1, val2);
+ gui_msg(Msg("setting=Setting '{1}' to '{2}'")(value1)(val2));
DataManager::SetValue(value1, val2);
} else {
- gui_print("Setting '%s' to empty\n", value1);
+ gui_msg(Msg("setting_empty=Setting '{1}' to empty")(value1));
DataManager::SetValue(value1, "");
}
} else if (strcmp(command, "mkdir") == 0) {
// Make directory (recursive)
- DataManager::SetValue("tw_action_text2", "Making Directory");
- gui_print("Making directory (recursive): '%s'\n", value);
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@making_dir1}"));
+ gui_msg(Msg("making_dir2=Making directory: '{1}'")(value));
if (TWFunc::Recursive_Mkdir(value)) {
- LOGERR("Unable to create folder: '%s'\n", value);
+ gui_msg(Msg(msg::kError, "create_folder_strerr=Can not create '{1}' folder ({2}).")(value)(strerror(errno)));
ret_val = 1;
}
} else if (strcmp(command, "reboot") == 0) {
@@ -340,7 +337,7 @@ int OpenRecoveryScript::run_script_file(void) {
else
TWFunc::tw_reboot(rb_system);
} else if (strcmp(command, "cmd") == 0) {
- DataManager::SetValue("tw_action_text2", "Running Command");
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@running_command}"));
if (cindex != 0) {
TWFunc::Exec_Cmd(value);
} else {
@@ -350,18 +347,18 @@ int OpenRecoveryScript::run_script_file(void) {
gui_print("%s\n", value);
} else if (strcmp(command, "sideload") == 0) {
// ADB Sideload
- DataManager::SetValue("tw_action_text2", "ADB Sideload");
+ DataManager::SetValue("tw_action_text2", gui_parse_text("{@sideload}"));
install_cmd = -1;
int wipe_cache = 0;
string result;
pid_t sideload_child_pid;
- gui_print("Starting ADB sideload feature...\n");
+ gui_msg("start_sideload=Starting ADB sideload feature...");
ret_val = apply_from_adb("/", &sideload_child_pid);
if (ret_val != 0) {
if (ret_val == -2)
- gui_print("You need adb 1.0.32 or newer to sideload to this device.\n");
+ gui_err("need_new_adb=You need adb 1.0.32 or newer to sideload to this device.");
ret_val = 1; // failure
} else if (TWinstall_zip(FUSE_SIDELOAD_HOST_PATHNAME, &wipe_cache) == 0) {
if (wipe_cache)
@@ -381,7 +378,7 @@ int OpenRecoveryScript::run_script_file(void) {
waitpid(sideload_child_pid, &status, 0);
}
property_set("ctl.start", "adbd");
- gui_print("Sideload finished.\n");
+ gui_msg("done=Done.");
} else if (strcmp(command, "fixperms") == 0 || strcmp(command, "fixpermissions") == 0) {
ret_val = PartitionManager.Fix_Permissions();
if (ret_val != 0)
@@ -392,7 +389,7 @@ int OpenRecoveryScript::run_script_file(void) {
if (ret_val != 0)
ret_val = 1; // failure
} else {
- LOGERR("No password provided.\n");
+ gui_err("no_pwd=No password provided.");
ret_val = 1; // failure
}
} else {
@@ -401,13 +398,13 @@ int OpenRecoveryScript::run_script_file(void) {
}
}
fclose(fp);
- gui_print("Done processing script file\n");
+ gui_msg("done_ors=Done processing script file");
} else {
- LOGERR("Error opening script file '%s'\n", SCRIPT_FILE_TMP);
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(SCRIPT_FILE_TMP)(strerror(errno)));
return 1;
}
if (install_cmd && DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
- gui_print("Injecting TWRP into boot image...\n");
+ gui_msg("injecttwrp=Injecting TWRP into boot image...");
TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
if (Boot == NULL || Boot->Current_File_System != "emmc")
TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
@@ -415,7 +412,7 @@ int OpenRecoveryScript::run_script_file(void) {
string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
TWFunc::Exec_Cmd(injectcmd.c_str());
}
- gui_print("TWRP injection complete.\n");
+ gui_msg("done=Done.");
}
if (sideload)
ret_val = 1; // Forces booting to the home page after sideload
@@ -447,10 +444,12 @@ int OpenRecoveryScript::Install_Command(string Zip) {
// This is a special file that contains a map of blocks on the data partition
Full_Path = Zip.substr(1);
if (!PartitionManager.Mount_By_Path(Full_Path, true) || !TWFunc::Path_Exists(Full_Path)) {
- gui_print("Unable to install via mapped zip '%s'\n", Full_Path.c_str());
+ LOGINFO("Unable to install via mapped zip '%s'\n", Full_Path.c_str());
+ gui_msg(Msg(msg::kError, "zip_err=Error installing zip file '{1}'")(Zip));
return 1;
}
- gui_print("Installing mapped zip file '%s'\n", Full_Path.c_str());
+ LOGINFO("Installing mapped zip file '%s'\n", Full_Path.c_str());
+ gui_msg(Msg("installing_zip=Installing zip file '{1}'")(Zip));
} else if (!TWFunc::Path_Exists(Zip)) {
PartitionManager.Mount_All_Storage();
PartitionManager.Get_Partition_List("storage", &Storage_List);
@@ -476,12 +475,12 @@ int OpenRecoveryScript::Install_Command(string Zip) {
gui_print("Unable to locate zip file '%s'.\n", Zip.c_str());
ret_val = 1;
} else
- gui_print("Installing zip file '%s'\n", Zip.c_str());
+ gui_msg(Msg("installing_zip=Installing zip file '{1}'")(Zip));
}
ret_val = TWinstall_zip(Zip.c_str(), &wipe_cache);
if (ret_val != 0) {
- LOGERR("Error installing zip file '%s'\n", Zip.c_str());
+ gui_msg(Msg(msg::kError, "zip_err=Error installing zip file '{1}'")(Zip));
ret_val = 1;
} else if (wipe_cache)
PartitionManager.Wipe_By_Path("/cache");
@@ -523,21 +522,21 @@ int OpenRecoveryScript::Backup_Command(string Options) {
DataManager::SetValue(TW_USE_COMPRESSION_VAR, 0);
DataManager::SetValue(TW_SKIP_MD5_GENERATE_VAR, 0);
- gui_print("Setting backup options:\n");
+ gui_msg("select_backup_opt=Setting backup options:");
line_len = Options.size();
for (i=0; i<line_len; i++) {
if (Options.substr(i, 1) == "S" || Options.substr(i, 1) == "s") {
Backup_List += "/system;";
- gui_print("System\n");
+ gui_msg("system=System");
} else if (Options.substr(i, 1) == "D" || Options.substr(i, 1) == "d") {
Backup_List += "/data;";
- gui_print("Data\n");
+ gui_msg("data=Data");
} else if (Options.substr(i, 1) == "C" || Options.substr(i, 1) == "c") {
Backup_List += "/cache;";
- gui_print("Cache\n");
+ gui_msg("cache=Cache");
} else if (Options.substr(i, 1) == "R" || Options.substr(i, 1) == "r") {
Backup_List += "/recovery;";
- gui_print("Recovery\n");
+ gui_msg("recovery=Recovery");
} else if (Options.substr(i, 1) == "1") {
gui_print("%s\n", "Special1 -- No Longer Supported...");
} else if (Options.substr(i, 1) == "2") {
@@ -546,27 +545,27 @@ int OpenRecoveryScript::Backup_Command(string Options) {
gui_print("%s\n", "Special3 -- No Longer Supported...");
} else if (Options.substr(i, 1) == "B" || Options.substr(i, 1) == "b") {
Backup_List += "/boot;";
- gui_print("Boot\n");
+ gui_msg("boot=Boot");
} else if (Options.substr(i, 1) == "A" || Options.substr(i, 1) == "a") {
Backup_List += "/and-sec;";
- gui_print("Android Secure\n");
+ gui_msg("android_secure=Android Secure");
} else if (Options.substr(i, 1) == "E" || Options.substr(i, 1) == "e") {
Backup_List += "/sd-ext;";
- gui_print("SD-Ext\n");
+ gui_msg("sdext=SD-EXT");
} else if (Options.substr(i, 1) == "O" || Options.substr(i, 1) == "o") {
DataManager::SetValue(TW_USE_COMPRESSION_VAR, 1);
- gui_print("Compression is on\n");
+ gui_msg("compression_on=Compression is on");
} else if (Options.substr(i, 1) == "M" || Options.substr(i, 1) == "m") {
DataManager::SetValue(TW_SKIP_MD5_GENERATE_VAR, 1);
- gui_print("MD5 Generation is off\n");
+ gui_msg("md5_off=MD5 Generation is off");
}
}
DataManager::SetValue("tw_backup_list", Backup_List);
if (!PartitionManager.Run_Backup()) {
- LOGERR("Backup failed!\n");
+ gui_err("backup_fail=Backup Failed");
return 1;
}
- gui_print("Backup complete!\n");
+ gui_msg("backup_complete=Backup complete!");
return 0;
}
@@ -577,11 +576,11 @@ void OpenRecoveryScript::Run_OpenRecoveryScript(void) {
DataManager::SetValue("tw_action2", "");
DataManager::SetValue("tw_action2_param", "");
#ifdef TW_OEM_BUILD
- DataManager::SetValue("tw_action_text1", "Running Recovery Commands");
- DataManager::SetValue("tw_complete_text1", "Recovery Commands Complete");
+ DataManager::SetValue("tw_action_text1", gui_lookup("running_recovery_commands", "Running Recovery Commands"));
+ DataManager::SetValue("tw_complete_text1", gui_lookup("recovery_commands_complete", "Recovery Commands Complete"));
#else
- DataManager::SetValue("tw_action_text1", "Running OpenRecoveryScript");
- DataManager::SetValue("tw_complete_text1", "OpenRecoveryScript Complete");
+ DataManager::SetValue("tw_action_text1", gui_lookup("running_ors", "Running OpenRecoveryScript"));
+ DataManager::SetValue("tw_complete_text1", gui_lookup("ors_complete", "OpenRecoveryScript Complete"));
#endif
DataManager::SetValue("tw_action_text2", "");
DataManager::SetValue("tw_has_cancel", 0);
diff --git a/partition.cpp b/partition.cpp
index f6adec9da..df408e6b7 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -43,6 +43,7 @@
#include "fixPermissions.hpp"
#include "infomanager.hpp"
#include "set_metadata.h"
+#include "gui/gui.hpp"
extern "C" {
#include "mtdutils/mtdutils.h"
#include "mtdutils/mounts.h"
@@ -299,7 +300,7 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) {
DataManager::SetValue(TW_CRYPTO_PASSWORD, "");
DataManager::SetValue("tw_crypto_display", "");
} else {
- LOGERR("Could not mount /data and unable to find crypto footer.\n");
+ gui_err("mount_data_footer=Could not mount /data and unable to find crypto footer.");
}
} else {
LOGERR("Primary block device '%s' for mount point '%s' is not present!\n", Primary_Block_Device.c_str(), Mount_Point.c_str());
@@ -642,7 +643,7 @@ bool TWPartition::Make_Dir(string Path, bool Display_Error) {
if (!TWFunc::Path_Exists(Path)) {
if (mkdir(Path.c_str(), 0777) == -1) {
if (Display_Error)
- LOGERR("Can not create '%s' folder.\n", Path.c_str());
+ gui_msg(Msg(msg::kError, "create_folder_strerr=Can not create '{1}' folder ({2}).")(Path)(strerror(errno)));
else
LOGINFO("Can not create '%s' folder.\n", Path.c_str());
return false;
@@ -1011,7 +1012,7 @@ bool TWPartition::Mount(bool Display_Error) {
if (mount(Actual_Block_Device.c_str(), Mount_Point.c_str(), Fstab_File_System.c_str(), flags, NULL) < 0) {
if (mount(Actual_Block_Device.c_str(), Mount_Point.c_str(), Fstab_File_System.c_str(), flags | MS_RDONLY, NULL) < 0) {
if (Display_Error)
- LOGERR("Failed to mount '%s' (MTD)\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "fail_mount=Failed to mount '{1}' ({2})")(Mount_Point)(strerror(errno)));
else
LOGINFO("Failed to mount '%s' (MTD)\n", Mount_Point.c_str());
return false;
@@ -1024,7 +1025,7 @@ bool TWPartition::Mount(bool Display_Error) {
string test_path = Mount_Point;
if (stat(test_path.c_str(), &st) < 0) {
if (Display_Error)
- LOGERR("Failed to mount '%s' (MTD)\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "fail_mount=Failed to mount '{1}' ({2})")(Mount_Point)(strerror(errno)));
else
LOGINFO("Failed to mount '%s' (MTD)\n", Mount_Point.c_str());
return false;
@@ -1056,7 +1057,7 @@ bool TWPartition::Mount(bool Display_Error) {
LOGINFO("Mounting exfat failed, trying vfat...\n");
if (mount(Actual_Block_Device.c_str(), Mount_Point.c_str(), "vfat", 0, NULL) != 0) {
if (Display_Error)
- LOGERR("Unable to mount '%s'\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "fail_mount=Failed to mount '{1}' ({2})")(Mount_Point)(strerror(errno)));
else
LOGINFO("Unable to mount '%s'\n", Mount_Point.c_str());
LOGINFO("Actual block device: '%s', current file system: '%s', flags: 0x%8x, options: '%s'\n", Actual_Block_Device.c_str(), Current_File_System.c_str(), flags, Mount_Options.c_str());
@@ -1065,7 +1066,7 @@ bool TWPartition::Mount(bool Display_Error) {
} else {
#endif
if (!Removable && Display_Error)
- LOGERR("Unable to mount '%s'\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "fail_mount=Failed to mount '{1}' ({2})")(Mount_Point)(strerror(errno)));
else
LOGINFO("Unable to mount '%s'\n", Mount_Point.c_str());
LOGINFO("Actual block device: '%s', current file system: '%s'\n", Actual_Block_Device.c_str(), Current_File_System.c_str());
@@ -1102,7 +1103,7 @@ bool TWPartition::UnMount(bool Display_Error) {
umount(Mount_Point.c_str());
if (Is_Mounted()) {
if (Display_Error)
- LOGERR("Unable to unmount '%s'\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "fail_unmount=Failed to unmount '{1}' ({2})")(Mount_Point)(strerror(errno)));
else
LOGINFO("Unable to unmount '%s'\n", Mount_Point.c_str());
return false;
@@ -1120,7 +1121,7 @@ bool TWPartition::Wipe(string New_File_System) {
string Layout_Filename = Mount_Point + "/.layout_version";
if (!Can_Be_Wiped) {
- LOGERR("Partition '%s' cannot be wiped.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "cannot_wipe=Partition {1} cannot be wiped.\n")(Display_Name));
return false;
}
@@ -1207,7 +1208,7 @@ bool TWPartition::Wipe_AndSec(void) {
if (!Mount(true))
return false;
- gui_print("Wiping %s\n", Backup_Display_Name.c_str());
+ gui_msg(Msg("wiping=Wiping {1}")(Backup_Display_Name));
TWFunc::removeDir(Mount_Point + "/.android_secure/", true);
return true;
}
@@ -1233,96 +1234,96 @@ bool TWPartition::Repair() {
if (Current_File_System == "vfat") {
if (!TWFunc::Path_Exists("/sbin/fsck.fat")) {
- gui_print("fsck.fat does not exist! Cannot repair!\n");
+ gui_msg(Msg(msg::kError, "repair_not_exist={1} does not exist! Cannot repair!")("fsck.fat"));
return false;
}
if (!UnMount(true))
return false;
- gui_print("Repairing %s using fsck.fat...\n", Display_Name.c_str());
+ gui_msg(Msg("reparing=Repairing {1} using {2}...")(Display_Name)("fsck.fat"));
Find_Actual_Block_Device();
command = "/sbin/fsck.fat -y " + Actual_Block_Device;
LOGINFO("Repair command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_repair=Unable to repair {1}.")(Display_Name));
return false;
}
}
if (Current_File_System == "ext2" || Current_File_System == "ext3" || Current_File_System == "ext4") {
if (!TWFunc::Path_Exists("/sbin/e2fsck")) {
- gui_print("e2fsck does not exist! Cannot repair!\n");
+ gui_msg(Msg(msg::kError, "repair_not_exist={1} does not exist! Cannot repair!")("e2fsck"));
return false;
}
if (!UnMount(true))
return false;
- gui_print("Repairing %s using e2fsck...\n", Display_Name.c_str());
+ gui_msg(Msg("reparing=Repairing {1} using {2}...")(Display_Name)("e2fsck"));
Find_Actual_Block_Device();
command = "/sbin/e2fsck -fp " + Actual_Block_Device;
LOGINFO("Repair command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_repair=Unable to repair {1}.")(Display_Name));
return false;
}
}
if (Current_File_System == "exfat") {
if (!TWFunc::Path_Exists("/sbin/fsck.exfat")) {
- gui_print("fsck.exfat does not exist! Cannot repair!\n");
+ gui_msg(Msg(msg::kError, "repair_not_exist={1} does not exist! Cannot repair!")("fsck.exfat"));
return false;
}
if (!UnMount(true))
return false;
- gui_print("Repairing %s using fsck.exfat...\n", Display_Name.c_str());
+ gui_msg(Msg("reparing=Repairing {1} using {2}...")(Display_Name)("fsck.exfat"));
Find_Actual_Block_Device();
command = "/sbin/fsck.exfat " + Actual_Block_Device;
LOGINFO("Repair command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_repair=Unable to repair {1}.")(Display_Name));
return false;
}
}
if (Current_File_System == "f2fs") {
if (!TWFunc::Path_Exists("/sbin/fsck.f2fs")) {
- gui_print("fsck.f2fs does not exist! Cannot repair!\n");
+ gui_msg(Msg(msg::kError, "repair_not_exist={1} does not exist! Cannot repair!")("fsck.f2fs"));
return false;
}
if (!UnMount(true))
return false;
- gui_print("Repairing %s using fsck.f2fs...\n", Display_Name.c_str());
+ gui_msg(Msg("reparing=Repairing {1} using {2}...")(Display_Name)("fsck.f2fs"));
Find_Actual_Block_Device();
command = "/sbin/fsck.f2fs " + Actual_Block_Device;
LOGINFO("Repair command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_repair=Unable to repair {1}.")(Display_Name));
return false;
}
}
if (Current_File_System == "ntfs") {
if (!TWFunc::Path_Exists("/sbin/ntfsfix")) {
- gui_print("ntfsfix does not exist! Cannot repair!\n");
+ gui_msg(Msg(msg::kError, "repair_not_exist={1} does not exist! Cannot repair!")("ntfsfix"));
return false;
}
if (!UnMount(true))
return false;
- gui_print("Repairing %s using ntfsfix...\n", Display_Name.c_str());
+ gui_msg(Msg("reparing=Repairing {1} using {2}...")(Display_Name)("ntfsfix"));
Find_Actual_Block_Device();
command = "/sbin/ntfsfix " + Actual_Block_Device;
LOGINFO("Repair command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_repair=Unable to repair {1}.")(Display_Name));
return false;
}
}
@@ -1342,18 +1343,20 @@ bool TWPartition::Resize() {
if (Current_File_System == "ext2" || Current_File_System == "ext3" || Current_File_System == "ext4") {
if (!Can_Repair()) {
- LOGERR("Cannot resize %s because %s cannot be repaired before resizing.\n", Display_Name.c_str(), Display_Name.c_str());
+ LOGINFO("Cannot resize %s because %s cannot be repaired before resizing.\n", Display_Name.c_str(), Display_Name.c_str());
+ gui_msg(Msg(msg::kError, "cannot_resize=Cannot resize {1}.")(Display_Name));
return false;
}
if (!TWFunc::Path_Exists("/sbin/resize2fs")) {
- gui_print("resize2fs does not exist! Cannot resize!\n");
+ LOGINFO("resize2fs does not exist! Cannot resize!\n");
+ gui_msg(Msg(msg::kError, "cannot_resize=Cannot resize {1}.")(Display_Name));
return false;
}
// Repair will unmount so no need to do it twice
- gui_print("Repairing %s before resizing.\n", Display_Name.c_str());
+ gui_msg(Msg("repair_resize=Repairing {1} before resizing.")( Display_Name));
if (!Repair())
return false;
- gui_print("Resizing %s using resize2fs...\n", Display_Name.c_str());
+ gui_msg(Msg("resizing=Resizing {1} using {2}...")(Display_Name)("resize2fs"));
Find_Actual_Block_Device();
command = "/sbin/resize2fs " + Actual_Block_Device;
if (Length != 0) {
@@ -1362,13 +1365,14 @@ bool TWPartition::Resize() {
fd = open(Actual_Block_Device.c_str(), O_RDONLY);
if (fd < 0) {
- LOGERR("Resize: Failed to open '%s'\n", Actual_Block_Device.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Actual_Block_Device)(strerror(errno)));
return false;
}
ret = ioctl(fd, BLKGETSIZE, &block_device_size);
close(fd);
if (ret) {
- LOGERR("Resize: ioctl error\n");
+ gui_msg(Msg(msg::kError, "unable_resize=Unable to resize {1}.")(Display_Name));
+ LOGINFO("Resize: ioctl error\n");
return false;
}
unsigned long long Actual_Size = (unsigned long long)(block_device_size) * 512LLU;
@@ -1389,11 +1393,11 @@ bool TWPartition::Resize() {
LOGINFO("Resize command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
Update_Size(true);
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
Update_Size(true);
- LOGERR("Unable to resize '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_resize=Unable to resize {1}.")(Display_Name));
return false;
}
}
@@ -1429,14 +1433,13 @@ bool TWPartition::Check_MD5(string restore_folder) {
md5file = split_filename;
md5file += ".md5";
if (!TWFunc::Path_Exists(md5file)) {
- LOGERR("No md5 file found for '%s'.\n", split_filename);
- LOGERR("Please unselect Enable MD5 verification to restore.\n");
+ gui_msg(Msg(msg::kError, "no_md5_found=No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.")(split_filename));
return false;
}
md5sum.setfn(split_filename);
while (index < 1000) {
if (TWFunc::Path_Exists(split_filename) && md5sum.verify_md5digest() != 0) {
- LOGERR("MD5 failed to match on '%s'.\n", split_filename);
+ gui_msg(Msg(msg::kError, "md5_fail_match=MD5 failed to match on '{1}'.")(split_filename));
return false;
}
index++;
@@ -1448,13 +1451,12 @@ bool TWPartition::Check_MD5(string restore_folder) {
// Single file archive
md5file = Full_Filename + ".md5";
if (!TWFunc::Path_Exists(md5file)) {
- LOGERR("No md5 file found for '%s'.\n", Full_Filename.c_str());
- LOGERR("Please unselect Enable MD5 verification to restore.\n");
+ gui_msg(Msg(msg::kError, "no_md5_found=No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.")(split_filename));
return false;
}
md5sum.setfn(Full_Filename);
if (md5sum.verify_md5digest() != 0) {
- LOGERR("MD5 failed to match on '%s'.\n", Full_Filename.c_str());
+ gui_msg(Msg(msg::kError, "md5_fail_match=MD5 failed to match on '{1}'.")(split_filename));
return false;
} else
return true;
@@ -1465,7 +1467,7 @@ bool TWPartition::Check_MD5(string restore_folder) {
bool TWPartition::Restore(string restore_folder, const unsigned long long *total_restore_size, unsigned long long *already_restored_size) {
string Restore_File_System;
- TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Display_Name, "Restoring");
+ TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Display_Name, gui_parse_text("{@restoring}"));
LOGINFO("Restore filename is: %s\n", Backup_FileName.c_str());
Restore_File_System = Get_Restore_File_System(restore_folder);
@@ -1591,12 +1593,12 @@ bool TWPartition::Wipe_Encryption() {
}
DataManager::SetValue(TW_IS_ENCRYPTED, 0);
#ifndef TW_OEM_BUILD
- gui_print("You may need to reboot recovery to be able to use /data again.\n");
+ gui_msg("format_data_msg=You may need to reboot recovery to be able to use /data again.");
#endif
return true;
} else {
Has_Data_Media = Save_Data_Media;
- LOGERR("Unable to format to remove encryption.\n");
+ gui_err("format_data_err=Unable to format to remove encryption.");
if (Has_Data_Media && Mount(false))
PartitionManager.Add_MTP_Storage(MTP_Storage_ID);
return false;
@@ -1639,17 +1641,17 @@ bool TWPartition::Wipe_EXT23(string File_System) {
if (TWFunc::Path_Exists("/sbin/mke2fs")) {
string command;
- gui_print("Formatting %s using mke2fs...\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("mke2fs"));
Find_Actual_Block_Device();
command = "mke2fs -t " + File_System + " -m 0 " + Actual_Block_Device;
LOGINFO("mke2fs command: %s\n", command.c_str());
if (TWFunc::Exec_Cmd(command) == 0) {
Current_File_System = File_System;
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to wipe '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
} else
@@ -1661,7 +1663,8 @@ bool TWPartition::Wipe_EXT23(string File_System) {
bool TWPartition::Wipe_EXT4() {
Find_Actual_Block_Device();
if (!Is_Present) {
- LOGERR("Block device not present, cannot wipe %s.\n", Display_Name.c_str());
+ LOGINFO("Block device not present, cannot wipe %s.\n", Display_Name.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
if (!UnMount(true))
@@ -1671,7 +1674,7 @@ bool TWPartition::Wipe_EXT4() {
int ret;
char *secontext = NULL;
- gui_print("Formatting %s using make_ext4fs function.\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("make_ext4fs"));
if (!selinux_handle || selabel_lookup(selinux_handle, &secontext, Mount_Point.c_str(), S_IFDIR) < 0) {
LOGINFO("Cannot lookup security context for '%s'\n", Mount_Point.c_str());
@@ -1680,7 +1683,7 @@ bool TWPartition::Wipe_EXT4() {
ret = make_ext4fs(Actual_Block_Device.c_str(), Length, Mount_Point.c_str(), selinux_handle);
}
if (ret != 0) {
- LOGERR("Unable to wipe '%s' using function call.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
} else {
string sedir = Mount_Point + "/lost+found";
@@ -1693,7 +1696,7 @@ bool TWPartition::Wipe_EXT4() {
if (TWFunc::Path_Exists("/sbin/make_ext4fs")) {
string Command;
- gui_print("Formatting %s using make_ext4fs...\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("make_ext4fs"));
Find_Actual_Block_Device();
Command = "make_ext4fs";
if (!Is_Decrypted && Length != 0) {
@@ -1711,10 +1714,10 @@ bool TWPartition::Wipe_EXT4() {
if (TWFunc::Exec_Cmd(Command) == 0) {
Current_File_System = "ext4";
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to wipe '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
} else
@@ -1730,16 +1733,16 @@ bool TWPartition::Wipe_FAT() {
if (!UnMount(true))
return false;
- gui_print("Formatting %s using mkfs.fat...\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("mkfs.fat"));
Find_Actual_Block_Device();
command = "mkfs.fat " + Actual_Block_Device;
if (TWFunc::Exec_Cmd(command) == 0) {
Current_File_System = "vfat";
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to wipe '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
return true;
@@ -1757,15 +1760,15 @@ bool TWPartition::Wipe_EXFAT() {
if (!UnMount(true))
return false;
- gui_print("Formatting %s using mkexfatfs...\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("mkexfatfs"));
Find_Actual_Block_Device();
command = "mkexfatfs " + Actual_Block_Device;
if (TWFunc::Exec_Cmd(command) == 0) {
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to wipe '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
return true;
@@ -1777,7 +1780,7 @@ bool TWPartition::Wipe_MTD() {
if (!UnMount(true))
return false;
- gui_print("MTD Formatting \"%s\"\n", MTD_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("MTD"));
mtd_scan_partitions();
const MtdPartition* mtd = mtd_find_partition_by_name(MTD_Name.c_str());
@@ -1802,7 +1805,7 @@ bool TWPartition::Wipe_MTD() {
}
Current_File_System = "yaffs2";
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
}
@@ -1815,7 +1818,7 @@ bool TWPartition::Wipe_RMRF() {
if (Is_Storage)
PartitionManager.Remove_MTP_Storage(MTP_Storage_ID);
- gui_print("Removing all files under '%s'\n", Mount_Point.c_str());
+ gui_msg(Msg("remove_all=Removing all files under '{1}'")(Mount_Point));
TWFunc::removeDir(Mount_Point, true);
Recreate_AndSec_Folder();
return true;
@@ -1828,7 +1831,7 @@ bool TWPartition::Wipe_F2FS() {
if (!UnMount(true))
return false;
- gui_print("Formatting %s using mkfs.f2fs...\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("mkfs.f2fs"));
Find_Actual_Block_Device();
command = "mkfs.f2fs -t 1";
if (!Is_Decrypted && Length != 0) {
@@ -1844,15 +1847,15 @@ bool TWPartition::Wipe_F2FS() {
command += " " + Actual_Block_Device;
if (TWFunc::Exec_Cmd(command) == 0) {
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to wipe '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
return true;
} else {
- gui_print("mkfs.f2fs binary not found, using rm -rf to wipe.\n");
+ LOGINFO("mkfs.f2fs binary not found, using rm -rf to wipe.\n");
return Wipe_RMRF();
}
return false;
@@ -1865,15 +1868,15 @@ bool TWPartition::Wipe_NTFS() {
if (!UnMount(true))
return false;
- gui_print("Formatting %s using mkntfs...\n", Display_Name.c_str());
+ gui_msg(Msg("formating_using=Formatting {1} using {2}...")(Display_Name)("mkntfs"));
Find_Actual_Block_Device();
command = "mkntfs " + Actual_Block_Device;
if (TWFunc::Exec_Cmd(command) == 0) {
Recreate_AndSec_Folder();
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
} else {
- LOGERR("Unable to wipe '%s'.\n", Mount_Point.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_wipe=Unable to wipe {1}.")(Display_Name));
return false;
}
return true;
@@ -1892,7 +1895,7 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media() {
if (!Mount(true))
return false;
- gui_print("Wiping data without wiping /data/media ...\n");
+ gui_msg("wiping_data=Wiping data without wiping /data/media ...");
DIR* d;
d = opendir("/data");
@@ -1917,10 +1920,10 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media() {
}
closedir(d);
- gui_print("Done.\n");
+ gui_msg("done=Done.");
return true;
}
- gui_print("Dirent failed to open /data, error!\n");
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Mount_Point)(strerror(errno)));
return false;
#endif // ifdef TW_OEM_BUILD
}
@@ -1938,7 +1941,7 @@ bool TWPartition::Backup_Tar(string backup_folder, const unsigned long long *ove
return false;
TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Backup_Display_Name, "Backing Up");
- gui_print("Backing up %s...\n", Backup_Display_Name.c_str());
+ gui_msg(Msg("backing_up=Backing up {1}...")(Backup_Display_Name));
DataManager::GetValue(TW_USE_COMPRESSION_VAR, use_compression);
tar.use_compression = use_compression;
@@ -1989,8 +1992,8 @@ bool TWPartition::Backup_DD(string backup_folder) {
sprintf(block_size, "%llu", DD_Block_Size);
DD_BS = block_size;
- TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, "Backing Up");
- gui_print("Backing up %s...\n", Display_Name.c_str());
+ TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, gui_parse_text("{@backing}"));
+ gui_msg(Msg("backing_up=Backing up {1}...")(Backup_Display_Name));
sprintf(back_name, "%s.%s.win", Backup_Name.c_str(), Current_File_System.c_str());
Backup_FileName = back_name;
@@ -2002,7 +2005,7 @@ bool TWPartition::Backup_DD(string backup_folder) {
TWFunc::Exec_Cmd(Command);
tw_set_default_metadata(Full_FileName.c_str());
if (TWFunc::Get_File_Size(Full_FileName) == 0) {
- LOGERR("Backup file size for '%s' is 0 bytes.\n", Full_FileName.c_str());
+ gui_msg(Msg(msg::kError, "backup_size=Backup file size for '{1}' is 0 bytes.")(Full_FileName));
return false;
}
return true;
@@ -2013,8 +2016,8 @@ bool TWPartition::Backup_Dump_Image(string backup_folder) {
string Full_FileName, Command;
int use_compression;
- TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, "Backing Up");
- gui_print("Backing up %s...\n", Display_Name.c_str());
+ TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, gui_parse_text("{@backing}"));
+ gui_msg(Msg("backing_up=Backing up {1}...")(Backup_Display_Name));
sprintf(back_name, "%s.%s.win", Backup_Name.c_str(), Current_File_System.c_str());
Backup_FileName = back_name;
@@ -2027,7 +2030,7 @@ bool TWPartition::Backup_Dump_Image(string backup_folder) {
tw_set_default_metadata(Full_FileName.c_str());
if (TWFunc::Get_File_Size(Full_FileName) == 0) {
// Actual size may not match backup size due to bad blocks on MTD devices so just check for 0 bytes
- LOGERR("Backup file size for '%s' is 0 bytes.\n", Full_FileName.c_str());
+ gui_msg(Msg(msg::kError, "backup_size=Backup file size for '%s' is 0 bytes.")(Full_FileName));
return false;
}
return true;
@@ -2076,10 +2079,9 @@ bool TWPartition::Restore_Tar(string restore_folder, string Restore_File_System,
if (!Wipe_AndSec())
return false;
} else {
- gui_print("Wiping %s...\n", Display_Name.c_str());
+ gui_msg(Msg("wiping=Wiping {1}")(Backup_Display_Name));
if (Has_Data_Media && Mount_Point == "/data" && Restore_File_System != Current_File_System) {
- gui_print("WARNING: This /data backup was made with %s file system!\n", Restore_File_System.c_str());
- gui_print("The backup may not boot unless you change back to %s.\n", Restore_File_System.c_str());
+ gui_msg(Msg(msg::kWarning, "datamedia_fs_restore=WARNING: This /data backup was made with {1} file system! The backup may not boot unless you change back to {1}.")(Restore_File_System));
if (!Wipe_Data_Without_Wiping_Media())
return false;
} else {
@@ -2087,8 +2089,8 @@ bool TWPartition::Restore_Tar(string restore_folder, string Restore_File_System,
return false;
}
}
- TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Backup_Display_Name, "Restoring");
- gui_print("Restoring %s...\n", Backup_Display_Name.c_str());
+ TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Backup_Display_Name, gui_parse_text("{@restore}"));
+ gui_msg(Msg("restoring=Restoring {1}...")(Backup_Display_Name));
if (!Mount(true))
return false;
@@ -2135,7 +2137,8 @@ bool TWPartition::Restore_Image(string restore_folder, const unsigned long long
double display_percent, progress_percent;
char size_progress[1024];
- TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Display_Name, "Restoring");
+ TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Backup_Display_Name, gui_parse_text("{@restore}"));
+ gui_msg(Msg("restoring=Restoring {1}...")(Backup_Display_Name));
Full_FileName = restore_folder + "/" + Backup_FileName;
if (Restore_File_System == "emmc") {
@@ -2226,7 +2229,7 @@ void TWPartition::Recreate_Media_Folder(void) {
string Command;
if (!Mount(true)) {
- LOGERR("Unable to recreate /data/media folder.\n");
+ gui_msg(Msg(msg::kError, "recreate_folder_err=Unable to recreate {1} folder.")("/data/media"));
} else if (!TWFunc::Path_Exists("/data/media")) {
PartitionManager.Mount_By_Path(Symlink_Mount_Point, true);
LOGINFO("Recreating /data/media folder.\n");
@@ -2258,7 +2261,7 @@ void TWPartition::Recreate_AndSec_Folder(void) {
return;
LOGINFO("Creating %s: %s\n", Backup_Display_Name.c_str(), Symlink_Path.c_str());
if (!Mount(true)) {
- LOGERR("Unable to recreate %s folder.\n", Backup_Name.c_str());
+ gui_msg(Msg(msg::kError, "recreate_folder_err=Unable to recreate {1} folder.")(Backup_Name));
} else if (!TWFunc::Path_Exists(Symlink_Path)) {
LOGINFO("Recreating %s folder.\n", Backup_Name.c_str());
PartitionManager.Mount_By_Path(Symlink_Mount_Point, true);
@@ -2308,8 +2311,9 @@ bool TWPartition::Flash_Image(string Filename) {
}
unsigned long long image_size = TWFunc::Get_File_Size(Filename);
if (image_size > Size) {
- LOGERR("Size (%llu bytes) of image '%s' is larger than target device '%s' (%llu bytes)\n",
+ LOGINFO("Size (%llu bytes) of image '%s' is larger than target device '%s' (%llu bytes)\n",
image_size, Filename.c_str(), Actual_Block_Device.c_str(), Size);
+ gui_err("img_size_err=Size of image is larger than target device");
return false;
}
if (Backup_Method == DD)
@@ -2325,7 +2329,7 @@ bool TWPartition::Flash_Image(string Filename) {
bool TWPartition::Flash_Image_DD(string Filename) {
string Command;
- gui_print("Flashing %s...\n", Display_Name.c_str());
+ gui_msg(Msg("flashing=Flashing {1}...")(Display_Name));
Command = "dd bs=8388608 if='" + Filename + "' of=" + Actual_Block_Device;
LOGINFO("Flash command: '%s'\n", Command.c_str());
TWFunc::Exec_Cmd(Command);
@@ -2335,7 +2339,7 @@ bool TWPartition::Flash_Image_DD(string Filename) {
bool TWPartition::Flash_Image_FI(string Filename) {
string Command;
- gui_print("Flashing %s...\n", Display_Name.c_str());
+ gui_msg(Msg("flashing=Flashing {1}...")(Display_Name));
// Sometimes flash image doesn't like to flash due to the first 2KB matching, so we erase first to ensure that it flashes
Command = "erase_image " + MTD_Name;
LOGINFO("Erase command: '%s'\n", Command.c_str());
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 945a96cc2..cd2cde7fe 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -40,6 +40,7 @@
#include "twrpDU.hpp"
#include "set_metadata.h"
#include "tw_atomic.hpp"
+#include "gui/gui.hpp"
#ifdef TW_HAS_MTP
#include "mtp/mtp_MtpServer.hpp"
@@ -49,6 +50,7 @@
extern "C" {
#include "cutils/properties.h"
+ #include "gui/gui.h"
}
#ifdef TW_INCLUDE_CRYPTO
@@ -154,11 +156,10 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
if (password_type == CRYPT_TYPE_DEFAULT) {
LOGINFO("Device is encrypted with the default password, attempting to decrypt.\n");
if (Decrypt_Device("default_password") == 0) {
- gui_print("Successfully decrypted with default password.\n");
+ gui_msg("decrypt_success=Successfully decrypted with default password.");
DataManager::SetValue(TW_IS_ENCRYPTED, 0);
} else {
- LOGERR("Unable to decrypt with default password.");
- LOGERR("You may need to perform a Format Data.\n");
+ gui_err("unable_to_decrypt=Unable to decrypt with default password.");
}
} else {
DataManager::SetValue("TW_CRYPTO_TYPE", password_type);
@@ -342,7 +343,7 @@ int TWPartitionManager::Mount_By_Path(string Path, bool Display_Error) {
if (found) {
return ret;
} else if (Display_Error) {
- LOGERR("Mount: Unable to find partition for path '%s'\n", Local_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Local_Path));
} else {
LOGINFO("Mount: Unable to find partition for path '%s'\n", Local_Path.c_str());
}
@@ -367,7 +368,7 @@ int TWPartitionManager::UnMount_By_Path(string Path, bool Display_Error) {
if (found) {
return ret;
} else if (Display_Error) {
- LOGERR("UnMount: Unable to find partition for path '%s'\n", Local_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Local_Path));
} else {
LOGINFO("UnMount: Unable to find partition for path '%s'\n", Local_Path.c_str());
}
@@ -425,7 +426,7 @@ int TWPartitionManager::Check_Backup_Name(bool Display_Error) {
// Check size
if (copy_size > MAX_BACKUP_NAME_LEN) {
if (Display_Error)
- LOGERR("Backup name is too long.\n");
+ gui_err("backup_name_len=Backup name is too long.");
return -2;
}
@@ -444,7 +445,7 @@ int TWPartitionManager::Check_Backup_Name(bool Display_Error) {
// and -_.{}[]
} else {
if (Display_Error)
- LOGERR("Backup name '%s' contains invalid character: '%c'\n", backup_name, (char)cur_char);
+ gui_msg(Msg(msg::kError, "backup_name_invalid=Backup name '{1}' contains invalid character: '{1}'")(backup_name)((char)cur_char));
return -3;
}
}
@@ -455,7 +456,7 @@ int TWPartitionManager::Check_Backup_Name(bool Display_Error) {
sprintf(tw_image_dir,"%s/%s", backup_loc, Backup_Name.c_str());
if (TWFunc::Path_Exists(tw_image_dir)) {
if (Display_Error)
- LOGERR("A backup with this name already exists.\n");
+ gui_err("backup_name_exists=A backup with this name already exists.");
return -4;
}
// No problems found, return 0
@@ -472,18 +473,18 @@ bool TWPartitionManager::Make_MD5(bool generate_md5, string Backup_Folder, strin
if (!generate_md5)
return true;
- TWFunc::GUI_Operation_Text(TW_GENERATE_MD5_TEXT, "Generating MD5");
- gui_print(" * Generating md5...\n");
+ TWFunc::GUI_Operation_Text(TW_GENERATE_MD5_TEXT, gui_parse_text("{@generating_md51}"));
+ gui_msg("generating_md52= * Generating md5...");
if (TWFunc::Path_Exists(Full_File)) {
md5sum.setfn(Backup_Folder + Backup_Filename);
if (md5sum.computeMD5() == 0)
if (md5sum.write_md5digest() == 0)
- gui_print(" * MD5 Created.\n");
+ gui_msg("md5_created= * MD5 Created.");
else
return -1;
else
- gui_print(" * MD5 Error!\n");
+ gui_err("md5_error= * MD5 Error!");
} else {
char filename[512];
int index = 0;
@@ -496,11 +497,11 @@ bool TWPartitionManager::Make_MD5(bool generate_md5, string Backup_Folder, strin
if (md5sum.computeMD5() == 0) {
if (md5sum.write_md5digest() != 0)
{
- gui_print(" * MD5 Error.\n");
+ gui_err("md5_error= * MD5 Error!");
return false;
}
} else {
- gui_print(" * Error computing MD5.\n");
+ gui_err("md5_compute_error= * Error computing MD5.");
return false;
}
}
@@ -512,7 +513,7 @@ bool TWPartitionManager::Make_MD5(bool generate_md5, string Backup_Folder, strin
LOGERR("Backup file: '%s' not found!\n", filename);
return false;
}
- gui_print(" * MD5 Created.\n");
+ gui_msg("md5_created= * MD5 Created.");
}
return true;
}
@@ -602,10 +603,10 @@ void TWPartitionManager::Clean_Backup_Folder(string Backup_Folder) {
struct dirent *p;
int r;
- gui_print("Backup Failed.\nCleaning Backup Folder\n");
+ gui_msg("backup_clean=Backup Failed. Cleaning Backup Folder.");
if (d == NULL) {
- LOGERR("Error opening dir: '%s'\n", Backup_Folder.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Backup_Folder)(strerror(errno)));
return;
}
@@ -679,9 +680,9 @@ int TWPartitionManager::Run_Backup(void) {
DataManager::GetValue(TW_BACKUPS_FOLDER_VAR, Backup_Folder);
DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
- if (Backup_Name == "(Current Date)") {
+ if (Backup_Name == gui_parse_text("{@current_date}")) {
Backup_Name = TWFunc::Get_Current_Date();
- } else if (Backup_Name == "(Auto Generate)" || Backup_Name == "0" || Backup_Name.empty()) {
+ } else if (Backup_Name == gui_parse_text("{@auto_generate}") || Backup_Name == "0" || Backup_Name.empty()) {
TWFunc::Auto_Generate_Backup_Name();
DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
}
@@ -716,7 +717,7 @@ int TWPartitionManager::Run_Backup(void) {
}
}
} else {
- LOGERR("Unable to locate '%s' partition for backup calculations.\n", backup_path.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_locate_partition=Unable to locate '{1}' partition for backup calculations.")(backup_path));
}
start_pos = end_pos + 1;
end_pos = Backup_List.find(";", start_pos);
@@ -724,18 +725,18 @@ int TWPartitionManager::Run_Backup(void) {
}
if (partition_count == 0) {
- gui_print("No partitions selected for backup.\n");
+ gui_msg("no_partition_selected=No partitions selected for backup.");
return false;
}
total_bytes = file_bytes + img_bytes;
- gui_print(" * Total number of partitions to back up: %d\n", partition_count);
- gui_print(" * Total size of all data: %lluMB\n", total_bytes / 1024 / 1024);
+ gui_msg(Msg("total_partitions_backup= * Total number of partitions to back up: {1}")(partition_count));
+ gui_msg(Msg("total_backup_size= * Total size of all data: {1}MB")(total_bytes / 1024 / 1024));
storage = Find_Partition_By_Path(DataManager::GetCurrentStoragePath());
if (storage != NULL) {
free_space = storage->Free;
- gui_print(" * Available space: %lluMB\n", free_space / 1024 / 1024);
+ gui_msg(Msg("available_space= * Available space: {1}MB")(free_space / 1024 / 1024));
} else {
- LOGERR("Unable to locate storage device.\n");
+ gui_err("unable_locate_storage=Unable to locate storage device.");
return false;
}
@@ -743,17 +744,17 @@ int TWPartitionManager::Run_Backup(void) {
if (!disable_free_space_check) {
if (free_space - (32 * 1024 * 1024) < total_bytes) {
// We require an extra 32MB just in case
- LOGERR("Not enough free space on storage.\n");
+ gui_err("no_space=Not enough free space on storage.");
return false;
}
}
img_bytes_remaining = img_bytes;
file_bytes_remaining = file_bytes;
- gui_print("\n[BACKUP STARTED]\n");
- gui_print(" * Backup Folder: %s\n", Full_Backup_Path.c_str());
+ gui_msg("backup_started=[BACKUP STARTED]");
+ gui_msg(Msg("backup_folder= * Backup Folder: {1}")(Full_Backup_Path));
if (!TWFunc::Recursive_Mkdir(Full_Backup_Path)) {
- LOGERR("Failed to make backup folder.\n");
+ gui_err("fail_backup_folder=Failed to make backup folder.");
return false;
}
@@ -770,7 +771,7 @@ int TWPartitionManager::Run_Backup(void) {
if (!Backup_Partition(backup_part, Full_Backup_Path, do_md5, &img_bytes_remaining, &file_bytes_remaining, &img_time, &file_time, &img_bytes, &file_bytes))
return false;
} else {
- LOGERR("Unable to locate '%s' partition for backup process.\n", backup_path.c_str());
+ gui_msg(Msg(msg::kError, "unable_to_locate_partition=Unable to locate '{1}' partition for backup calculations.")(backup_path));
}
start_pos = end_pos + 1;
end_pos = Backup_List.find(";", start_pos);
@@ -784,8 +785,8 @@ int TWPartitionManager::Run_Backup(void) {
int img_bps = (int)img_bytes / (int)img_time;
unsigned long long file_bps = file_bytes / (int)file_time;
- gui_print("Average backup rate for file systems: %llu MB/sec\n", (file_bps / (1024 * 1024)));
- gui_print("Average backup rate for imaged drives: %lu MB/sec\n", (img_bps / (1024 * 1024)));
+ gui_msg(Msg("avg_backup_fs=Average backup rate for file systems: {1} MB/sec")(file_bps / (1024 * 1024)));
+ gui_msg(Msg("avg_backup_img=Average backup rate for imaged drives: {1} MB/sec")(img_bps / (1024 * 1024)));
time(&total_stop);
int total_time = (int) difftime(total_stop, total_start);
@@ -812,10 +813,10 @@ int TWPartitionManager::Run_Backup(void) {
else
DataManager::SetValue(TW_BACKUP_AVG_FILE_RATE, file_bps);
- gui_print("[%llu MB TOTAL BACKED UP]\n", actual_backup_size);
+ gui_msg(Msg("total_backed_size=[{1} MB TOTAL BACKED UP]")(actual_backup_size));
Update_System_Details();
UnMount_Main_Partitions();
- gui_print_color("highlight", "[BACKUP COMPLETED IN %d SECONDS]\n\n", total_time); // the end
+ gui_msg(Msg(msg::kHighlight, "backup_completed=[BACKUP COMPLETED IN %s SECONDS]")(total_time)); // the end
string backup_log = Full_Backup_Path + "recovery.log";
TWFunc::copy_file("/tmp/recovery.log", backup_log, 0644);
tw_set_default_metadata(backup_log.c_str());
@@ -845,7 +846,7 @@ bool TWPartitionManager::Restore_Partition(TWPartition* Part, string Restore_Nam
}
time(&Stop);
TWFunc::SetPerformanceMode(false);
- gui_print("[%s done (%d seconds)]\n\n", Part->Backup_Display_Name.c_str(), (int)difftime(Stop, Start));
+ gui_msg(Msg("restort_part_done=[{1} done ({2} seconds)]")(Part->Backup_Display_Name)((int)difftime(Stop, Start)));
return true;
}
@@ -858,8 +859,8 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
size_t start_pos = 0, end_pos;
unsigned long long total_restore_size = 0, already_restored_size = 0;
- gui_print("\n[RESTORE STARTED]\n\n");
- gui_print("Restore folder: '%s'\n", Restore_Name.c_str());
+ gui_msg("restore_started=[RESTORE STARTED]");
+ gui_msg(Msg("restore_folder=Restore folder: '{1}'")(Restore_Name));
if (!Mount_Current_Storage(true))
return false;
@@ -867,12 +868,12 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
DataManager::GetValue(TW_SKIP_MD5_CHECK_VAR, check_md5);
if (check_md5 > 0) {
// Check MD5 files first before restoring to ensure that all of them match before starting a restore
- TWFunc::GUI_Operation_Text(TW_VERIFY_MD5_TEXT, "Verifying MD5");
- gui_print("Verifying MD5...\n");
+ TWFunc::GUI_Operation_Text(TW_VERIFY_MD5_TEXT, gui_parse_text("{@verifying_md5}"));
+ gui_msg("verifying_md5=Verifying MD5");
} else {
- gui_print("Skipping MD5 check based on user setting.\n");
+ gui_msg("skip_md5=Skipping MD5 check based on user setting.");
}
- gui_print("Calculating restore details...\n");
+ gui_msg("calc_restore=Calculating restore details...");
DataManager::GetValue("tw_restore_selected", Restore_List);
if (!Restore_List.empty()) {
end_pos = Restore_List.find(";", start_pos);
@@ -881,7 +882,7 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
restore_part = Find_Partition_By_Path(restore_path);
if (restore_part != NULL) {
if (restore_part->Mount_Read_Only) {
- LOGERR("Cannot restore %s -- mounted read only.\n", restore_part->Backup_Display_Name.c_str());
+ gui_msg(Msg(msg::kError, "restore_read_only=Cannot restore {1} -- mounted read only.")(restore_part->Backup_Display_Name));
return false;
}
if (check_md5 > 0 && !restore_part->Check_MD5(Restore_Name))
@@ -900,7 +901,7 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
}
}
} else {
- LOGERR("Unable to locate '%s' partition for restoring (restore list).\n", restore_path.c_str());
+ gui_msg(Msg(msg::kError, "restore_unable_locate=Unable to locate '{1}' partition for restoring.")(restore_path));
}
start_pos = end_pos + 1;
end_pos = Restore_List.find(";", start_pos);
@@ -908,12 +909,12 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
}
if (partition_count == 0) {
- LOGERR("No partitions selected for restore.\n");
+ gui_err("no_part_restore=No partitions selected for restore.");
return false;
}
- gui_print("Restoring %i partitions...\n", partition_count);
- gui_print("Total restore size is %lluMB\n", total_restore_size / 1048576);
+ gui_msg(Msg("restore_part_count=Restoring {1} partitions...")(partition_count));
+ gui_msg(Msg("total_restore_size=Total restore size is {1}MB")(total_restore_size / 1048576));
DataManager::SetProgress(0.0);
start_pos = 0;
@@ -927,17 +928,17 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
if (!Restore_Partition(restore_part, Restore_Name, partition_count, &total_restore_size, &already_restored_size))
return false;
} else {
- LOGERR("Unable to locate '%s' partition for restoring.\n", restore_path.c_str());
+ gui_msg(Msg(msg::kError, "restore_unable_locate=Unable to locate '{1}' partition for restoring.")(restore_path));
}
start_pos = end_pos + 1;
end_pos = Restore_List.find(";", start_pos);
}
}
- TWFunc::GUI_Operation_Text(TW_UPDATE_SYSTEM_DETAILS_TEXT, "Updating System Details");
+ TWFunc::GUI_Operation_Text(TW_UPDATE_SYSTEM_DETAILS_TEXT, gui_parse_text("{@updating_system_details}"));
Update_System_Details();
UnMount_Main_Partitions();
time(&rStop);
- gui_print_color("highlight", "[RESTORE COMPLETED IN %d SECONDS]\n\n",(int)difftime(rStop,rStart));
+ gui_msg(Msg(msg::kHighlight, "restore_complete=[RESTORE COMPLETED IN {1} SECONDS]")((int)difftime(rStop,rStart)));
DataManager::SetValue("tw_file_progress", "");
return true;
}
@@ -953,7 +954,7 @@ void TWPartitionManager::Set_Restore_Files(string Restore_Name) {
d = opendir(Restore_Name.c_str());
if (d == NULL)
{
- LOGERR("Error opening %s\n", Restore_Name.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Restore_Name)(strerror(errno)));
return;
}
@@ -1020,7 +1021,7 @@ void TWPartitionManager::Set_Restore_Files(string Restore_Name) {
TWPartition* Part = Find_Partition_By_Path(label);
if (Part == NULL)
{
- LOGERR(" Unable to locate partition by backup name: '%s'\n", label);
+ gui_msg(Msg(msg::kError, "unable_locate_part_backup_name=Unable to locate partition by backup name: '{1}'")(label));
continue;
}
@@ -1060,7 +1061,7 @@ int TWPartitionManager::Wipe_By_Path(string Path) {
if (found) {
return ret;
} else
- LOGERR("Wipe: Unable to find partition for path '%s'\n", Local_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Local_Path));
return false;
}
@@ -1085,7 +1086,7 @@ int TWPartitionManager::Wipe_By_Path(string Path, string New_File_System) {
if (found) {
return ret;
} else
- LOGERR("Wipe: Unable to find partition for path '%s'\n", Local_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Local_Path));
return false;
}
@@ -1127,11 +1128,11 @@ int TWPartitionManager::Wipe_Dalvik_Cache(void) {
dir.push_back("/data/dalvik-cache");
dir.push_back("/cache/dalvik-cache");
dir.push_back("/cache/dc");
- gui_print("\nWiping Dalvik Cache Directories...\n");
+ gui_msg("wiping_dalvik=Wiping Dalvik Cache Directories...");
for (unsigned i = 0; i < dir.size(); ++i) {
if (stat(dir.at(i).c_str(), &st) == 0) {
TWFunc::removeDir(dir.at(i), false);
- gui_print("Cleaned: %s...\n", dir.at(i).c_str());
+ gui_msg(Msg("cleaned=Cleaned: {1}...")(dir.at(i)));
}
}
TWPartition* sdext = Find_Partition_By_Path("/sd-ext");
@@ -1140,10 +1141,10 @@ int TWPartitionManager::Wipe_Dalvik_Cache(void) {
if (stat("/sd-ext/dalvik-cache", &st) == 0)
{
TWFunc::removeDir("/sd-ext/dalvik-cache", false);
- gui_print("Cleaned: /sd-ext/dalvik-cache...\n");
+ gui_msg(Msg("cleaned=Cleaned: {1}...")("/sd-ext/dalvik-cache"));
}
}
- gui_print("-- Dalvik Cache Directories Wipe Complete!\n\n");
+ gui_msg("dalvik_done=-- Dalvik Cache Directories Wipe Complete!");
return true;
}
@@ -1187,7 +1188,7 @@ int TWPartitionManager::Wipe_Android_Secure(void) {
if (found) {
return ret;
} else {
- LOGERR("No android secure partitions found.\n");
+ gui_err("no_andsec=No android secure partitions found.");
}
return false;
}
@@ -1201,7 +1202,7 @@ int TWPartitionManager::Format_Data(void) {
return dat->Wipe_Encryption();
} else {
- LOGERR("Unable to locate /data.\n");
+ gui_msg(Msg(msg::kError, "unable_to_locate=Unable to locate {1].")("/data"));
return false;
}
return false;
@@ -1218,14 +1219,14 @@ int TWPartitionManager::Wipe_Media_From_Data(void) {
if (!dat->Mount(true))
return false;
- gui_print("Wiping internal storage -- /data/media...\n");
+ gui_msg("wiping_datamedia=Wiping internal storage -- /data/media...");
Remove_MTP_Storage(dat->MTP_Storage_ID);
TWFunc::removeDir("/data/media", false);
dat->Recreate_Media_Folder();
Add_MTP_Storage(dat->MTP_Storage_ID);
return true;
} else {
- LOGERR("Unable to locate /data.\n");
+ gui_msg(Msg(msg::kError, "unable_to_locate=Unable to locate {1].")("/data"));
return false;
}
return false;
@@ -1252,7 +1253,7 @@ int TWPartitionManager::Repair_By_Path(string Path, bool Display_Error) {
if (found) {
return ret;
} else if (Display_Error) {
- LOGERR("Repair: Unable to find partition for path '%s'\n", Local_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Local_Path));
} else {
LOGINFO("Repair: Unable to find partition for path '%s'\n", Local_Path.c_str());
}
@@ -1280,7 +1281,7 @@ int TWPartitionManager::Resize_By_Path(string Path, bool Display_Error) {
if (found) {
return ret;
} else if (Display_Error) {
- LOGERR("Resize: Unable to find partition for path '%s'\n", Local_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Local_Path));
} else {
LOGINFO("Resize: Unable to find partition for path '%s'\n", Local_Path.c_str());
}
@@ -1291,7 +1292,7 @@ void TWPartitionManager::Update_System_Details(void) {
std::vector<TWPartition*>::iterator iter;
int data_size = 0;
- gui_print("Updating partition details...\n");
+ gui_msg("update_part_details=Updating partition details...");
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
if ((*iter)->Can_Be_Mounted) {
(*iter)->Update_Size(true);
@@ -1387,7 +1388,7 @@ void TWPartitionManager::Update_System_Details(void) {
#endif
}
}
- gui_print("...done\n");
+ gui_msg("update_part_details_done=...done");
DataManager::SetValue(TW_BACKUP_DATA_SIZE, data_size);
string current_storage_path = DataManager::GetCurrentStoragePath();
TWPartition* FreeStorage = Find_Partition_By_Path(current_storage_path);
@@ -1402,7 +1403,7 @@ void TWPartitionManager::Update_System_Details(void) {
if (current_storage_path == DataManager::GetSettingsStoragePath()) {
if (!FreeStorage->Is_Encrypted) {
// Not able to use internal, so error!
- LOGERR("Unable to mount internal storage.\n");
+ gui_msg(Msg(msg::kError, "unable_to_mount_internal=Unable to mount internal_storage"));
}
DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
} else {
@@ -1413,13 +1414,13 @@ void TWPartitionManager::Update_System_Details(void) {
if (FreeStorage != NULL) {
DataManager::SetValue(TW_STORAGE_FREE_SIZE, (int)(FreeStorage->Free / 1048576LLU));
} else {
- LOGERR("Unable to locate internal storage partition.\n");
+ gui_msg(Msg(msg::kError, "unable_to_locate=Unable to locate {1}")("internal storage partition"));
DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
}
}
} else {
// No dual storage and unable to mount storage, error!
- LOGERR("Unable to mount storage.\n");
+ gui_msg(Msg(msg::kError, "unable_to_mount_storage=Unable to mount storage"));
DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
}
} else {
@@ -1465,7 +1466,7 @@ int TWPartitionManager::Decrypt_Device(string Password) {
}
if (pwret != 0) {
- LOGERR("Failed to decrypt data.\n");
+ gui_err("fail_decrypt=Failed to decrypt data.");
return -1;
}
@@ -1481,7 +1482,7 @@ int TWPartitionManager::Decrypt_Device(string Password) {
dat->Decrypted_Block_Device = crypto_blkdev;
dat->Setup_File_System(false);
dat->Current_File_System = dat->Fstab_File_System; // Needed if we're ignoring blkid because encrypted devices start out as emmc
- gui_print("Data successfully decrypted, new block device: '%s'\n", crypto_blkdev);
+ gui_msg(Msg("decrypt_success=Data successfully decrypted, new block device: '{1}'")(crypto_blkdev));
// Sleep for a bit so that the device will be ready
sleep(1);
@@ -1500,7 +1501,7 @@ int TWPartitionManager::Decrypt_Device(string Password) {
}
return 0;
#else
- LOGERR("No crypto support was compiled into this build.\n");
+ gui_err("no_crypto_support=No crypto support was compiled into this build.");
return -1;
#endif
return 1;
@@ -1523,7 +1524,7 @@ int TWPartitionManager::Fix_Permissions(void) {
result = perms.fixContexts();
#endif
UnMount_Main_Partitions();
- gui_print("Done.\n\n");
+ gui_msg("done=Done.");
return result;
}
@@ -1553,7 +1554,8 @@ int TWPartitionManager::Open_Lun_File(string Partition_Path, string Lun_File) {
TWPartition* Part = Find_Partition_By_Path(Partition_Path);
if (Part == NULL) {
- LOGERR("Unable to locate '%s' for USB storage mode.", Partition_Path.c_str());
+ LOGINFO("Unable to locate '%s' for USB storage mode.", Partition_Path.c_str());
+ gui_msg(Msg(msg::kError, "unable_find_part_path=Unable to find partition for path '{1}'")(Partition_Path));
return false;
}
LOGINFO("USB mount '%s', '%s' > '%s'\n", Partition_Path.c_str(), Part->Actual_Block_Device.c_str(), Lun_File.c_str());
@@ -1591,7 +1593,7 @@ int TWPartitionManager::usb_storage_enable(void) {
goto error_handle;
}
} else {
- LOGERR("Unable to find storage partition to mount to USB\n");
+ gui_err("unable_locate_storage=Unable to locate storage device.");
goto error_handle;
}
} else if (!Open_Lun_File(DataManager::GetCurrentStoragePath(), lun_file)) {
@@ -1613,7 +1615,7 @@ int TWPartitionManager::usb_storage_enable(void) {
Open_Lun_File(Mount2->Mount_Point, lun_file);
}
} else {
- LOGERR("Unable to find storage partition to mount to USB\n");
+ gui_err("unable_locate_storage=Unable to locate storage device.");
goto error_handle;
}
}
@@ -1686,14 +1688,14 @@ int TWPartitionManager::Partition_SDCard(void) {
int ext, swap, total_size = 0, fat_size;
FILE* fp;
- gui_print("Partitioning SD Card...\n");
+ gui_msg("start_partition_sd=Partitioning SD Card...");
#ifdef TW_EXTERNAL_STORAGE_PATH
TWPartition* SDCard = Find_Partition_By_Path(EXPAND(TW_EXTERNAL_STORAGE_PATH));
#else
TWPartition* SDCard = Find_Partition_By_Path("/sdcard");
#endif
if (SDCard == NULL || !SDCard->Removable || SDCard->Has_Data_Media) {
- LOGERR("Unable to locate device to partition.\n");
+ gui_err("partition_sd_locate=Unable to locate device to partition.");
return false;
}
if (!SDCard->UnMount(true))
@@ -1712,7 +1714,7 @@ int TWPartitionManager::Partition_SDCard(void) {
// Find the size of the block device:
fp = fopen("/proc/partitions", "rt");
if (fp == NULL) {
- LOGERR("Unable to open /proc/partitions\n");
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")("/proc/partitions")(strerror(errno)));
return false;
}
@@ -1750,40 +1752,40 @@ int TWPartitionManager::Partition_SDCard(void) {
sprintf(temp, "%i", fat_size + ext + swap);
swap_str = temp;
if (ext + swap > total_size) {
- LOGERR("EXT + Swap size is larger than sdcard size.\n");
+ gui_err("ext_swap_size=EXT + Swap size is larger than sdcard size.");
return false;
}
- gui_print("Removing partition table...\n");
+ gui_msg("remove_part_table=Removing partition table...");
Command = "parted -s " + Device + " mklabel msdos";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command) != 0) {
- LOGERR("Unable to remove partition table.\n");
+ gui_err("unable_rm_part=Unable to remove partition table.");
Update_System_Details();
return false;
}
- gui_print("Creating FAT32 partition...\n");
+ gui_msg(Msg("create_part=Creating {1} partition...")("FAT32"));
Command = "parted " + Device + " mkpartfs primary fat32 0 " + fat_str + "MB";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command) != 0) {
- LOGERR("Unable to create FAT32 partition.\n");
+ gui_msg(Msg(msg::kError, "unable_to_create_part=Unable to create {1} partition.")("FAT32"));
return false;
}
if (ext > 0) {
- gui_print("Creating EXT partition...\n");
+ gui_msg(Msg("create_part=Creating {1} partition...")("EXT"));
Command = "parted " + Device + " mkpartfs primary ext2 " + fat_str + "MB " + ext_str + "MB";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command) != 0) {
- LOGERR("Unable to create EXT partition.\n");
+ gui_msg(Msg(msg::kError, "unable_to_create_part=Unable to create {1} partition.")("EXT"));
Update_System_Details();
return false;
}
}
if (swap > 0) {
- gui_print("Creating swap partition...\n");
+ gui_msg(Msg("create_part=Creating {1} partition...")("swap"));
Command = "parted " + Device + " mkpartfs primary linux-swap " + ext_str + "MB " + swap_str + "MB";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command) != 0) {
- LOGERR("Unable to create swap partition.\n");
+ gui_msg(Msg(msg::kError, "unable_to_create_part=Unable to create {1} partition.")("swap"));
Update_System_Details();
return false;
}
@@ -1815,13 +1817,13 @@ int TWPartitionManager::Partition_SDCard(void) {
return false;
}
Command = "mke2fs -t " + ext_format + " -m 0 " + SDext->Actual_Block_Device;
- gui_print("Formatting sd-ext as %s...\n", ext_format.c_str());
+ gui_msg(Msg("format_sdext_as=Formatting sd-ext as {1}...")(ext_format));
LOGINFO("Formatting sd-ext after partitioning, command: '%s'\n", Command.c_str());
TWFunc::Exec_Cmd(Command);
}
Update_System_Details();
- gui_print("Partitioning complete.\n");
+ gui_msg("part_complete=Partitioning complete.");
return true;
}
@@ -1900,7 +1902,7 @@ void TWPartitionManager::Get_Partition_List(string ListType, std::vector<Partiti
Partition_List->push_back(part);
}
} else {
- LOGERR("Unable to locate '%s' partition for restore.\n", restore_path.c_str());
+ gui_msg(Msg(msg::kError, "restore_unable_locate=Unable to locate '{1}' partition for restoring.")(restore_path));
}
start_pos = end_pos + 1;
end_pos = Restore_List.find(";", start_pos);
@@ -1908,7 +1910,7 @@ void TWPartitionManager::Get_Partition_List(string ListType, std::vector<Partiti
}
} else if (ListType == "wipe") {
struct PartitionList dalvik;
- dalvik.Display_Name = "Dalvik Cache";
+ dalvik.Display_Name = gui_parse_text("{@dalvik}");
dalvik.Mount_Point = "DALVIK";
dalvik.selected = 0;
Partition_List->push_back(dalvik);
@@ -1961,7 +1963,7 @@ void TWPartitionManager::Output_Storage_Fstab(void) {
FILE *fp = fopen("/cache/recovery/storage.fstab", "w");
if (fp == NULL) {
- LOGERR("Unable to open '/cache/recovery/storage.fstab'.\n");
+ gui_msg(Msg(msg::kError, "unable_to_open=Unable to open '{1}'.")("/cache/recovery/storage.fstab"));
return;
}
@@ -1995,7 +1997,7 @@ TWPartition *TWPartitionManager::Get_Default_Storage_Partition()
bool TWPartitionManager::Enable_MTP(void) {
#ifdef TW_HAS_MTP
if (mtppid) {
- LOGERR("MTP already enabled\n");
+ gui_err("mtp_already_enabled=MTP already enabled");
return true;
}
//Launch MTP Responder
@@ -2036,11 +2038,11 @@ bool TWPartitionManager::Enable_MTP(void) {
} else {
close(mtppipe[0]);
close(mtppipe[1]);
- LOGERR("Failed to enable MTP\n");
+ gui_err("mtp_fail=Failed to enable MTP");
return false;
}
#else
- LOGERR("MTP support not included\n");
+ gui_err("no_mtp=MTP support not included");
#endif
DataManager::SetValue("tw_mtp_enabled", 0);
return false;
@@ -2157,7 +2159,7 @@ bool TWPartitionManager::Add_Remove_MTP_Storage(TWPartition* Part, int message_t
}
return true;
#else
- LOGERR("MTP support not included\n");
+ gui_err("no_mtp=MTP support not included");
DataManager::SetValue("tw_mtp_enabled", 0);
return false;
#endif
@@ -2217,13 +2219,13 @@ bool TWPartitionManager::Flash_Image(string Filename) {
string Flash_List, flash_path;
size_t start_pos = 0, end_pos = 0;
- gui_print("\n[IMAGE FLASH STARTED]\n\n");
- gui_print("Image to flash: '%s'\n", Filename.c_str());
+ gui_msg("image_flash_start=[IMAGE FLASH STARTED]");
+ gui_msg(Msg("img_to_flash=Image to flash: '{1}'")(Filename));
if (!Mount_Current_Storage(true))
return false;
- gui_print("Calculating restore details...\n");
+ gui_msg("calc_restore=Calculating restore details...");
DataManager::GetValue("tw_flash_partition", Flash_List);
if (!Flash_List.empty()) {
end_pos = Flash_List.find(";", start_pos);
@@ -2233,11 +2235,11 @@ bool TWPartitionManager::Flash_Image(string Filename) {
if (flash_part != NULL) {
partition_count++;
if (partition_count > 1) {
- LOGERR("Too many partitions selected for flashing.\n");
+ gui_err("too_many_flash=Too many partitions selected for flashing.");
return false;
}
} else {
- LOGERR("Unable to locate '%s' partition for flashing (flash list).\n", flash_path.c_str());
+ gui_msg(Msg(msg::kError, "flash_unable_locate=Unable to locate '{1}' partition for flashing.")(flash_path));
return false;
}
start_pos = end_pos + 1;
@@ -2246,7 +2248,7 @@ bool TWPartitionManager::Flash_Image(string Filename) {
}
if (partition_count == 0) {
- LOGERR("No partitions selected for flashing.\n");
+ gui_err("no_part_flash=No partitions selected for flashing.");
return false;
}
@@ -2255,9 +2257,56 @@ bool TWPartitionManager::Flash_Image(string Filename) {
if (!flash_part->Flash_Image(Filename))
return false;
} else {
- LOGERR("Invalid flash partition specified.\n");
+ gui_err("invalid_flash=Invalid flash partition specified.");
return false;
}
- gui_print_color("highlight", "[IMAGE FLASH COMPLETED]\n\n");
+ gui_highlight("flash_done=IMAGE FLASH COMPLETED]");
return true;
}
+
+void TWPartitionManager::Translate_Partition(const char* path, const char* resource_name, const char* default_value) {
+ TWPartition* part = PartitionManager.Find_Partition_By_Path(path);
+ if (part) {
+ part->Display_Name = gui_lookup(resource_name, default_value);
+ part->Backup_Display_Name = part->Display_Name;
+ }
+}
+
+void TWPartitionManager::Translate_Partition(const char* path, const char* resource_name, const char* default_value, const char* storage_resource_name, const char* storage_default_value) {
+ TWPartition* part = PartitionManager.Find_Partition_By_Path(path);
+ if (part) {
+ part->Display_Name = gui_lookup(resource_name, default_value);
+ part->Backup_Display_Name = part->Display_Name;
+ if (part->Is_Storage)
+ part->Storage_Name = gui_lookup(storage_resource_name, storage_default_value);
+ }
+}
+
+void TWPartitionManager::Translate_Partition_Display_Names() {
+ Translate_Partition("/system", "system", "System");
+ Translate_Partition("/system_image", "system_image", "System Image");
+ Translate_Partition("/vendor", "vendor", "Vendor");
+ Translate_Partition("/vendor_image", "vendor_image", "Vendor Image");
+ Translate_Partition("/cache", "cache", "Cache");
+ Translate_Partition("/data", "data", "Data", "internal", "Internal Storage");
+ Translate_Partition("/boot", "boot", "Boot");
+ Translate_Partition("/recovery", "recovery", "Recovery");
+ if (!datamedia) {
+ Translate_Partition("/sdcard", "sdcard", "SDCard", "sdcard", "SDCard");
+ Translate_Partition("/internal_sd", "sdcard", "SDCard", "sdcard", "SDCard");
+ Translate_Partition("/internal_sdcard", "sdcard", "SDCard", "sdcard", "SDCard");
+ Translate_Partition("/emmc", "sdcard", "SDCard", "sdcard", "SDCard");
+ }
+ Translate_Partition("/external_sd", "microsd", "Micro SDCard", "microsd", "Micro SDCard");
+ Translate_Partition("/external_sdcard", "microsd", "Micro SDCard", "microsd", "Micro SDCard");
+ Translate_Partition("/usb-otg", "usbotg", "USB OTG", "usbotg", "USB OTG");
+ Translate_Partition("/sd-ext", "sdext", "SD-EXT");
+
+ // Android secure is a special case
+ TWPartition* part = PartitionManager.Find_Partition_By_Path("/and-sec");
+ if (part)
+ part->Backup_Display_Name = gui_lookup("android_secure", "Android Secure");
+
+ // This updates the text on all of the storage selection buttons in the GUI
+ DataManager::SetBackupFolder();
+}
diff --git a/partitions.hpp b/partitions.hpp
index f9832ad6d..ed2687090 100644
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -178,6 +178,7 @@ friend class TWPartitionManager;
friend class DataManager;
friend class GUIPartitionList;
friend class GUIAction;
+friend class PageManager;
};
class TWPartitionManager
@@ -233,6 +234,9 @@ public:
bool Remove_MTP_Storage(string Mount_Point); // Adds or removes an MTP Storage partition
bool Remove_MTP_Storage(unsigned int Storage_ID); // Adds or removes an MTP Storage partition
bool Flash_Image(string Filename); // Flashes an image to a selected partition from the partition list
+ void Translate_Partition(const char* path, const char* resource_name, const char* default_value);
+ void Translate_Partition(const char* path, const char* resource_name, const char* default_value, const char* storage_resource_name, const char* storage_default_value);
+ void Translate_Partition_Display_Names(); // Updates display names based on translations
TWAtomicInt stop_backup;
diff --git a/twinstall.cpp b/twinstall.cpp
index 7eea07dd2..a2eb72530 100644
--- a/twinstall.cpp
+++ b/twinstall.cpp
@@ -40,6 +40,7 @@
#include "partitions.hpp"
#include "twrpDigest.hpp"
#include "twrp-functions.hpp"
+#include "gui/gui.hpp"
extern "C" {
#include "gui/gui.h"
#include "legacy_property_service.h"
@@ -102,7 +103,7 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
if (binary_location == NULL) {
mzCloseZipArchive(Zip);
- LOGERR("Could not find '" ASSUMED_UPDATE_BINARY_NAME "' in the zip file.\n");
+ gui_msg(Msg(msg::kError, "no_updater_binary=Could not find '{1}' in the zip file.")(ASSUMED_UPDATE_BINARY_NAME));
return INSTALL_CORRUPT;
}
@@ -257,9 +258,9 @@ extern "C" int TWinstall_zip(const char* path, int* wipe_cache) {
return INSTALL_CORRUPT;
}
- gui_print("Installing '%s'...\n", path);
+ gui_msg(Msg("installing_zip=Installing zip file '{1}'")(path));
if (strlen(path) < 9 || strncmp(path, "/sideload", 9) != 0) {
- gui_print("Checking for MD5 file...\n");
+ gui_msg("check_for_md5=Checking for MD5 file...");
twrpDigest md5sum;
md5sum.setfn(path);
int md5_return = md5sum.verify_md5digest();
@@ -276,24 +277,25 @@ extern "C" int TWinstall_zip(const char* path, int* wipe_cache) {
MemMapping map;
if (sysMapFile(path, &map) != 0) {
- LOGERR("Failed to sysMapFile '%s'\n", path);
+ gui_msg(Msg(msg::kError, "fail_sysmap=Failed to map file '{1}'")(path));
return -1;
}
if (zip_verify) {
- gui_print("Verifying zip signature...\n");
+ gui_msg("verify_zip_sig=Verifying zip signature...");
ret_val = verify_file(map.addr, map.length);
if (ret_val != VERIFY_SUCCESS) {
- LOGERR("Zip signature verification failed: %i\n", ret_val);
+ LOGINFO("Zip signature verification failed: %i\n", ret_val);
+ gui_err("verify_zip_fail=Zip signature verification failed!");
sysReleaseMap(&map);
return -1;
} else {
- gui_print("Zip signature verified successfully.\n");
+ gui_msg("verify_zip_done=Zip signature verified successfully.");
}
}
ret_val = mzOpenZipArchive(map.addr, map.length, &Zip);
if (ret_val != 0) {
- LOGERR("Zip file is corrupt!\n", path);
+ gui_err("zip_corrupt=Zip file is corrupt!");
sysReleaseMap(&map);
return INSTALL_CORRUPT;
}
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 644d5657a..a7a8e8d63 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -45,6 +45,7 @@
#include "bootloader.h"
#include "cutils/properties.h"
#include "cutils/android_reboot.h"
+#include "gui/gui.hpp"
#include <sys/reboot.h>
#endif // ndef BUILD_TWRPTAR_MAIN
#ifndef TW_EXCLUDE_ENCRYPTED_BACKUPS
@@ -122,12 +123,12 @@ int TWFunc::Wait_For_Child(pid_t pid, int *status, string Child_Name) {
rc_pid = waitpid(pid, status, 0);
if (rc_pid > 0) {
if (WIFSIGNALED(*status)) {
- LOGERR("%s process ended with signal: %d\n", Child_Name.c_str(), WTERMSIG(*status)); // Seg fault or some other non-graceful termination
+ gui_msg(Msg(msg::kError, "pid_signal={1} process ended with signal: {2}")(Child_Name)(WTERMSIG(*status))); // Seg fault or some other non-graceful termination
return -1;
} else if (WEXITSTATUS(*status) == 0) {
LOGINFO("%s process ended with RC=%d\n", Child_Name.c_str(), WEXITSTATUS(*status)); // Success
} else {
- LOGERR("%s process ended with ERROR=%d\n", Child_Name.c_str(), WEXITSTATUS(*status)); // Graceful exit, but there was an error
+ gui_msg(Msg(msg::kError, "pid_error={1} process ended with ERROR: {2}")(Child_Name)(WEXITSTATUS(*status))); // Graceful exit, but there was an error
return -1;
}
} else { // no PID returned
@@ -207,13 +208,13 @@ int TWFunc::Try_Decrypting_File(string fn, string password) {
f = fopen(fn.c_str(), "rb");
if (f == NULL) {
- LOGERR("Failed to open '%s' to try decrypt\n", fn.c_str());
+ LOGERR("Failed to open '%s' to try decrypt: %s\n", fn.c_str(), strerror(errno));
oaes_free(&ctx);
return -1;
}
read_len = fread(buffer, sizeof(uint8_t), 4096, f);
if (read_len <= 0) {
- LOGERR("Read size during try decrypt failed\n");
+ LOGERR("Read size during try decrypt failed: %s\n", strerror(errno));
fclose(f);
oaes_free(&ctx);
return -1;
@@ -355,50 +356,50 @@ void TWFunc::install_htc_dumlock(void) {
if (!PartitionManager.Mount_By_Path("/data", true))
return;
- gui_print("Installing HTC Dumlock to system...\n");
+ gui_msg("install_dumlock=Installing HTC Dumlock to system...");
copy_file(TWHTCD_PATH "htcdumlocksys", "/system/bin/htcdumlock", 0755);
if (!Path_Exists("/system/bin/flash_image")) {
- gui_print("Installing flash_image...\n");
+ LOGINFO("Installing flash_image...\n");
copy_file(TWHTCD_PATH "flash_imagesys", "/system/bin/flash_image", 0755);
need_libs = 1;
} else
- gui_print("flash_image is already installed, skipping...\n");
+ LOGINFO("flash_image is already installed, skipping...\n");
if (!Path_Exists("/system/bin/dump_image")) {
- gui_print("Installing dump_image...\n");
+ LOGINFO("Installing dump_image...\n");
copy_file(TWHTCD_PATH "dump_imagesys", "/system/bin/dump_image", 0755);
need_libs = 1;
} else
- gui_print("dump_image is already installed, skipping...\n");
+ LOGINFO("dump_image is already installed, skipping...\n");
if (need_libs) {
- gui_print("Installing libs needed for flash_image and dump_image...\n");
+ LOGINFO("Installing libs needed for flash_image and dump_image...\n");
copy_file(TWHTCD_PATH "libbmlutils.so", "/system/lib/libbmlutils.so", 0644);
copy_file(TWHTCD_PATH "libflashutils.so", "/system/lib/libflashutils.so", 0644);
copy_file(TWHTCD_PATH "libmmcutils.so", "/system/lib/libmmcutils.so", 0644);
copy_file(TWHTCD_PATH "libmtdutils.so", "/system/lib/libmtdutils.so", 0644);
}
- gui_print("Installing HTC Dumlock app...\n");
+ LOGINFO("Installing HTC Dumlock app...\n");
mkdir("/data/app", 0777);
unlink("/data/app/com.teamwin.htcdumlock*");
copy_file(TWHTCD_PATH "HTCDumlock.apk", "/data/app/com.teamwin.htcdumlock.apk", 0777);
sync();
- gui_print("HTC Dumlock is installed.\n");
+ gui_msg("done=Done.");
}
void TWFunc::htc_dumlock_restore_original_boot(void) {
if (!PartitionManager.Mount_By_Path("/sdcard", true))
return;
- gui_print("Restoring original boot...\n");
+ gui_msg("dumlock_restore=Restoring original boot...");
Exec_Cmd("htcdumlock restore");
- gui_print("Original boot restored.\n");
+ gui_msg("done=Done.");
}
void TWFunc::htc_dumlock_reflash_recovery_to_boot(void) {
if (!PartitionManager.Mount_By_Path("/sdcard", true))
return;
- gui_print("Reflashing recovery to boot...\n");
+ gui_msg("dumlock_reflash=Reflashing recovery to boot...");
Exec_Cmd("htcdumlock recovery noreboot");
- gui_print("Recovery is flashed to boot.\n");
+ gui_msg("done=Done.");
}
int TWFunc::Recursive_Mkdir(string Path) {
@@ -411,7 +412,7 @@ int TWFunc::Recursive_Mkdir(string Path) {
wholePath = pathCpy.substr(0, pos);
if (!TWFunc::Path_Exists(wholePath)) {
if (mkdir(wholePath.c_str(), 0777)) {
- LOGERR("Unable to create folder: %s (errno=%d)\n", wholePath.c_str(), errno);
+ gui_msg(Msg(msg::kError, "create_folder_strerr=Can not create '{1}' folder ({2})")(wholePath)(strerror(errno)));
return false;
} else {
tw_set_default_metadata(wholePath.c_str());
@@ -570,10 +571,10 @@ void TWFunc::check_and_run_script(const char* script_file, const char* display_n
// Check for and run startup script if script exists
struct stat st;
if (stat(script_file, &st) == 0) {
- gui_print("Running %s script...\n", display_name);
+ gui_msg(Msg("run_script=Running {1} script...")(display_name));
chmod(script_file, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
TWFunc::Exec_Cmd(script_file);
- gui_print("\nFinished running %s script.\n", display_name);
+ gui_msg("done=Done.");
}
}
@@ -583,7 +584,7 @@ int TWFunc::removeDir(const string path, bool skipParent) {
string new_path;
if (d == NULL) {
- LOGERR("Error opening dir: '%s'\n", path.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(path)(strerror(errno)));
return -1;
}
@@ -742,7 +743,7 @@ bool TWFunc::Try_Decrypting_Backup(string Restore_Path, string Password) {
Restore_Path += "/";
d = opendir(Restore_Path.c_str());
if (d == NULL) {
- LOGERR("Error opening '%s'\n", Restore_Path.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Restore_Path)(strerror(errno)));
return false;
}
@@ -1042,7 +1043,7 @@ void TWFunc::Disable_Stock_Recovery_Replace(void) {
// Disable flashing of stock recovery
if (TWFunc::Path_Exists("/system/recovery-from-boot.p")) {
rename("/system/recovery-from-boot.p", "/system/recovery-from-boot.bak");
- gui_print("Renamed stock recovery file in /system to prevent\nthe stock ROM from replacing TWRP.\n");
+ gui_msg("rename_stock=Renamed stock recovery file in /system to prevent the stock ROM from replacing TWRP.");
sync();
}
PartitionManager.UnMount_By_Path("/system", false);
diff --git a/twrp.cpp b/twrp.cpp
index d49ae801c..b33a6ad1a 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -15,12 +15,13 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <string>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <signal.h>
+#include "gui/twmsg.h"
#include "cutils/properties.h"
extern "C" {
@@ -37,6 +38,9 @@ extern "C" {
#include "gui/gui.h"
#include "set_metadata.h"
}
+#include "gui/gui.hpp"
+#include "gui/pages.hpp"
+#include "gui/objects.hpp"
#include "twcommon.h"
#include "twrp-functions.hpp"
#include "data.hpp"
@@ -162,14 +166,14 @@ int main(int argc, char **argv) {
lgetfilecon("/sbin/teamwin", &contexts);
}
if (!contexts) {
- gui_print_color("warning", "Kernel does not have support for reading SELinux contexts.\n");
+ gui_warn("no_kernel_selinux=Kernel does not have support for reading SELinux contexts.");
} else {
free(contexts);
- gui_print("Full SELinux support is present.\n");
+ gui_msg("full_selinux=Full SELinux support is present.");
}
}
#else
- gui_print_color("warning", "No SELinux support (no libselinux).\n");
+ gui_warn("no_selinux=No SELinux support (no libselinux).");
#endif
PartitionManager.Mount_By_Path("/cache", true);
@@ -307,6 +311,8 @@ int main(int argc, char **argv) {
DataManager::SetValue("tw_mtp_enabled", 1);
#endif
DataManager::ReadSettingsFile();
+ PageManager::LoadLanguage(DataManager::GetStrValue("tw_language"));
+ GUIConsole::Translate_Now();
// Fixup the RTC clock on devices which require it
if(crash_counter == 0)
@@ -328,13 +334,13 @@ int main(int argc, char **argv) {
if (!PartitionManager.Enable_MTP())
PartitionManager.Disable_MTP();
else
- gui_print("MTP Enabled\n");
+ gui_msg("mtp_enabled=MTP Enabled");
} else {
PartitionManager.Disable_MTP();
}
property_set("mtp.crash_check", "0");
} else {
- gui_print_color("warning", "MTP Crashed, not starting MTP on boot.\n");
+ gui_warn("mtp_crash=MTP Crashed, not starting MTP on boot.");
DataManager::SetValue("tw_mtp_enabled", 0);
PartitionManager.Disable_MTP();
}
@@ -367,7 +373,6 @@ int main(int argc, char **argv) {
}
}
#endif
-
// Launch the main GUI
gui_start();
@@ -391,7 +396,7 @@ int main(int argc, char **argv) {
// Reboot
TWFunc::Update_Intent_File(Reboot_Value);
TWFunc::Update_Log_File();
- gui_print("Rebooting...\n");
+ gui_msg(Msg("rebooting=Rebooting..."));
string Reboot_Arg;
DataManager::GetValue("tw_reboot_arg", Reboot_Arg);
if (Reboot_Arg == "recovery")
diff --git a/twrpDU.cpp b/twrpDU.cpp
index 271dea87b..08dfdcbea 100644
--- a/twrpDU.cpp
+++ b/twrpDU.cpp
@@ -30,6 +30,7 @@ extern "C" {
#include <algorithm>
#include "twrpDU.hpp"
#include "twrp-functions.hpp"
+#include "gui/gui.hpp"
using namespace std;
@@ -73,8 +74,7 @@ uint64_t twrpDU::Get_Folder_Size(const string& Path) {
d = opendir(Path.c_str());
if (d == NULL) {
- LOGERR("error opening '%s'\n", Path.c_str());
- LOGERR("error: %s\n", strerror(errno));
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Path)(strerror(errno)));
return 0;
}
@@ -82,7 +82,8 @@ uint64_t twrpDU::Get_Folder_Size(const string& Path) {
FullPath = Path + "/";
FullPath += de->d_name;
if (lstat(FullPath.c_str(), &st)) {
- LOGERR("Unable to stat '%s'\n", FullPath.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(FullPath)(strerror(errno)));
+ LOGINFO("Real error: Unable to stat '%s'\n", FullPath.c_str());
continue;
}
if ((st.st_mode & S_IFDIR) && !check_skip_dirs(FullPath) && de->d_type != DT_SOCK) {
diff --git a/twrpDigest.cpp b/twrpDigest.cpp
index 8380d2c8b..fe0e06778 100644
--- a/twrpDigest.cpp
+++ b/twrpDigest.cpp
@@ -19,7 +19,6 @@
extern "C"
{
#include "digest/md5.h"
- #include "gui/gui.h"
#include "libcrecovery/common.h"
}
@@ -41,6 +40,7 @@ extern "C"
#include "twrp-functions.hpp"
#include "twrpDigest.hpp"
#include "set_metadata.h"
+#include "gui/gui.hpp"
using namespace std;
@@ -103,10 +103,10 @@ int twrpDigest::read_md5digest(void) {
}
if (!foundMd5File) {
- gui_print("Skipping MD5 check: no MD5 file found\n");
+ gui_msg("no_md5=Skipping MD5 check: no MD5 file found");
return -1;
} else if (TWFunc::read_file(md5file, line) != 0) {
- gui_print("Skipping MD5 check: MD5 file unreadable\n");
+ LOGERR("Skipping MD5 check: MD5 file unreadable %s\n", strerror(errno));
return 1;
}
@@ -139,10 +139,10 @@ int twrpDigest::verify_md5digest(void) {
md5string += hex;
}
if (tokens.at(0) != md5string) {
- LOGERR("MD5 does not match\n");
+ gui_err("md5_fail=MD5 does not match");
return -2;
}
- gui_print("MD5 matched\n");
+ gui_msg("md5_match=MD5 matched");
return 0;
}
diff --git a/twrpTar.cpp b/twrpTar.cpp
index b6e4410ae..968f3aaa6 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -45,6 +45,7 @@ extern "C" {
#ifndef BUILD_TWRPTAR_MAIN
#include "data.hpp"
#include "infomanager.hpp"
+#include "gui/gui.hpp"
extern "C" {
#include "set_metadata.h"
}
@@ -97,11 +98,13 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
file_count = 0;
if (pipe(progress_pipe) < 0) {
- LOGERR("Error creating progress tracking pipe\n");
+ LOGINFO("Error creating progress tracking pipe\n");
+ gui_err("backup_error=Error creating backup.");
return -1;
}
if ((tar_fork_pid = fork()) == -1) {
LOGINFO("create tar failed to fork.\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[0]);
close(progress_pipe[1]);
return -1;
@@ -139,7 +142,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
d = opendir(tardir.c_str());
if (d == NULL) {
- LOGERR("error opening '%s'\n", tardir.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tardir)(strerror(errno)));
close(progress_pipe[1]);
_exit(-1);
}
@@ -154,7 +157,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
if (userdata_encryption && ((item_len >= 3 && strncmp(de->d_name, "app", 3) == 0) || (item_len >= 6 && strncmp(de->d_name, "dalvik", 6) == 0))) {
ret = Generate_TarList(FileName, &RegularList, &target_size, &regular_thread_id);
if (ret < 0) {
- LOGERR("Error in Generate_TarList with regular list!\n");
+ LOGINFO("Error in Generate_TarList with regular list!\n");
+ gui_err("backup_error=Error creating backup.");
closedir(d);
close(progress_pipe_fd);
close(progress_pipe[1]);
@@ -186,7 +190,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
d = opendir(tardir.c_str());
if (d == NULL) {
- LOGERR("error opening '%s'\n", tardir.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tardir)(strerror(errno)));
close(progress_pipe[1]);
_exit(-1);
}
@@ -204,7 +208,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
FileName = tardir + "/" + de->d_name;
ret = Generate_TarList(FileName, &EncryptList, &target_size, &enc_thread_id);
if (ret < 0) {
- LOGERR("Error in Generate_TarList with encrypted list!\n");
+ LOGINFO("Error in Generate_TarList with encrypted list!\n");
+ gui_err("backup_error=Error creating backup.");
closedir(d);
close(progress_pipe[1]);
_exit(-1);
@@ -223,12 +228,13 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
}
closedir(d);
if (enc_thread_id != core_count) {
- LOGERR("Error dividing up threads for encryption, %u threads for %u cores!\n", enc_thread_id, core_count);
+ LOGINFO("Error dividing up threads for encryption, %u threads for %u cores!\n", enc_thread_id, core_count);
if (enc_thread_id > core_count) {
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
} else {
- LOGERR("Continuining anyway.");
+ LOGINFO("Continuining anyway.");
}
}
@@ -249,24 +255,28 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
reg.progress_pipe_fd = progress_pipe_fd;
LOGINFO("Creating unencrypted backup...\n");
if (createList((void*)&reg) != 0) {
- LOGERR("Error creating unencrypted backup.\n");
+ LOGINFO("Error creating unencrypted backup.\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
}
if (pthread_attr_init(&tattr)) {
- LOGERR("Unable to pthread_attr_init\n");
+ LOGINFO("Unable to pthread_attr_init\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE)) {
- LOGERR("Error setting pthread_attr_setdetachstate\n");
+ LOGINFO("Error setting pthread_attr_setdetachstate\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
if (pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM)) {
- LOGERR("Error setting pthread_attr_setscope\n");
+ LOGINFO("Error setting pthread_attr_setscope\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
@@ -291,7 +301,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
if (ret) {
LOGINFO("Unable to create %i thread for encryption! %i\nContinuing in same thread (backup will be slower).\n", i, ret);
if (createList((void*)&enc[i]) != 0) {
- LOGERR("Error creating encrypted backup %i.\n", i);
+ LOGINFO("Error creating encrypted backup %i.\n", i);
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
} else {
@@ -301,12 +312,13 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
usleep(100000); // Need a short delay before starting the next thread or the threads will never finish for some reason.
}
if (pthread_attr_destroy(&tattr)) {
- LOGERR("Failed to pthread_attr_destroy\n");
+ LOGINFO("Failed to pthread_attr_destroy\n");
}
for (i = start_thread_id; i <= core_count; i++) {
if (enc[i].thread_id == i) {
if (pthread_join(enc_thread[i], &thread_return)) {
- LOGERR("Error joining thread %i\n", i);
+ LOGINFO("Error joining thread %i\n", i);
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
} else {
@@ -314,7 +326,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
ret = (int)(intptr_t)thread_return;
if (ret != 0) {
thread_error = 1;
- LOGERR("Thread %i returned an error %i.\n", i, ret);
+ LOGINFO("Thread %i returned an error %i.\n", i, ret);
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
@@ -324,7 +337,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
}
}
if (thread_error) {
- LOGERR("Error returned by one or more threads.\n");
+ LOGINFO("Error returned by one or more threads.\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
@@ -342,7 +356,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
// Generate list of files to back up
ret = Generate_TarList(tardir, &FileList, &target_size, &thread_id);
if (ret < 0) {
- LOGERR("Error in Generate_TarList!\n");
+ LOGINFO("Error in Generate_TarList!\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
@@ -356,7 +371,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
reg.setsize(Total_Backup_Size);
reg.progress_pipe_fd = progress_pipe_fd;
if (Total_Backup_Size > MAX_ARCHIVE_SIZE) {
- gui_print("Breaking backup file into multiple archives...\n");
+ gui_msg("split_backup=Breaking backup file into multiple archives...");
reg.split_archives = 1;
} else {
reg.split_archives = 0;
@@ -365,7 +380,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
write(progress_pipe_fd, &file_count, sizeof(file_count));
write(progress_pipe_fd, &Total_Backup_Size, sizeof(Total_Backup_Size));
if (createList((void*)&reg) != 0) {
- LOGERR("Error creating backup.\n");
+ gui_err("backup_error=Error creating backup.");
close(progress_pipe[1]);
_exit(-1);
}
@@ -381,6 +396,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
char size_progress[1024];
files_backup = 0;
size_backup = 0;
+ string file_prog = gui_lookup("file_progress", "%llu of %llu files, %i%%");
+ string size_prog = gui_lookup("size_progress", "%lluMB of %lluMB, %i%%");
fork_pid = tar_fork_pid;
@@ -402,11 +419,11 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
files_backup++;
size_backup += fs;
display_percent = (double)(files_backup) / (double)(file_count) * 100;
- sprintf(file_progress, "%llu of %llu files, %i%%", files_backup, file_count, (int)(display_percent));
+ sprintf(file_progress, file_prog.c_str(), files_backup, file_count, (int)(display_percent));
#ifndef BUILD_TWRPTAR_MAIN
DataManager::SetValue("tw_file_progress", file_progress);
display_percent = (double)(size_backup + *other_backups_size) / (double)(*overall_size) * 100;
- sprintf(size_progress, "%lluMB of %lluMB, %i%%", (size_backup + *other_backups_size) / 1048576, *overall_size / 1048576, (int)(display_percent));
+ sprintf(size_progress, size_prog.c_str(), (size_backup + *other_backups_size) / 1048576, *overall_size / 1048576, (int)(display_percent));
DataManager::SetValue("tw_size_progress", size_progress);
progress_percent = (display_percent / 100);
DataManager::SetProgress((float)(progress_percent));
@@ -443,7 +460,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
int progress_pipe[2], ret;
if (pipe(progress_pipe) < 0) {
- LOGERR("Error creating progress tracking pipe\n");
+ LOGINFO("Error creating progress tracking pipe\n");
+ gui_err("restore_error=Error during restore process.");
return -1;
}
@@ -475,7 +493,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
temp = basefn + "%i%02i";
tarfn += "000";
if (!TWFunc::Path_Exists(tarfn)) {
- LOGERR("Unable to locate '%s' or '%s'\n", basefn.c_str(), tarfn.c_str());
+ LOGINFO("Unable to locate '%s' or '%s'\n", basefn.c_str(), tarfn.c_str());
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
@@ -485,7 +504,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
tars[0].thread_id = 0;
tars[0].progress_pipe_fd = progress_pipe_fd;
if (extractMulti((void*)&tars[0]) != 0) {
- LOGERR("Error extracting split archive.\n");
+ LOGINFO("Error extracting split archive.\n");
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
@@ -494,17 +514,20 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
}
// Start threading encrypted restores
if (pthread_attr_init(&tattr)) {
- LOGERR("Unable to pthread_attr_init\n");
+ LOGINFO("Unable to pthread_attr_init\n");
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE)) {
- LOGERR("Error setting pthread_attr_setdetachstate\n");
+ LOGINFO("Error setting pthread_attr_setdetachstate\n");
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
if (pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM)) {
- LOGERR("Error setting pthread_attr_setscope\n");
+ LOGINFO("Error setting pthread_attr_setscope\n");
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
@@ -526,7 +549,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
if (ret) {
LOGINFO("Unable to create %i thread for extraction! %i\nContinuing in same thread (restore will be slower).\n", i, ret);
if (extractMulti((void*)&tars[i]) != 0) {
- LOGERR("Error extracting backup in thread %i.\n", i);
+ LOGINFO("Error extracting backup in thread %i.\n", i);
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
} else {
@@ -541,7 +565,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
for (i = start_thread_id; i < thread_count + start_thread_id; i++) {
if (tars[i].thread_id == i) {
if (pthread_join(tar_thread[i], &thread_return)) {
- LOGERR("Error joining thread %i\n", i);
+ LOGINFO("Error joining thread %i\n", i);
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
} else {
@@ -549,7 +574,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
ret = (int)(intptr_t)thread_return;
if (ret != 0) {
thread_error = 1;
- LOGERR("Thread %i returned an error %i.\n", i, ret);
+ LOGINFO("Thread %i returned an error %i.\n", i, ret);
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
@@ -559,7 +585,8 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
}
}
if (thread_error) {
- LOGERR("Error returned by one or more threads.\n");
+ LOGINFO("Error returned by one or more threads.\n");
+ gui_err("restore_error=Error during restore process.");
close(progress_pipe_fd);
_exit(-1);
}
@@ -574,6 +601,7 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
double display_percent, progress_percent;
char size_progress[1024];
size_backup = 0;
+ string size_prog = gui_lookup("size_progress", "%lluMB of %lluMB, %i%%");
// Parent closes output side
close(progress_pipe[1]);
@@ -582,7 +610,7 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
while (read(progress_pipe[0], &fs, sizeof(fs)) > 0) {
size_backup += fs;
display_percent = (double)(size_backup + *other_backups_size) / (double)(*overall_size) * 100;
- sprintf(size_progress, "%lluMB of %lluMB, %i%%", (size_backup + *other_backups_size) / 1048576, *overall_size / 1048576, (int)(display_percent));
+ sprintf(size_progress, size_prog.c_str(), (size_backup + *other_backups_size) / 1048576, *overall_size / 1048576, (int)(display_percent));
progress_percent = (display_percent / 100);
#ifndef BUILD_TWRPTAR_MAIN
DataManager::SetValue("tw_size_progress", size_progress);
@@ -621,7 +649,7 @@ int twrpTar::Generate_TarList(string Path, std::vector<TarListStruct> *TarList,
d = opendir(Path.c_str());
if (d == NULL) {
- LOGERR("Error opening '%s' -- error: %s\n", Path.c_str(), strerror(errno));
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Path)(strerror(errno)));
closedir(d);
return -1;
}
@@ -660,11 +688,13 @@ int twrpTar::extractTar() {
if (openTar() == -1)
return -1;
if (tar_extract_all(t, charRootDir, &progress_pipe_fd) != 0) {
- LOGERR("Unable to extract tar archive '%s'\n", tarfn.c_str());
+ LOGINFO("Unable to extract tar archive '%s'\n", tarfn.c_str());
+ gui_err("restore_error=Error during restore process.");
return -1;
}
if (tar_close(t) != 0) {
- LOGERR("Unable to close tar file\n");
+ LOGINFO("Unable to close tar file\n");
+ gui_err("restore_error=Error during restore process.");
return -1;
}
return 0;
@@ -681,11 +711,12 @@ int twrpTar::extract() {
} else if (Archive_Current_Type == 2) {
int ret = TWFunc::Try_Decrypting_File(tarfn, password);
if (ret < 1) {
- LOGERR("Failed to decrypt tar file '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "fail_decrypt_tar=Failed to decrypt tar file '{1}'")(tarfn));
return -1;
}
if (ret == 1) {
- LOGERR("Decrypted file is not in tar format.\n");
+ LOGINFO("Decrypted file is not in tar format.\n");
+ gui_err("restore_error=Error during restore process.");
return -1;
}
if (ret == 3) {
@@ -720,7 +751,8 @@ int twrpTar::tarList(std::vector<TarListStruct> *TarList, unsigned thread_id) {
}
LOGINFO("Creating tar file '%s'\n", tarfn.c_str());
if (createTar() != 0) {
- LOGERR("Error creating tar '%s' for thread %i\n", tarfn.c_str(), thread_id);
+ LOGINFO("Error creating tar '%s' for thread %i\n", tarfn.c_str(), thread_id);
+ gui_err("backup_error=Error creating backup.");
return -2;
}
Archive_Current_Size = 0;
@@ -733,19 +765,22 @@ int twrpTar::tarList(std::vector<TarListStruct> *TarList, unsigned thread_id) {
fs = (unsigned long long)(st.st_size);
if (split_archives && Archive_Current_Size + fs > MAX_ARCHIVE_SIZE) {
if (closeTar() != 0) {
- LOGERR("Error closing '%s' on thread %i\n", tarfn.c_str(), thread_id);
+ LOGINFO("Error closing '%s' on thread %i\n", tarfn.c_str(), thread_id);
+ gui_err("backup_error=Error creating backup.");
return -3;
}
archive_count++;
- gui_print("Splitting thread ID %i into archive %i\n", thread_id, archive_count + 1);
+ gui_msg(Msg("split_thread=Splitting thread ID {1} into archive {2}")(thread_id)(archive_count + 1));
if (archive_count > 99) {
- LOGERR("Too many archives for thread %i\n", thread_id);
+ LOGINFO("Too many archives for thread %i\n", thread_id);
+ gui_err("backup_error=Error creating backup.");
return -4;
}
sprintf(actual_filename, temp.c_str(), thread_id, archive_count);
tarfn = actual_filename;
if (createTar() != 0) {
- LOGERR("Error creating tar '%s' for thread %i\n", tarfn.c_str(), thread_id);
+ LOGINFO("Error creating tar '%s' for thread %i\n", tarfn.c_str(), thread_id);
+ gui_err("backup_error=Error creating backup.");
return -2;
}
Archive_Current_Size = 0;
@@ -755,14 +790,16 @@ int twrpTar::tarList(std::vector<TarListStruct> *TarList, unsigned thread_id) {
}
LOGINFO("addFile '%s' including root: %i\n", buf, include_root_dir);
if (addFile(buf, include_root_dir) != 0) {
- LOGERR("Error adding file '%s' to '%s'\n", buf, tarfn.c_str());
+ LOGINFO("Error adding file '%s' to '%s'\n", buf, tarfn.c_str());
+ gui_err("backup_error=Error creating backup.");
return -1;
}
}
i++;
}
if (closeTar() != 0) {
- LOGERR("Error closing '%s' on thread %i\n", tarfn.c_str(), thread_id);
+ LOGINFO("Error closing '%s' on thread %i\n", tarfn.c_str(), thread_id);
+ gui_err("backup_error=Error creating backup.");
return -3;
}
LOGINFO("Thread id %i tarList done, %i archives.\n", thread_id, archive_count);
@@ -834,16 +871,18 @@ int twrpTar::createTar() {
int i, pipes[4];
if (pipe(pipes) < 0) {
- LOGERR("Error creating first pipe\n");
+ LOGINFO("Error creating first pipe\n");
+ gui_err("backup_error=Error creating backup.");
return -1;
}
if (pipe(pipes + 2) < 0) {
- LOGERR("Error creating second pipe\n");
+ LOGINFO("Error creating second pipe\n");
+ gui_err("backup_error=Error creating backup.");
return -1;
}
int output_fd = open(tarfn.c_str(), O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (output_fd < 0) {
- LOGERR("Failed to open '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tarfn)(strerror(errno)));
for (i = 0; i < 4; i++)
close(pipes[i]); // close all
return -1;
@@ -851,7 +890,8 @@ int twrpTar::createTar() {
pigz_pid = fork();
if (pigz_pid < 0) {
- LOGERR("pigz fork() failed\n");
+ LOGINFO("pigz fork() failed\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
for (i = 0; i < 4; i++)
close(pipes[i]); // close all
@@ -865,7 +905,8 @@ int twrpTar::createTar() {
close(1);
dup2(pipes[3], 1);
if (execlp("pigz", "pigz", "-", NULL) < 0) {
- LOGERR("execlp pigz ERROR!\n");
+ LOGINFO("execlp pigz ERROR!\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
close(pipes[0]);
close(pipes[3]);
@@ -876,7 +917,8 @@ int twrpTar::createTar() {
oaes_pid = fork();
if (oaes_pid < 0) {
- LOGERR("openaes fork() failed\n");
+ LOGINFO("openaes fork() failed\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
for (i = 0; i < 4; i++)
close(pipes[i]); // close all
@@ -891,7 +933,8 @@ int twrpTar::createTar() {
close(1);
dup2(output_fd, 1);
if (execlp("openaes", "openaes", "enc", "--key", password.c_str(), NULL) < 0) {
- LOGERR("execlp openaes ERROR!\n");
+ LOGINFO("execlp openaes ERROR!\n");
+ gui_err("backup_error=Error creating backup.");
close(pipes[2]);
close(output_fd);
_exit(-1);
@@ -904,7 +947,8 @@ int twrpTar::createTar() {
fd = pipes[1];
if(tar_fdopen(&t, fd, charRootDir, NULL, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
close(fd);
- LOGERR("tar_fdopen failed\n");
+ LOGINFO("tar_fdopen failed\n");
+ gui_err("backup_error=Error creating backup.");
return -1;
}
return 0;
@@ -917,20 +961,22 @@ int twrpTar::createTar() {
int pigzfd[2];
int output_fd = open(tarfn.c_str(), O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (output_fd < 0) {
- LOGERR("Failed to open '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tarfn)(strerror(errno)));
close(pigzfd[0]);
return -1;
}
if (pipe(pigzfd) < 0) {
- LOGERR("Error creating pipe\n");
+ LOGINFO("Error creating pipe\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
return -1;
}
pigz_pid = fork();
if (pigz_pid < 0) {
- LOGERR("fork() failed\n");
+ LOGINFO("fork() failed\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
close(pigzfd[0]);
close(pigzfd[1]);
@@ -941,7 +987,8 @@ int twrpTar::createTar() {
dup2(pigzfd[0], 0); // remap stdin
dup2(output_fd, 1); // remap stdout to output file
if (execlp("pigz", "pigz", "-", NULL) < 0) {
- LOGERR("execlp pigz ERROR!\n");
+ LOGINFO("execlp pigz ERROR!\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
close(pigzfd[0]);
_exit(-1);
@@ -952,7 +999,8 @@ int twrpTar::createTar() {
fd = pigzfd[1]; // copy parent output
if(tar_fdopen(&t, fd, charRootDir, NULL, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
close(fd);
- LOGERR("tar_fdopen failed\n");
+ LOGINFO("tar_fdopen failed\n");
+ gui_err("backup_error=Error creating backup.");
return -1;
}
}
@@ -963,18 +1011,20 @@ int twrpTar::createTar() {
int oaesfd[2];
int output_fd = open(tarfn.c_str(), O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (output_fd < 0) {
- LOGERR("Failed to open '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tarfn)(strerror(errno)));
return -1;
}
if (pipe(oaesfd) < 0) {
- LOGERR("Error creating pipe\n");
+ LOGINFO("Error creating pipe\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
return -1;
}
oaes_pid = fork();
if (oaes_pid < 0) {
- LOGERR("fork() failed\n");
+ LOGINFO("fork() failed\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
close(oaesfd[0]);
close(oaesfd[1]);
@@ -985,7 +1035,8 @@ int twrpTar::createTar() {
dup2(oaesfd[0], 0); // remap stdin
dup2(output_fd, 1); // remap stdout to output file
if (execlp("openaes", "openaes", "enc", "--key", password.c_str(), NULL) < 0) {
- LOGERR("execlp openaes ERROR!\n");
+ LOGINFO("execlp openaes ERROR!\n");
+ gui_err("backup_error=Error creating backup.");
close(output_fd);
close(oaesfd[0]);
_exit(-1);
@@ -996,7 +1047,8 @@ int twrpTar::createTar() {
fd = oaesfd[1]; // copy parent output
if(tar_fdopen(&t, fd, charRootDir, NULL, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
close(fd);
- LOGERR("tar_fdopen failed\n");
+ LOGINFO("tar_fdopen failed\n");
+ gui_err("backup_error=Error creating backup.");
return -1;
}
return 0;
@@ -1005,7 +1057,8 @@ int twrpTar::createTar() {
// Not compressed or encrypted
init_libtar_buffer(0);
if (tar_open(&t, charTarFile, &type, O_WRONLY | O_CREAT | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) == -1) {
- LOGERR("tar_open error opening '%s'\n", tarfn.c_str());
+ LOGINFO("tar_open error opening '%s'\n", tarfn.c_str());
+ gui_err("backup_error=Error creating backup.");
return -1;
}
}
@@ -1022,17 +1075,19 @@ int twrpTar::openTar() {
int i, pipes[4];
int input_fd = open(tarfn.c_str(), O_RDONLY | O_LARGEFILE);
if (input_fd < 0) {
- LOGERR("Failed to open '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tarfn)(strerror(errno)));
return -1;
}
if (pipe(pipes) < 0) {
- LOGERR("Error creating first pipe\n");
+ LOGINFO("Error creating first pipe\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
return -1;
}
if (pipe(pipes + 2) < 0) {
- LOGERR("Error creating second pipe\n");
+ LOGINFO("Error creating second pipe\n");
+ gui_err("restore_error=Error during restore process.");
close(pipes[0]);
close(pipes[1]);
close(input_fd);
@@ -1041,7 +1096,8 @@ int twrpTar::openTar() {
oaes_pid = fork();
if (oaes_pid < 0) {
- LOGERR("pigz fork() failed\n");
+ LOGINFO("pigz fork() failed\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
for (i = 0; i < 4; i++)
close(pipes[i]); // close all
@@ -1056,7 +1112,8 @@ int twrpTar::openTar() {
close(1);
dup2(pipes[1], 1);
if (execlp("openaes", "openaes", "dec", "--key", password.c_str(), NULL) < 0) {
- LOGERR("execlp openaes ERROR!\n");
+ LOGINFO("execlp openaes ERROR!\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
close(pipes[1]);
_exit(-1);
@@ -1066,7 +1123,8 @@ int twrpTar::openTar() {
pigz_pid = fork();
if (pigz_pid < 0) {
- LOGERR("openaes fork() failed\n");
+ LOGINFO("openaes fork() failed\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
for (i = 0; i < 4; i++)
close(pipes[i]); // close all
@@ -1080,7 +1138,8 @@ int twrpTar::openTar() {
close(1);
dup2(pipes[3], 1);
if (execlp("pigz", "pigz", "-d", "-c", NULL) < 0) {
- LOGERR("execlp pigz ERROR!\n");
+ LOGINFO("execlp pigz ERROR!\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
close(pipes[0]);
close(pipes[3]);
@@ -1094,7 +1153,8 @@ int twrpTar::openTar() {
fd = pipes[2];
if(tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
close(fd);
- LOGERR("tar_fdopen failed\n");
+ LOGINFO("tar_fdopen failed\n");
+ gui_err("restore_error=Error during restore process.");
return -1;
}
}
@@ -1104,19 +1164,21 @@ int twrpTar::openTar() {
int oaesfd[2];
int input_fd = open(tarfn.c_str(), O_RDONLY | O_LARGEFILE);
if (input_fd < 0) {
- LOGERR("Failed to open '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tarfn)(strerror(errno)));
return -1;
}
if (pipe(oaesfd) < 0) {
- LOGERR("Error creating pipe\n");
+ LOGINFO("Error creating pipe\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
return -1;
}
oaes_pid = fork();
if (oaes_pid < 0) {
- LOGERR("fork() failed\n");
+ LOGINFO("fork() failed\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
close(oaesfd[0]);
close(oaesfd[1]);
@@ -1128,7 +1190,8 @@ int twrpTar::openTar() {
dup2(oaesfd[1], 1); // remap stdout
dup2(input_fd, 0); // remap input fd to stdin
if (execlp("openaes", "openaes", "dec", "--key", password.c_str(), NULL) < 0) {
- LOGERR("execlp openaes ERROR!\n");
+ LOGINFO("execlp openaes ERROR!\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
close(oaesfd[1]);
_exit(-1);
@@ -1139,7 +1202,8 @@ int twrpTar::openTar() {
fd = oaesfd[0]; // copy parent input
if(tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
close(fd);
- LOGERR("tar_fdopen failed\n");
+ LOGINFO("tar_fdopen failed\n");
+ gui_err("restore_error=Error during restore process.");
return -1;
}
}
@@ -1148,18 +1212,20 @@ int twrpTar::openTar() {
int pigzfd[2];
int input_fd = open(tarfn.c_str(), O_RDONLY | O_LARGEFILE);
if (input_fd < 0) {
- LOGERR("Failed to open '%s'\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(tarfn)(strerror(errno)));
return -1;
}
if (pipe(pigzfd) < 0) {
- LOGERR("Error creating pipe\n");
+ LOGINFO("Error creating pipe\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
return -1;
}
pigz_pid = fork();
if (pigz_pid < 0) {
- LOGERR("fork() failed\n");
+ LOGINFO("fork() failed\n");
+ gui_err("restore_error=Error during restore process.");
close(input_fd);
close(pigzfd[0]);
close(pigzfd[1]);
@@ -1172,7 +1238,8 @@ int twrpTar::openTar() {
if (execlp("pigz", "pigz", "-d", "-c", NULL) < 0) {
close(pigzfd[1]);
close(input_fd);
- LOGERR("execlp openaes ERROR!\n");
+ LOGINFO("execlp openaes ERROR!\n");
+ gui_err("restore_error=Error during restore process.");
_exit(-1);
}
} else {
@@ -1181,12 +1248,14 @@ int twrpTar::openTar() {
fd = pigzfd[0]; // copy parent input
if(tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
close(fd);
- LOGERR("tar_fdopen failed\n");
+ LOGINFO("tar_fdopen failed\n");
+ gui_err("restore_error=Error during restore process.");
return -1;
}
}
} else if (tar_open(&t, charTarFile, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TAR_GNU | TAR_STORE_SELINUX) != 0) {
- LOGERR("Unable to open tar archive '%s'\n", charTarFile);
+ LOGINFO("Unable to open tar archive '%s'\n", charTarFile);
+ gui_err("restore_error=Error during restore process.");
return -1;
}
return 0;
@@ -1229,12 +1298,12 @@ int twrpTar::addFile(string fn, bool include_root) {
int twrpTar::closeTar() {
flush_libtar_buffer(t->fd);
if (tar_append_eof(t) != 0) {
- LOGERR("tar_append_eof(): %s\n", strerror(errno));
+ LOGINFO("tar_append_eof(): %s\n", strerror(errno));
tar_close(t);
return -1;
}
if (tar_close(t) != 0) {
- LOGERR("Unable to close tar archive: '%s'\n", tarfn.c_str());
+ LOGINFO("Unable to close tar archive: '%s'\n", tarfn.c_str());
return -1;
}
if (Archive_Current_Type > 0) {
@@ -1253,7 +1322,7 @@ int twrpTar::closeTar() {
}
}
if (TWFunc::Get_File_Size(tarfn) == 0) {
- LOGERR("Backup file size for '%s' is 0 bytes.\n", tarfn.c_str());
+ gui_msg(Msg(msg::kError, "backup_size=Backup file size for '%s' is 0 bytes.")(tarfn));
return -1;
}
#ifndef BUILD_TWRPTAR_MAIN
@@ -1373,7 +1442,7 @@ unsigned long long twrpTar::uncompressedSize(string filename, int *archive_type)
int ret = TWFunc::Try_Decrypting_File(filename, password);
*archive_type = 2;
if (ret < 1) {
- LOGERR("Failed to decrypt tar file '%s'\n", filename.c_str());
+ gui_msg(Msg(msg::kError, "fail_decrypt_tar=Failed to decrypt tar file '{1}'")(tarfn));
total_size = TWFunc::Get_File_Size(filename);
} else if (ret == 1) {
LOGERR("Decrypted file is not in tar format.\n");