Translations

This commit is contained in:
serso 2016-02-26 23:28:29 +01:00
parent 922b9d7d2a
commit 6d1357e15d
36 changed files with 215 additions and 174 deletions

View File

@ -43,7 +43,7 @@ public class BasePlotTest {
}
onView(withId(R.id.function_body)).perform(typeText(function.getBody()));
onView(withText(R.string.ok)).perform(click());
onView(withText(R.string.cpp_done)).perform(click());
}
protected final void openFunctionEditor() {

View File

@ -26,27 +26,19 @@ import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v7.app.AlertDialog;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.*;
import android.widget.TextView;
import com.squareup.otto.Bus;
import org.solovyev.android.calculator.converter.ConverterFragment;
import org.solovyev.android.calculator.jscl.JsclOperation;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.squareup.otto.Bus;
import jscl.NumeralBase;
import jscl.math.Generic;
import org.solovyev.android.calculator.converter.ConverterFragment;
import org.solovyev.android.calculator.jscl.JsclOperation;
import javax.annotation.Nonnull;
import javax.inject.Inject;
@ -182,7 +174,7 @@ public class DisplayFragment extends BaseFragment implements View.OnClickListene
final AlertDialog.Builder builder =
new AlertDialog.Builder(context, App.getTheme().alertDialogTheme)
.setPositiveButton(R.string.c_cancel, null)
.setPositiveButton(R.string.cpp_cancel, null)
.setView(errorMessageView);
builder.create().show();

View File

@ -17,33 +17,10 @@ import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseDialogFragment;
import org.solovyev.android.calculator.Clipboard;
import org.solovyev.android.calculator.Editor;
import org.solovyev.android.calculator.R;
import android.widget.*;
import butterknife.Bind;
import butterknife.ButterKnife;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.solovyev.android.calculator.*;
import javax.annotation.Nonnull;
import javax.inject.Inject;
@ -51,6 +28,9 @@ import javax.measure.unit.Dimension;
import javax.measure.unit.NonSI;
import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.*;
public class ConverterFragment extends BaseDialogFragment
implements AdapterView.OnItemSelectedListener, View.OnFocusChangeListener, TextView.OnEditorActionListener, View.OnClickListener, TextWatcher {
@ -143,7 +123,7 @@ public class ConverterFragment extends BaseDialogFragment
@Override
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
builder.setPositiveButton(R.string.c_use, null);
builder.setNegativeButton(R.string.c_cancel, null);
builder.setNegativeButton(R.string.cpp_cancel, null);
builder.setNeutralButton(R.string.c_copy, null);
}

View File

@ -47,7 +47,7 @@ public class FloatingCalculatorActivity extends AppCompatActivity {
final String permission = getString(R.string.cpp_permission_overlay);
builder.setMessage(getString(R.string.cpp_missing_permission_msg, permission));
builder.setTitle(R.string.cpp_missing_permission_title);
builder.setPositiveButton(R.string.ok, null);
builder.setPositiveButton(android.R.string.ok, null);
}
@Override

View File

@ -33,42 +33,20 @@ import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.TextUtils;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.*;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseDialogFragment;
import org.solovyev.android.calculator.Calculator;
import org.solovyev.android.calculator.Engine;
import org.solovyev.android.calculator.FloatingCalculatorKeyboard;
import org.solovyev.android.calculator.Keyboard;
import org.solovyev.android.calculator.ParseException;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.VariablesRegistry;
import butterknife.Bind;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.*;
import org.solovyev.android.calculator.keyboard.FloatingKeyboardWindow;
import org.solovyev.android.calculator.view.EditTextCompat;
import org.solovyev.common.math.MathRegistry;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.ButterKnife;
import java.util.*;
import static org.solovyev.android.calculator.functions.CppFunction.NO_ID;
@ -132,8 +110,8 @@ public abstract class BaseFunctionFragment extends BaseDialogFragment implements
@Override
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
builder.setNegativeButton(R.string.c_cancel, null);
builder.setPositiveButton(R.string.ok, null);
builder.setNegativeButton(R.string.cpp_cancel, null);
builder.setPositiveButton(R.string.cpp_done, null);
builder.setTitle(isNewFunction() ? R.string.function_create_function :
R.string.function_edit_function);
}

