forked from organicmaps/organicmaps
[android] Strings updated.
This commit is contained in:
parent
58708a3d69
commit
65a53f3b44
4 changed files with 47 additions and 7 deletions
|
@ -22,7 +22,7 @@
|
|||
android:drawableLeft="@drawable/ic_launcher"
|
||||
android:gravity="center|left"
|
||||
android:drawablePadding="5dp"
|
||||
android:text="Promocode Activation" />
|
||||
android:text="@string/promocode_activation" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
|
@ -39,7 +39,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:hint="Enter promocode"
|
||||
android:hint="@string/enter_promocode_hint"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
@ -61,14 +61,14 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Cancel" />
|
||||
android:text="@android:string/cancel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_activate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Activate" />
|
||||
android:text="@android:string/ok" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -291,4 +291,14 @@
|
|||
<string name="message">Message</string>
|
||||
<!-- Share by email button text -->
|
||||
<string name="email">E-Mail</string>
|
||||
<!-- Promocode Activation dialog title -->
|
||||
<string name="promocode_activation">Promo Code Activation</string>
|
||||
<!-- Enter promo code hint -->
|
||||
<string name="enter_promocode_hint">Enter Promo Code</string>
|
||||
<!-- Promocode Activation success message -->
|
||||
<string name="promocode_success">Promo code is activated!</string>
|
||||
<!-- Promocode Activation connection/io error -->
|
||||
<string name="promocode_error">Connection error. Please try again later.</string>
|
||||
<!-- Promocode Activation is invalid message. -->
|
||||
<string name="promocode_failure">Invalid promo code. Please try again.</string>
|
||||
</resources>
|
||||
|
|
|
@ -75,6 +75,11 @@ public class PromocodeActivationDialog extends Dialog
|
|||
mHandler = new Handler();
|
||||
}
|
||||
|
||||
private String getString(int id)
|
||||
{
|
||||
return getContext().getString(id);
|
||||
}
|
||||
|
||||
private void setUpView()
|
||||
{
|
||||
mPromoText = (EditText) findViewById(R.id.txt_promocode);
|
||||
|
@ -168,7 +173,7 @@ public class PromocodeActivationDialog extends Dialog
|
|||
public void run()
|
||||
{
|
||||
setViewIsWaiting(false);
|
||||
showError("Wrong promocode. Please try again.");
|
||||
showError(getString(R.string.promocode_failure));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -184,7 +189,7 @@ public class PromocodeActivationDialog extends Dialog
|
|||
setViewIsWaiting(false);
|
||||
ActivationSettings.setSearchActivated(getContext(), true);
|
||||
dismiss();
|
||||
Utils.toastShortcut(getContext(), "Promo code is activated!");
|
||||
Utils.toastShortcut(getContext(), getString(R.string.promocode_success));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -198,7 +203,7 @@ public class PromocodeActivationDialog extends Dialog
|
|||
public void run()
|
||||
{
|
||||
setViewIsWaiting(false);
|
||||
showError("Connection error. Please try again later.");
|
||||
showError(getString(R.string.promocode_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
25
strings.txt
25
strings.txt
|
@ -2013,3 +2013,28 @@
|
|||
zh = 電子郵件
|
||||
uk = Електронна пошта
|
||||
ko = 이메일
|
||||
|
||||
[promocode_activation]
|
||||
en = Promo Code Activation
|
||||
tags = android
|
||||
comment = Promocode Activation dialog title
|
||||
|
||||
[enter_promocode_hint]
|
||||
en = Enter Promo Code
|
||||
tags = android
|
||||
comment = Enter promo code hint
|
||||
|
||||
[promocode_success]
|
||||
en = Promo code is activated!
|
||||
tags = android
|
||||
comment = Promocode Activation success message
|
||||
|
||||
[promocode_error]
|
||||
en = Connection error. Please try again later.
|
||||
tags = android
|
||||
comment = Promocode Activation connection/io error
|
||||
|
||||
[promocode_failure]
|
||||
en = Invalid promo code. Please try again.
|
||||
tags = android
|
||||
comment = Promocode Activation is invalid message.
|
||||
|
|
Loading…
Add table
Reference in a new issue