Update strings (#1045)

Use a %s instead of + to check CI

The resource key was changed to avoid issues with other languages if they do not have the %s in the string, they'll just use the English variant.

Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1045
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
qwerty287 2022-02-23 09:20:04 +01:00 committed by M M Arif
parent aaafe881c1
commit ae70d5b111
3 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ public class UserSearchAdapter extends RecyclerView.Adapter<UserSearchAdapter.Us
addCollaboratorButtonRemove.setOnClickListener(v -> {
AlertDialogs.collaboratorRemoveDialog(context, userInfo.getUsername(),
context.getResources().getString(R.string.removeCollaboratorTitle),
context.getResources().getString(R.string.removeCollaboratorDialogTitle),
context.getResources().getString(R.string.removeCollaboratorMessage),
context.getResources().getString(R.string.removeButton),
context.getResources().getString(R.string.cancelButton), "fa");

View File

@ -123,7 +123,7 @@ public class AlertDialogs {
public static void collaboratorRemoveDialog(final Context context, final String userNameMain, String title, String message, String positiveButton, String negativeButton, final String searchKeyword) {
new AlertDialog.Builder(context)
.setTitle(title + userNameMain)
.setTitle(String.format(title, userNameMain))
.setMessage(message)
.setPositiveButton(positiveButton, (dialog, whichButton) -> CollaboratorActions.deleteCollaborator(context, searchKeyword, userNameMain))
.setNeutralButton(negativeButton, null).show();

View File

@ -346,7 +346,7 @@
<string name="addCollaboratorTitle">Add / Remove Collaborator</string>
<string name="addCollaboratorSearchHint">Search users</string>
<string name="addCollaboratorViewUserDesc">Username</string>
<string name="removeCollaboratorTitle">Remove\u0020</string>
<string name="removeCollaboratorDialogTitle">Remove %s?</string>
<string name="removeCollaboratorMessage">Do you want to remove this user from the repository?</string>
<string name="removeCollaboratorToastText">User removed from the repository.</string>
<string name="addCollaboratorToastText">User added to the repository.</string>