Skip to content

Commit

Permalink
Localized scheduled transactions options
Browse files Browse the repository at this point in the history
Updated Norwegian translation (thanks Kjell T. Pedersen)
Updated strings for final 1.3.0 release & some refactoring
  • Loading branch information
codinguser committed Feb 10, 2014
1 parent 4972965 commit cba748f
Show file tree
Hide file tree
Showing 16 changed files with 115 additions and 46 deletions.
4 changes: 2 additions & 2 deletions app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.gnucash.android"
android:versionCode="24"
android:versionName="1.3.0.beta2" >
android:versionCode="25"
android:versionName="1.3.0" >

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15"/>

Expand Down
10 changes: 8 additions & 2 deletions app/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,15 @@
<string name="summary_delete_all_transactions">Alle Buchungen in alle Konten werden gelöscht</string>
<string name="title_delete_all_transactions">Alle Buchungen löschen</string>
<string name="toast_all_transactions_deleted">Alle Buchungen wurden erfolgreich gelöscht</string>
<string name="title_progress_importing_accounts">Importing accounts</string>
<string name="title_progress_importing_accounts">Konten werden importiert</string>
<string name="toast_tap_again_to_confirm_delete">Tap again to confirm. ALL entries will be deleted!!</string>
<string name="section_header_transactions">Buchungen</string>
<string name="section_header_subaccounts">Unterkonten</string>
<string name="menu_search_accounts">Suchen</string>
<string name="title_default_export_format">Standard Export Format</string>
<string name="summary_default_export_format">File format to use by default when exporting transactions</string>
<string name="menu_export_transactions">Buchungen exportieren…</string>
<string name="label_recurring_transaction">Recurrence</string>
<string name="label_recurring_transaction">Wiederkehr</string>
<!-- This should be the same name used by GnuCash desktop for imbalance accounts -->
<string name="imbalance_account_name">Ausgleichskonto</string>
<string name="title_progress_exporting_transactions">Die Buchungen werden exportiert</string>
Expand Down Expand Up @@ -391,4 +391,10 @@
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
</string>
<string-array name="recurrence_values">
<item>KEINE</item>
<item>TÄGLICH</item>
<item>WÖCHENTLICH</item>
<item>MONATLICH</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -407,4 +407,10 @@
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
</string>
<string-array name="recurrence_period_strings">
<item>NONE</item>
<item>DAILY</item>
<item>WEEKLY</item>
<item>MONTHLY</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-es-rMX/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,10 @@
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
</string>
<string-array name="recurrence_period_strings">
<item>NINGUNO</item>
<item>DIARIO</item>
<item>SEMANAL</item>
<item>MENSUAL</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,10 @@
<string name="menu_item_recurring_transactions">Transacciones Recurrentes</string>
<string name="message_confirm_create_default_accounts_first_run">&#161;Bienvenido a GnuCash Android! \nPuede crear una jerarqu&#237;a de cuentas com&#250;nmente usadas o importar su propia estructura de cuentas GnuCash. \n\nAmbas opciones est&#225;n disponibles en las opciones de la aplicaci&#243; por si quiere decidirlo m&#225;s tarde.
</string>
<string-array name="recurrence_period_strings">
<item>NINGUNO</item>
<item>DIARIO</item>
<item>SEMANAL</item>
<item>MENSUAL</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,10 @@
<string name="message_confirm_create_default_accounts_first_run">Bienvenue à GnuCash Android!\n Vous pouvez soit créer
une hiérarchie de comptes couramment utilisés, importer votre propre structure de compte GnuCash.\n\n Les deux options sont également
disponible dans les paramètres d\'applications de sorte que vous puissiez décider plus tard.</string>
<string-array name="recurrence_period_strings">
<item>AUCUN</item>
<item>QUOTIDIEN</item>
<item>SEMAINE</item>
<item>MENSUEL</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,10 @@
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
</string>
<string-array name="recurrence_period_strings">
<item>NONE</item>
<item>DAILY</item>
<item>WEEKLY</item>
<item>MONTHLY</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,10 @@
creare una struttura dei conti più comunemente utilizzati o importare la propria struttura da GnuCash. \n\nEntrambe le
Opzioni sono disponibili nelle impostazioni dell\'applicazione ed è quindi possibile decidere in seguito.
</string>
<string-array name="recurrence_period_strings">
<item>NESSUNA</item>
<item>QUOTIDIANO</item>
<item>SETTIMANALE</item>
<item>MENSILE</item>
</string-array>
</resources>
73 changes: 38 additions & 35 deletions app/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,14 @@ format og importeres i regnskapsprogrammet GnuCash for PC.</string>
<string name="summary_xml_ofx_header">Velg denne hvis du skal eksportere til annen programvare enn GnuCash for PC.</string>
<string name="title_whats_new">Hva er nytt</string>
<string name="whats_new">
- Mark favorite accounts and quickly access them\n
- Display different tabs for recent, favorite and all accounts\n
- Add, view and delete recurring transactions (daily, weekly, monthly)\n
- Mark accounts as placeholder accounts (cannot contain transactions)\n
- Set a default transfer account for each account\n
- Color code accounts and themed account views\n
- Create default GnuCash account structure from within app\n
- Numerous bug fixes and improvements\n
- Markere favoritter for rask tilgang\n
- Vis forskjellige fliker for nylige, favoritter og alle kontoer\n
- Legg til, vis og slett gjentakende transaksjoner (daglig, uke, måned)\n
- Marker kontoer som plassholder (kan ikke inneholde transaksjoner)\n
- Sette standard overføringskonto per konto\n
- Fargekoding av kontoer og temaer i konto visning\n
- Opprette standard GnuCash kontostruktur i appen\n
- Mange feilrettinger og forbedringer\n
</string>
<string name="label_dismiss">Ferdig</string>
<string name="toast_transanction_amount_required">Oppgi et beløp for å lagre transaksjonen</string>
Expand All @@ -338,23 +338,23 @@ format og importeres i regnskapsprogrammet GnuCash for PC.</string>
<string name="summary_delete_all_transactions">Alle transaksjoner i alle kontoer vil bli slettet!</string>
<string name="title_delete_all_transactions">Slette alle transaksjoner</string>
<string name="toast_all_transactions_deleted">Alle transaksjoner slettet!</string>
<string name="title_progress_importing_accounts">Importing accounts</string>
<string name="toast_tap_again_to_confirm_delete">Tap again to confirm. ALL entries will be deleted!!</string>
<string name="section_header_transactions">Transactions</string>
<string name="section_header_subaccounts">Sub-Accounts</string>
<string name="menu_search_accounts">Search</string>
<string name="title_default_export_format">Default Export Format</string>
<string name="summary_default_export_format">File format to use by default when exporting transactions</string>
<string name="title_progress_importing_accounts">Importerer kontoer</string>
<string name="toast_tap_again_to_confirm_delete">Trykk igjen for å bekrefte. ALLE oppføringer vil bli slettet!!</string>
<string name="section_header_transactions">Transaksjoner</string>
<string name="section_header_subaccounts">Underkontoer</string>
<string name="menu_search_accounts">Søk</string>
<string name="title_default_export_format">Standard Eksport Format</string>
<string name="summary_default_export_format">Standard filformat ved eksportering av transaksjoner</string>
<string name="menu_export_transactions">Export transactions…</string>
<string name="label_recurring_transaction">Recurrence</string>
<!-- This should be the same name used by GnuCash desktop for imbalance accounts -->
<string name="imbalance_account_name">Imbalance</string>
<string name="title_progress_exporting_transactions">Exporting transactions</string>
<string name="label_no_recurring_transactions">No recurring transactions to display.</string>
<string name="toast_recurring_transaction_deleted">Successfully deleted recurring transaction</string>
<string name="label_placeholder_account">Placeholder account</string>
<string name="label_default_transfer_account">Default Transfer Account</string>
<string name="label_account_color_and_type">Account Color &amp; Type</string>
<string name="imbalance_account_name">Ubalanse</string>
<string name="title_progress_exporting_transactions">Eksporter transaksjoner</string>
<string name="label_no_recurring_transactions">Ingen gjentakende transaksjoner å vise.</string>
<string name="toast_recurring_transaction_deleted">Slettet alle gjentakende transaksjoner</string>
<string name="label_placeholder_account">Plassholder konto</string>
<string name="label_default_transfer_account">Standard overføringskonto</string>
<string name="label_account_color_and_type">Konto Farge &amp; Type</string>
<plurals name="label_sub_accounts">
<item quantity="one">%d under-konto</item>
<item quantity="other">%d under-kontoer</item>
Expand All @@ -379,19 +379,22 @@ format og importeres i regnskapsprogrammet GnuCash for PC.</string>
<item>OFX</item>
</string-array>
<!-- Default title for color picker dialog [CHAR LIMIT=30] -->
<string name="color_picker_default_title">Select a Color</string>
<string name="label_delete_sub_accounts">Delete sub-accounts</string>
<string name="title_recent_accounts">Recent</string>
<string name="title_favorite_accounts">Favorites</string>
<string name="title_all_accounts">All</string>
<string name="summary_create_default_accounts">Creates default GnuCash commonly-used account structure</string>
<string name="title_create_default_accounts">Create default accounts</string>
<string name="message_confirm_create_default_accounts_setting">New accounts will be created in addition to the existing
account structure.\n\nIf you wish to replace currently existing accounts, delete them first before proceeding!
<string name="color_picker_default_title">Velg en farge</string>
<string name="label_delete_sub_accounts">Slett underkontoer</string>
<string name="title_recent_accounts">Nylige</string>
<string name="title_favorite_accounts">Favoritter</string>
<string name="title_all_accounts">Alle</string>
<string name="summary_create_default_accounts">Oppretter standard GnuCash kontostruktur</string>
<string name="title_create_default_accounts">Opprette standard kontoer</string>
<string name="message_confirm_create_default_accounts_setting">Nye kontoer vil bli opprettet i tillegg til eksisterende kontostruktur.\n\nHvis du vil erstatte de, slett de før du forsetter!
</string>
<string name="menu_item_recurring_transactions">Recurring Transactions</string>
<string name="message_confirm_create_default_accounts_first_run">Welcome to GnuCash Android! \nYou can either create
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
<string name="menu_item_recurring_transactions">Gjentakende transaksjoner</string>
<string name="message_confirm_create_default_accounts_first_run">Velkommen til GnuCash Android! \nDu kan enten opprette et hieraki av de mest brukte kontoene, eller importere din egen GnuCash kontostruktur. \n\nBegge valgene er også tilgjengelige under Instillinger, så du kan velge senere.
</string>
<string-array name="recurrence_period_strings">
<item>NONE</item>
<item>DAGLIG</item>
<item>UKENTLIG</item>
<item>MÅNEDLIG</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,4 +393,10 @@
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
</string>
<string-array name="recurrence_period_strings">
<item>GEEN</item>
<item>DAGELIJKS</item>
<item>WEKELIJKSE</item>
<item>MAANDELIJKS</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,10 @@
a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
available in app Settings so you can decide later.
</string>
<string-array name="recurrence_period_strings">
<item>NENHUM</item>
<item>DIÁRIO</item>
<item>SEMANAL</item>
<item>MENSAL</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,10 @@
возможности будут доступны из настроек приложения, если вы захотите
сделать это позже.
</string>
<string-array name="recurrence_period_strings">
<item>никто</item>
<item>ЕЖЕДНЕВНО</item>
<item>ЕЖЕНЕДЕЛЬНЫЙ</item>
<item>ЕЖЕМЕСЯЧНО</item>
</string-array>
</resources>
6 changes: 6 additions & 0 deletions app/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,10 @@
<string name="menu_item_recurring_transactions">计划的交易</string>
<string name="message_confirm_create_default_accounts_first_run">欢迎使用GnuCash Android! \n你可以选择:1)创建常用的科目结构,2)导入自定义的科目结构。\或者稍后再决定,两种选择也能在设置中找到。
</string>
<string-array name="recurrence_period_strings">
<item>毫无</item>
<item>每日</item>
<item>每周</item>
<item>每月</item>
</string-array>
</resources>
4 changes: 2 additions & 2 deletions app/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,13 @@
<item>QIF</item>
<item>OFX</item>
</string-array>
<string-array name="recurrence_entries">
<string-array name="recurrence_period_strings">
<item>NONE</item>
<item>DAILY</item>
<item>WEEKLY</item>
<item>MONTHLY</item>
</string-array>
<string-array name="recurrence_options">
<string-array name="recurrence_period_millis">
<item>0</item>
<item>86400000</item>
<item>604800000</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void onActivityCreated(Bundle savedInstanceState) {
updateTransferAccountsList();

ArrayAdapter<CharSequence> recurrenceAdapter = ArrayAdapter.createFromResource(getActivity(),
R.array.recurrence_entries, android.R.layout.simple_spinner_item);
R.array.recurrence_period_strings, android.R.layout.simple_spinner_item);
recurrenceAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mRecurringTransactionSpinner.setAdapter(recurrenceAdapter);