View File

@ -8,7 +8,7 @@ import android.support.annotation.NonNull;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AlertDialog;
import jscl.math.function.Function;
import org.solovyev.android.Activities;
import org.solovyev.android.Check;
import org.solovyev.android.calculator.App;
@ -19,8 +19,6 @@ import org.solovyev.android.calculator.entities.EntityRemovalDialog;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import jscl.math.function.Function;
public class EditFunctionFragment extends BaseFunctionFragment {
public EditFunctionFragment() {
@ -61,7 +59,7 @@ public class EditFunctionFragment extends BaseFunctionFragment {
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
super.onPrepareDialog(builder);
if (!isNewFunction()) {
builder.setNeutralButton(R.string.c_remove, null);
builder.setNeutralButton(R.string.cpp_delete, null);
}
}

View File

@ -26,15 +26,11 @@ import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentActivity;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.*;
import com.squareup.otto.Bus;
import com.squareup.otto.Subscribe;
import jscl.math.function.Function;
import jscl.math.function.IFunction;
import org.solovyev.android.Check;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.Calculator;
@ -43,15 +39,11 @@ import org.solovyev.android.calculator.entities.BaseEntitiesFragment;
import org.solovyev.android.calculator.entities.Category;
import org.solovyev.android.calculator.entities.EntityRemovalDialog;
import jscl.math.function.Function;
import jscl.math.function.IFunction;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;
public class FunctionsFragment extends BaseEntitiesFragment<Function> {
@ -79,8 +71,8 @@ public class FunctionsFragment extends BaseEntitiesFragment<Function> {
protected void onCreateContextMenu(@Nonnull ContextMenu menu, @Nonnull Function function, @NonNull MenuItem.OnMenuItemClickListener listener) {
addMenu(menu, R.string.c_use, listener);
if (!function.isSystem()) {
addMenu(menu, R.string.c_edit, listener);
addMenu(menu, R.string.c_remove, listener);
addMenu(menu, R.string.cpp_edit, listener);
addMenu(menu, R.string.cpp_delete, listener);
}
}
@ -91,13 +83,13 @@ public class FunctionsFragment extends BaseEntitiesFragment<Function> {
case R.string.c_use:
onClick(function);
return true;
case R.string.c_edit:
case R.string.cpp_edit:
if (function instanceof IFunction) {
EditFunctionFragment.show(CppFunction.builder((IFunction) function).build(),
activity.getSupportFragmentManager());
}
return true;
case R.string.c_remove:
case R.string.cpp_delete:
EntityRemovalDialog.showForFunction(getActivity(), function.getName(), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

View File

@ -186,8 +186,8 @@ public abstract class BaseHistoryFragment extends BaseFragment {
if (shouldHaveCopyResult(state)) {
addMenu(menu, R.string.c_copy_result, this);
}
addMenu(menu, R.string.c_edit, this);
addMenu(menu, R.string.c_remove, this);
addMenu(menu, R.string.cpp_edit, this);
addMenu(menu, R.string.cpp_delete, this);
}
}
@ -210,13 +210,13 @@ public abstract class BaseHistoryFragment extends BaseFragment {
case R.string.c_copy_result:
copyResult(state);
return true;
case R.string.c_edit:
case R.string.cpp_edit:
EditHistoryFragment.show(state, false, getFragmentManager());
return true;
case R.string.c_save:
EditHistoryFragment.show(state, true, getFragmentManager());
return true;
case R.string.c_remove:
case R.string.cpp_delete:
history.removeSaved(state);
return true;
}

View File

@ -71,7 +71,7 @@ public class EditHistoryFragment extends BaseDialogFragment {
@Override
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
builder.setNegativeButton(R.string.c_cancel, null);
builder.setNegativeButton(R.string.cpp_cancel, null);
builder.setPositiveButton(R.string.c_save, null);
}

View File

@ -22,8 +22,6 @@
package org.solovyev.android.calculator.history;
import static org.solovyev.android.calculator.FragmentTab.saved_history;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
@ -31,17 +29,14 @@ import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.View;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseActivity;
import org.solovyev.android.calculator.FragmentTab;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.*;
import org.solovyev.android.calculator.view.Tabs;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import static org.solovyev.android.calculator.FragmentTab.saved_history;
public class HistoryActivity extends BaseActivity {
public static class Dialog extends HistoryActivity {
@ -96,7 +91,7 @@ public class HistoryActivity extends BaseActivity {
}
}
})
.setNegativeButton(R.string.c_cancel, null)
.setNegativeButton(R.string.cpp_cancel, null)
.create()
.show();
}

View File

@ -11,13 +11,10 @@ import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.RecyclerView;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.*;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseDialogFragment;
@ -29,13 +26,9 @@ import org.solovyev.android.plotter.Plotter;
import org.solovyev.android.views.llm.DividerItemDecoration;
import org.solovyev.android.views.llm.LinearLayoutManager;
import java.util.List;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.ButterKnife;
import java.util.List;
import static android.support.v7.widget.LinearLayoutManager.VERTICAL;
import static android.view.Menu.NONE;
@ -71,7 +64,7 @@ public class PlotFunctionsFragment extends BaseDialogFragment {
@NonNull
protected RecyclerView onCreateDialogView(@NonNull Context context, @NonNull LayoutInflater inflater, Bundle savedInstanceState) {
@SuppressLint("InflateParams") final RecyclerView view = (RecyclerView) inflater.inflate(R.layout.dialog_functions, null);
@SuppressLint("InflateParams") final RecyclerView view = (RecyclerView) inflater.inflate(R.layout.fragment_functions, null);
final LinearLayoutManager layoutManager = new LinearLayoutManager(context, VERTICAL, false);
final int itemHeight = context.getResources().getDimensionPixelSize(R.dimen.list_item_height);
@ -99,8 +92,8 @@ public class PlotFunctionsFragment extends BaseDialogFragment {
}
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
builder.setPositiveButton(android.R.string.ok, null);
builder.setNeutralButton("Add", null);
builder.setPositiveButton(R.string.cpp_close, null);
builder.setNeutralButton(R.string.cpp_add, null);
}
@Override
@ -144,12 +137,12 @@ public class PlotFunctionsFragment extends BaseDialogFragment {
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
menu.add(NONE, R.string.c_remove, NONE, R.string.c_remove).setOnMenuItemClickListener(this);
menu.add(NONE, R.string.cpp_delete, NONE, R.string.cpp_delete).setOnMenuItemClickListener(this);
}
@Override
public boolean onMenuItemClick(MenuItem item) {
if (function != null && item.getItemId() == R.string.c_remove) {
if (function != null && item.getItemId() == R.string.cpp_delete) {
plotter.remove(function);
return true;
}
@ -168,7 +161,7 @@ public class PlotFunctionsFragment extends BaseDialogFragment {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
final LayoutInflater inflater = LayoutInflater.from(parent.getContext());
return new ViewHolder(inflater.inflate(R.layout.dialog_functions_function, parent, false));
return new ViewHolder(inflater.inflate(R.layout.fragment_functions_function, parent, false));
}
@Override

View File

@ -22,8 +22,6 @@
package org.solovyev.android.calculator.variables;
import static org.solovyev.android.calculator.variables.CppVariable.NO_ID;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.DialogInterface;
@ -43,17 +41,12 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.PopupWindow;
import butterknife.Bind;
import butterknife.ButterKnife;
import jscl.math.function.IConstant;
import org.solovyev.android.Activities;
import org.solovyev.android.Check;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseDialogFragment;
import org.solovyev.android.calculator.Calculator;
import org.solovyev.android.calculator.Engine;
import org.solovyev.android.calculator.Keyboard;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.VariablesRegistry;
import org.solovyev.android.calculator.*;
import org.solovyev.android.calculator.entities.EntityRemovalDialog;
import org.solovyev.android.calculator.functions.FunctionsRegistry;
import org.solovyev.android.calculator.keyboard.FloatingKeyboard;
@ -62,16 +55,13 @@ import org.solovyev.android.calculator.math.MathType;
import org.solovyev.android.calculator.view.EditTextCompat;
import org.solovyev.common.text.Strings;
import butterknife.Bind;
import butterknife.ButterKnife;
import jscl.math.function.IConstant;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import java.util.Arrays;
import java.util.List;
import static org.solovyev.android.calculator.variables.CppVariable.NO_ID;
public class EditVariableFragment extends BaseDialogFragment implements View.OnFocusChangeListener, View.OnKeyListener, View.OnClickListener {
@ -160,11 +150,11 @@ public class EditVariableFragment extends BaseDialogFragment implements View.OnF
@Override
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
builder.setNegativeButton(R.string.c_cancel, null);
builder.setPositiveButton(R.string.ok, null);
builder.setNegativeButton(R.string.cpp_cancel, null);
builder.setPositiveButton(R.string.cpp_done, null);
builder.setTitle(isNewVariable() ? R.string.c_var_create_var : R.string.c_var_edit_var);
if (!isNewVariable()) {
builder.setNeutralButton(R.string.c_remove, null);
builder.setNeutralButton(R.string.cpp_delete, null);
}
}

View File

@ -107,12 +107,12 @@ public class VariablesFragment extends BaseEntitiesFragment<IConstant> {
protected void onCreateContextMenu(@Nonnull ContextMenu menu, @Nonnull IConstant variable, @Nonnull MenuItem.OnMenuItemClickListener listener) {
addMenu(menu, R.string.c_use, listener);
if (!variable.isSystem()) {
addMenu(menu, R.string.c_edit, listener);
addMenu(menu, R.string.c_remove, listener);
addMenu(menu, R.string.cpp_edit, listener);
addMenu(menu, R.string.cpp_delete, listener);
}
if (!Strings.isEmpty(variable.getValue())) {
addMenu(menu, R.string.c_copy_value, listener);
addMenu(menu, R.string.cpp_copy_text, listener);
}
}
@ -123,10 +123,10 @@ public class VariablesFragment extends BaseEntitiesFragment<IConstant> {
case R.string.c_use:
onClick(variable);
return true;
case R.string.c_edit:
case R.string.cpp_edit:
EditVariableFragment.showDialog(CppVariable.builder(variable).build(), activity);
return true;
case R.string.c_remove:
case R.string.cpp_delete:
EntityRemovalDialog.showForVariable(getActivity(), variable.getName(), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
@ -135,7 +135,7 @@ public class VariablesFragment extends BaseEntitiesFragment<IConstant> {
}
});
return true;
case R.string.c_copy_value:
case R.string.cpp_copy_text:
copyText(variable.getValue());
return true;
}

View File

@ -52,7 +52,7 @@
a:id="@+id/function_body"
a:layout_width="match_parent"
a:layout_height="wrap_content"
a:hint="@string/c_function_value"
a:hint="@string/cpp_function_body"
a:imeOptions="flagNoExtractUi"
a:inputType="text" />
</android.support.design.widget.TextInputLayout>
@ -66,7 +66,7 @@
a:id="@+id/function_description"
a:layout_width="match_parent"
a:layout_height="wrap_content"
a:hint="@string/c_function_description"
a:hint="@string/cpp_description"
a:inputType="textMultiLine"
a:maxLines="4" />
</android.support.design.widget.TextInputLayout>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">إنشاء</string>
<string name="cpp_close">إغلاق</string>
<string name="cpp_switch">تبديل</string>
<string name="cpp_add">إضافة</string>
<string name="cpp_edit">تعديل</string>
<string name="cpp_delete">حذف</string>
<string name="cpp_save">تم</string>
<string name="cpp_done">تم</string>
<string name="cpp_cancel">إلغاء</string>
<string name="cpp_description">الوصف</string>
<string name="cpp_copy_text">نسخ إلى الحافظة</string>
<string name="cpp_text_copied">تم نسخ النص</string>
<string name="cpp_name">الاسم</string>
<string name="cpp_nan">ليس رقمًا</string>
<string name="cpp_error">خطأ</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Vytvořit</string>
<string name="cpp_close">Zavřít</string>
<string name="cpp_switch">Přepnout</string>
<string name="cpp_add">Přidat</string>
<string name="cpp_edit">Upravit</string>
<string name="cpp_delete">Smazat</string>
<string name="cpp_save">Hotovo</string>
<string name="cpp_done">Hotovo</string>
<string name="cpp_cancel">Zrušit</string>
<string name="cpp_description">Popis</string>
<string name="cpp_copy_text">Zkopírovat do schránky</string>
<string name="cpp_text_copied">Text zkopírován</string>
<string name="cpp_name">Jméno</string>
<string name="cpp_nan">Není číslo</string>
<string name="cpp_error">Chyba</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Erstellen</string>
<string name="cpp_close">Schließen</string>
<string name="cpp_switch">Wechseln</string>
<string name="cpp_add">Hinzufügen</string>
<string name="cpp_edit">Bearbeiten</string>
<string name="cpp_delete">Löschen</string>
<string name="cpp_save">Fertig</string>
<string name="cpp_done">Fertig</string>
<string name="cpp_cancel">Abbrechen</string>
<string name="cpp_description">Beschreibung</string>
<string name="cpp_copy_text">In Zwischenablage kopieren</string>
<string name="cpp_text_copied">Text kopiert</string>
<string name="cpp_name">Name</string>
<string name="cpp_nan">Keine Zahl</string>
<string name="cpp_error">Fehler</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Crear</string>
<string name="cpp_close">Cerrar</string>
<string name="cpp_switch">Cambiar</string>
<string name="cpp_add">Añadir</string>
<string name="cpp_edit">Editar</string>
<string name="cpp_delete">Eliminar</string>
<string name="cpp_save">Listo</string>
<string name="cpp_done">Listo</string>
<string name="cpp_cancel">Cancelar</string>
<string name="cpp_description">Descripción</string>
<string name="cpp_copy_text">Copiar en el portapapeles</string>
<string name="cpp_text_copied">Texto copiado</string>
<string name="cpp_name">Nombre</string>
<string name="cpp_nan">No es un número</string>
<string name="cpp_error">Error</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Luo</string>
<string name="cpp_close">Sulje</string>
<string name="cpp_switch">Vaihda</string>
<string name="cpp_add">Lisää</string>
<string name="cpp_edit">Muokkaa</string>
<string name="cpp_delete">Poista</string>
<string name="cpp_save">Valmis</string>
<string name="cpp_done">Valmis</string>
<string name="cpp_cancel">Peruuta</string>
<string name="cpp_description">Kuvaus</string>
<string name="cpp_copy_text">Kopioi leikepöydälle</string>
<string name="cpp_text_copied">Teksti kopioitu</string>
<string name="cpp_name">Nimi</string>
<string name="cpp_nan">Ei ole numero</string>
<string name="cpp_error">Virhe</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Créer</string>
<string name="cpp_close">Fermer</string>
<string name="cpp_switch">Changer</string>
<string name="cpp_add">Ajouter</string>
<string name="cpp_edit">Modifier</string>
<string name="cpp_delete">Supprimer</string>
<string name="cpp_save">OK</string>
<string name="cpp_done">OK</string>
<string name="cpp_cancel">Annuler</string>
<string name="cpp_description">Description</string>
<string name="cpp_copy_text">Copier dans le presse-papiers</string>
<string name="cpp_text_copied">Texte copié</string>
<string name="cpp_name">Nom</string>
<string name="cpp_nan">Pas un nombre.</string>
<string name="cpp_error">Erreur</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Crea</string>
<string name="cpp_close">Chiudi</string>
<string name="cpp_switch">Cambia</string>
<string name="cpp_add">Aggiungi</string>
<string name="cpp_edit">Modifica</string>
<string name="cpp_delete">Elimina</string>
<string name="cpp_save">Salva</string>
<string name="cpp_done">Salva</string>
<string name="cpp_cancel">Annulla</string>
<string name="cpp_description">Descrizione</string>
<string name="cpp_copy_text">Copia negli appunti</string>
<string name="cpp_text_copied">Testo copiato</string>
<string name="cpp_name">Nome</string>
<string name="cpp_nan">Non è un numero</string>
<string name="cpp_error">Errore</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">作成</string>
<string name="cpp_close">閉じる</string>
<string name="cpp_switch">切り替え</string>
<string name="cpp_add">追加</string>
<string name="cpp_edit">編集</string>
<string name="cpp_delete">削除</string>
<string name="cpp_save">完了</string>
<string name="cpp_done">完了</string>
<string name="cpp_cancel">キャンセル</string>
<string name="cpp_description">説明</string>
<string name="cpp_copy_text">クリップボードにコピー</string>
<string name="cpp_text_copied">テキストをコピーしました</string>
<string name="cpp_name">名前</string>
<string name="cpp_nan">数字以外の値</string>
<string name="cpp_error">エラー</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Aanmaken</string>
<string name="cpp_close">Sluiten</string>
<string name="cpp_switch">Overschakelen</string>
<string name="cpp_add">Toevoegen</string>
<string name="cpp_edit">Bewerken</string>
<string name="cpp_delete">Verwijderen</string>
<string name="cpp_save">Gereed</string>
<string name="cpp_done">Gereed</string>
<string name="cpp_cancel">Annuleren</string>
<string name="cpp_description">Beschrijving</string>
<string name="cpp_copy_text">Kopiëren naar klembord</string>
<string name="cpp_text_copied">Tekst gekopieerd</string>
<string name="cpp_name">Naam</string>
<string name="cpp_nan">Is geen getal</string>
<string name="cpp_error">Fout</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Utwórz</string>
<string name="cpp_close">Zamknij</string>
<string name="cpp_switch">Przełącz</string>
<string name="cpp_add">Dodaj</string>
<string name="cpp_edit">Edytuj</string>
<string name="cpp_delete">Usuń</string>
<string name="cpp_save">Gotowe</string>
<string name="cpp_done">Gotowe</string>
<string name="cpp_cancel">Anuluj</string>
<string name="cpp_description">Opis</string>
<string name="cpp_copy_text">Kopiuj do schowka</string>
<string name="cpp_text_copied">Tekst skopiowany</string>
<string name="cpp_name">Imię i nazwisko</string>
<string name="cpp_nan">To nie liczba</string>
<string name="cpp_error">Błąd</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Criar</string>
<string name="cpp_close">Fechar</string>
<string name="cpp_switch">Alternar</string>
<string name="cpp_add">Adicionar</string>
<string name="cpp_edit">Editar</string>
<string name="cpp_delete">Excluir</string>
<string name="cpp_save">Concluído</string>
<string name="cpp_done">Concluído</string>
<string name="cpp_cancel">Cancelar</string>
<string name="cpp_description">Descrição</string>
<string name="cpp_copy_text">Copiar para área de transferência</string>
<string name="cpp_text_copied">Texto copiado</string>
<string name="cpp_name">Nome</string>
<string name="cpp_nan">Não é número</string>
<string name="cpp_error">Erro</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Criar</string>
<string name="cpp_close">Fechar</string>
<string name="cpp_switch">Alternar</string>
<string name="cpp_add">Adicionar</string>
<string name="cpp_edit">Editar</string>
<string name="cpp_delete">Eliminar</string>
<string name="cpp_save">Concluído</string>
<string name="cpp_done">Concluído</string>
<string name="cpp_cancel">Cancelar</string>
<string name="cpp_description">Descrição</string>
<string name="cpp_copy_text">Copiar para área de transf.</string>
<string name="cpp_text_copied">Texto copiado</string>
<string name="cpp_name">Nome</string>
<string name="cpp_nan">Não é um núm.</string>
<string name="cpp_error">Erro</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Создать</string>
<string name="cpp_close">Закрыть</string>
<string name="cpp_switch">Сменить аккаунт</string>
<string name="cpp_add">Добавить</string>
<string name="cpp_edit">Изменить</string>
<string name="cpp_delete">Удалить</string>
<string name="cpp_save">Готово</string>
<string name="cpp_done">Готово</string>
<string name="cpp_cancel">Отмена</string>
<string name="cpp_description">Описание</string>
<string name="cpp_copy_text">Копировать в буфер обмена</string>
<string name="cpp_text_copied">Текст скопирован</string>
<string name="cpp_name">Имя</string>
<string name="cpp_nan">Не число</string>
<string name="cpp_error">Ошибка</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Oluştur</string>
<string name="cpp_close">Kapat</string>
<string name="cpp_switch">Değiştir</string>
<string name="cpp_add">Ekle</string>
<string name="cpp_edit">Düzenle</string>
<string name="cpp_delete">Sil</string>
<string name="cpp_save">Bitti</string>
<string name="cpp_done">Bitti</string>
<string name="cpp_cancel">İptal</string>
<string name="cpp_description">ıklama</string>
<string name="cpp_copy_text">Panoya kopyala</string>
<string name="cpp_text_copied">Metin kopyalandı</string>
<string name="cpp_name">Ad</string>
<string name="cpp_nan">Sayı değil</string>
<string name="cpp_error">Hata</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Tạo</string>
<string name="cpp_close">Đóng</string>
<string name="cpp_switch">Chuyển đổi</string>
<string name="cpp_add">Thêm</string>
<string name="cpp_edit">Chỉnh sửa</string>
<string name="cpp_delete">Xóa</string>
<string name="cpp_save">Xong</string>
<string name="cpp_done">Xong</string>
<string name="cpp_cancel">Hủy</string>
<string name="cpp_description">Mô tả</string>
<string name="cpp_copy_text">Sao chép vào khay nhớ tạm</string>
<string name="cpp_text_copied">Đã sao chép văn bản</string>
<string name="cpp_name">Tên</string>
<string name="cpp_nan">Không phải số</string>
<string name="cpp_error">Lỗi</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">创建</string>
<string name="cpp_close">关闭</string>
<string name="cpp_switch">切换</string>
<string name="cpp_add">添加</string>
<string name="cpp_edit">编辑</string>
<string name="cpp_delete">删除</string>
<string name="cpp_save">完成</string>
<string name="cpp_done">完成</string>
<string name="cpp_cancel">取消</string>
<string name="cpp_description">说明</string>
<string name="cpp_copy_text">复制到剪贴板</string>
<string name="cpp_text_copied">文本已复制</string>
<string name="cpp_name">姓名</string>
<string name="cpp_nan">不是数字</string>
<string name="cpp_error">错误</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">建立</string>
<string name="cpp_close">關閉</string>
<string name="cpp_switch">切換</string>
<string name="cpp_add">新增</string>
<string name="cpp_edit">編輯</string>
<string name="cpp_delete">刪除</string>
<string name="cpp_save">完成</string>
<string name="cpp_done">完成</string>
<string name="cpp_cancel">取消</string>
<string name="cpp_description">說明</string>
<string name="cpp_copy_text">複製到剪貼簿</string>
<string name="cpp_text_copied">文字已複製</string>
<string name="cpp_name">姓名</string>
<string name="cpp_nan">非數字</string>
<string name="cpp_error">錯誤</string>
</resources>

View File

@ -13,9 +13,15 @@
<string name="cpp_create">Create</string>
<string name="cpp_close">Close</string>
<string name="cpp_switch">Switch</string>
<string name="cpp_add">Add</string>
<string name="cpp_edit">Edit</string>
<string name="cpp_delete">Delete</string>
<string name="cpp_save">Done</string>
<string name="cpp_done">Done</string>
<string name="cpp_cancel">Cancel</string>
<string name="cpp_description">Description</string>
<string name="cpp_copy_text">Copy to clipboard</string>
<string name="cpp_text_copied">Text copied</string>
<string name="cpp_name">Name</string>
<string name="cpp_nan">Not a number</string>
<string name="cpp_error">Error</string>
</resources>

View File

@ -14,4 +14,5 @@
<string name="dimensions_x_max" translatable="false">X max</string>
<string name="dimensions_y_min" translatable="false">Y min</string>
<string name="dimensions_y_max" translatable="false">Y max</string>
<string name="cpp_function_body" translatable="false">f(x, y)</string>
</resources>

View File

@ -11,6 +11,8 @@ public class Android {
private static final List<TranslationLink> settingsLinks = new ArrayList<>();
private static final List<TranslationLink> calendarLinks = new ArrayList<>();
private static final List<TranslationLink> contactsLinks = new ArrayList<>();
private static final List<TranslationLink> calculatorLinks = new ArrayList<>();
static {
settingsLinks.add(new TranslationLink("haptic_feedback_enable_title", "cpp_prefs_vibrate_on_keypress"));
@ -26,24 +28,34 @@ public class Android {
settingsLinks.add(new TranslationLink("create", "cpp_create"));
settingsLinks.add(new TranslationLink("dlg_close", "cpp_close"));
settingsLinks.add(new TranslationLink("dlg_switch", "cpp_switch"));
settingsLinks.add(new TranslationLink("user_dict_settings_add_menu_title", "cpp_add"));
calendarLinks.add(new TranslationLink("edit_label", "cpp_edit"));
calendarLinks.add(new TranslationLink("delete_label", "cpp_delete"));
calendarLinks.add(new TranslationLink("save_label", "cpp_save"));
calendarLinks.add(new TranslationLink("save_label", "cpp_done"));
calendarLinks.add(new TranslationLink("discard_label", "cpp_cancel"));
calendarLinks.add(new TranslationLink("hint_description", "cpp_description"));
contactsLinks.add(new TranslationLink("copy_text", "cpp_copy_text"));
contactsLinks.add(new TranslationLink("toast_text_copied", "cpp_text_copied"));
contactsLinks.add(new TranslationLink("header_name_entry", "cpp_name"));
calculatorLinks.add(new TranslationLink("error_nan", "cpp_nan"));
calculatorLinks.add(new TranslationLink("error_syntax", "cpp_error"));
}
public static void main(String... args) throws Exception {
final Options options = new Options();
options.addOption(Option.builder("as").longOpt("aosp-settings").hasArg().desc("Local location of aosp/platform/packages/apps/settings").required().build());
options.addOption(Option.builder("ac").longOpt("aosp-calendar").hasArg().desc("Local location of aosp/platform/packages/apps/calendar").required().build());
options.addOption(Option.builder("aosp").hasArg().desc("Local location of aosp project").required().build());
final CommandLineParser parser = new DefaultParser();
final CommandLine commandLine = parser.parse(options, args);
final File aospSettings = makeInputDirectory(commandLine.getOptionValue("as"));
final File aospCalendar = makeInputDirectory(commandLine.getOptionValue("ac"));
final String aosp = commandLine.getOptionValue("aosp");
final File aospSettings = makeInputDirectory(aosp + "/platform/packages/apps/settings");
final File aospCalendar = makeInputDirectory(aosp + "/platform/packages/apps/calendar");
final File aospContacts = makeInputDirectory(aosp + "/platform/packages/apps/contacts");
final File aospCalculator = makeInputDirectory(aosp + "/platform/packages/apps/calculator");
final File outDir = new File("build/translations/res");
Utils.delete(outDir);
@ -55,6 +67,8 @@ public class Android {
Resources translations = new Resources();
translate(readResources(aospSettings, languageLocale), translations, settingsLinks);
translate(readResources(aospCalendar, languageLocale), translations, calendarLinks);
translate(readResources(aospContacts, languageLocale), translations, contactsLinks);
translate(readResources(aospCalculator, languageLocale), translations, calculatorLinks);
Utils.saveTranslations(translations, languageLocale, outDir, "text_imported.xml");
}
}