refactor the strings and reuse them in login screen files

This commit is contained in:
M M Arif 2019-10-25 08:38:35 +05:00
parent f9d51094e4
commit 2aaf0eb103
3 changed files with 6 additions and 7 deletions

View File

@ -403,14 +403,14 @@ public class LoginActivity extends AppCompatActivity implements View.OnClickList
.setMessage(getResources().getString(R.string.versionUnsupportedOld, version.getVersion()))
.setCancelable(true)
.setIcon(R.drawable.ic_warning)
.setNegativeButton(getString(R.string.versionAlertDialogCopyNegative), new DialogInterface.OnClickListener() {
.setNegativeButton(getString(R.string.cancelButton), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
enableProcessButton();
}
})
.setPositiveButton(getString(R.string.versionAlertDialogCopyPositive), new DialogInterface.OnClickListener() {
.setPositiveButton(getString(R.string.textContinue), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

View File

@ -52,7 +52,7 @@
android:id="@+id/loginToken"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loginViaToken"
android:text="@string/copyToken"
android:textColor="@color/white"/>
</RadioGroup>
@ -166,7 +166,7 @@
android:drawablePadding="10dp"
android:textColor="@color/white"
android:textColorHint="@color/colorAccent"
android:hint="@string/loginViaToken"
android:hint="@string/copyToken"
android:inputType="text"
android:visibility="gone"
android:textColorHighlight="@color/white"/>

View File

@ -503,6 +503,8 @@
<string name="locationText">Location</string>
<string name="characters255Limit">Max 255 characters</string>
<string name="emptyFields">All fields are required</string>
<string name="textContinue">Continue</string>
<string name="copyToken">Token</string>
<!-- generic copy -->
<string name="translateText">Translate GitNex with Crowdin</string>
@ -525,11 +527,8 @@
<string name="versionUnknow">No Gitea detected!</string>
<string name="versionAlertTitle">Version Alert</string>
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
<string name="versionAlertDialogCopyNegative">Cancel</string>
<string name="versionAlertDialogCopyPositive">Continue</string>
<string name="loginViaPassword">Username / Password</string>
<string name="loginViaToken">Token</string>
<string name="loginMethodText">Choose your preferred login method to access your account. Token is more secure!</string>
<string name="unauthorizedApiError">Instance has returned an error - Unauthorized. Check your credentials and try again</string>
<string name="loginTokenError">Please enter the correct token</string>