Expand Down Expand Up @@ -400,7 +400,7 @@ private void setSelectedRecurrenceOption() {
//init recurrence options
final long recurrencePeriod = mTransaction.getRecurrencePeriod();
if (recurrencePeriod > 0){
String[] recurrenceOptions = getResources().getStringArray(R.array.recurrence_options);
String[] recurrenceOptions = getResources().getStringArray(R.array.recurrence_period_millis);

int selectionIndex = 0;
for (String recurrenceOption : recurrenceOptions) {
Expand Down Expand Up @@ -605,7 +605,7 @@ private void saveNewTransaction() {
//set up recurring transaction if requested
int recurrenceIndex = mRecurringTransactionSpinner.getSelectedItemPosition();
if (recurrenceIndex != 0) {
String[] recurrenceOptions = getResources().getStringArray(R.array.recurrence_options);
String[] recurrenceOptions = getResources().getStringArray(R.array.recurrence_period_millis);
long recurrencePeriodMillis = Long.parseLong(recurrenceOptions[recurrenceIndex]);
long firstRunMillis = System.currentTimeMillis() + recurrencePeriodMillis;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ public void run() {
* @return String formatted representation of recurrence period
*/
public String getRecurrenceAsString(long periodMillis){
String[] recurrencePeriods = getResources().getStringArray(R.array.recurrence_options);
String[] recurrenceStrings = getResources().getStringArray(R.array.recurrence_entries);
String[] recurrencePeriods = getResources().getStringArray(R.array.recurrence_period_millis);
String[] recurrenceStrings = getResources().getStringArray(R.array.recurrence_period_strings);

int index = 0;
for (String recurrencePeriod : recurrencePeriods) {
Expand Down

0 comments on commit cba748f

Please sign in to comment.