mirror of https://codeberg.org/gitnex/GitNex.git
Add dashboard translatable strings
This commit is contained in:
parent
1eedae7e3d
commit
67042d81f4
|
@ -391,7 +391,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ "'>"
|
||||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
typeString = "created repository";
|
||||
typeString = context.getString(R.string.createdRepository);
|
||||
typeIcon.setImageResource(R.drawable.ic_repo);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("rename_repo")) {
|
||||
|
||||
|
@ -402,7 +402,10 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ "'>"
|
||||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
typeString = "renamed repository from " + activity.getContent() + " to";
|
||||
typeString =
|
||||
String.format(
|
||||
context.getString(R.string.renamedRepository),
|
||||
activity.getContent());
|
||||
typeIcon.setImageResource(R.drawable.ic_repo);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("star_repo")) {
|
||||
|
||||
|
@ -413,7 +416,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ "'>"
|
||||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
typeString = "starred";
|
||||
typeString = context.getString(R.string.starredRepository);
|
||||
typeIcon.setImageResource(R.drawable.ic_star);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("transfer_repo")) {
|
||||
|
||||
|
@ -424,7 +427,10 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ "'>"
|
||||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
typeString = "transferred repository " + activity.getContent() + " to";
|
||||
typeString =
|
||||
String.format(
|
||||
context.getString(R.string.transferredRepository),
|
||||
activity.getContent());
|
||||
typeIcon.setImageResource(R.drawable.ic_arrow_up);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("commit_repo")) {
|
||||
|
||||
|
@ -447,7 +453,8 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
activity.getRefName().lastIndexOf("/") + 1)
|
||||
.trim()
|
||||
+ "</font>";
|
||||
typeString = "created branch " + branch + " in";
|
||||
typeString =
|
||||
String.format(context.getString(R.string.createdBranch), branch);
|
||||
} else {
|
||||
String branch =
|
||||
"<font color='"
|
||||
|
@ -459,7 +466,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
activity.getRefName().lastIndexOf("/") + 1)
|
||||
.trim()
|
||||
+ "</font>";
|
||||
typeString = "pushed to " + branch + " at";
|
||||
typeString = String.format(context.getString(R.string.pushedTo), branch);
|
||||
|
||||
JSONObject commitsObj = null;
|
||||
try {
|
||||
|
@ -567,7 +574,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "opened issue";
|
||||
typeString = context.getString(R.string.openedIssue);
|
||||
typeIcon.setImageResource(R.drawable.ic_issue);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("comment_issue")) {
|
||||
|
||||
|
@ -580,7 +587,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "commented on issue";
|
||||
typeString = context.getString(R.string.commentedOnIssue);
|
||||
typeIcon.setImageResource(R.drawable.ic_comment);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("close_issue")) {
|
||||
|
||||
|
@ -593,7 +600,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "closed issue";
|
||||
typeString = context.getString(R.string.closedIssue);
|
||||
typeIcon.setImageResource(R.drawable.ic_issue_closed);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("reopen_issue")) {
|
||||
|
||||
|
@ -606,7 +613,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "reopened issue";
|
||||
typeString = context.getString(R.string.reopenedIssue);
|
||||
typeIcon.setImageResource(R.drawable.ic_reopen);
|
||||
}
|
||||
} else if (activity.getOpType().contains("pull")) {
|
||||
|
@ -634,7 +641,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "created pull request";
|
||||
typeString = context.getString(R.string.createdPR);
|
||||
typeIcon.setImageResource(R.drawable.ic_pull_request);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("close_pull_request")) {
|
||||
|
||||
|
@ -647,7 +654,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "closed pull request";
|
||||
typeString = context.getString(R.string.closedPR);
|
||||
typeIcon.setImageResource(R.drawable.ic_issue_closed);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("reopen_pull_request")) {
|
||||
|
||||
|
@ -660,7 +667,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "reopened pull request";
|
||||
typeString = context.getString(R.string.reopenedPR);
|
||||
typeIcon.setImageResource(R.drawable.ic_reopen);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("merge_pull_request")) {
|
||||
|
||||
|
@ -673,7 +680,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "merged pull request";
|
||||
typeString = context.getString(R.string.mergedPR);
|
||||
typeIcon.setImageResource(R.drawable.ic_pull_request);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("approve_pull_request")) {
|
||||
|
||||
|
@ -686,7 +693,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "approved";
|
||||
typeString = context.getString(R.string.approved);
|
||||
typeIcon.setImageResource(R.drawable.ic_done);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("reject_pull_request")) {
|
||||
|
||||
|
@ -699,7 +706,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "suggested changes for";
|
||||
typeString = context.getString(R.string.suggestedChanges);
|
||||
typeIcon.setImageResource(R.drawable.ic_diff);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("comment_pull")) {
|
||||
|
||||
|
@ -712,7 +719,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "commented on pull request";
|
||||
typeString = context.getString(R.string.commentedOnPR);
|
||||
typeIcon.setImageResource(R.drawable.ic_comment);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("auto_merge_pull_request")) {
|
||||
|
||||
|
@ -725,7 +732,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ context.getResources().getString(R.string.hash)
|
||||
+ id
|
||||
+ "</font>";
|
||||
typeString = "automatically merged pull request";
|
||||
typeString = context.getString(R.string.autoMergePR);
|
||||
typeIcon.setImageResource(R.drawable.ic_issue_closed);
|
||||
}
|
||||
} else if (activity.getOpType().contains("branch")) {
|
||||
|
@ -758,7 +765,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
.trim()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "deleted branch " + branch + " at";
|
||||
typeString = String.format(context.getString(R.string.deletedBranch), branch);
|
||||
typeIcon.setImageResource(R.drawable.ic_commit);
|
||||
}
|
||||
} else if (activity.getOpType().contains("tag")) {
|
||||
|
@ -783,7 +790,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
.trim()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "pushed tag " + branch + " to";
|
||||
typeString = String.format(context.getString(R.string.pushedTag), branch);
|
||||
typeIcon.setImageResource(R.drawable.ic_commit);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("delete_tag")) {
|
||||
|
||||
|
@ -805,7 +812,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
.trim()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "deleted tag " + branch + " from";
|
||||
typeString = String.format(context.getString(R.string.deletedTag), branch);
|
||||
typeIcon.setImageResource(R.drawable.ic_commit);
|
||||
}
|
||||
} else if (activity.getOpType().contains("release")) {
|
||||
|
@ -830,7 +837,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
.trim()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "released " + branch + " at";
|
||||
typeString = String.format(context.getString(R.string.releasedBranch), branch);
|
||||
typeIcon.setImageResource(R.drawable.ic_tag);
|
||||
}
|
||||
} else if (activity.getOpType().contains("mirror")) {
|
||||
|
@ -845,7 +852,8 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "synced commits to " + headerString + " at";
|
||||
typeString =
|
||||
String.format(context.getString(R.string.syncedCommits), headerString);
|
||||
typeIcon.setImageResource(R.drawable.ic_tag);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("mirror_sync_create")) {
|
||||
|
||||
|
@ -857,7 +865,8 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "synced new reference " + headerString + " to";
|
||||
typeString =
|
||||
String.format(context.getString(R.string.syncedRefs), headerString);
|
||||
typeIcon.setImageResource(R.drawable.ic_tag);
|
||||
} else if (activity.getOpType().equalsIgnoreCase("mirror_sync_delete")) {
|
||||
|
||||
|
@ -869,7 +878,9 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||
+ activity.getRepo().getFullName()
|
||||
+ "</font>";
|
||||
|
||||
typeString = "synced and deleted reference " + headerString + " at";
|
||||
typeString =
|
||||
String.format(
|
||||
context.getString(R.string.syncedDeletedRefs), headerString);
|
||||
typeIcon.setImageResource(R.drawable.ic_tag);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -885,6 +885,31 @@
|
|||
<string name="lang_percentage" translatable="false">%s%%</string>
|
||||
|
||||
<string name="dashboard">Dashboard</string>
|
||||
<string name="createdRepository">created repository</string>
|
||||
<string name="renamedRepository">renamed repository from %1$s to</string>
|
||||
<string name="starredRepository">starred</string>
|
||||
<string name="transferredRepository">transferred repository %1$s to</string>
|
||||
<string name="createdBranch">created branch %1$s in</string>
|
||||
<string name="pushedTo">pushed to %1$s at</string>
|
||||
<string name="openedIssue">opened issue</string>
|
||||
<string name="commentedOnIssue">commented on issue</string>
|
||||
<string name="closedIssue">closed issue</string>
|
||||
<string name="reopenedIssue">reopened issue</string>
|
||||
<string name="createdPR">created pull request</string>
|
||||
<string name="closedPR">closed pull request</string>
|
||||
<string name="reopenedPR">reopened pull request</string>
|
||||
<string name="mergedPR">merged pull request</string>
|
||||
<string name="approved">approved</string>
|
||||
<string name="suggestedChanges">suggested changes for</string>
|
||||
<string name="commentedOnPR">commented on pull request</string>
|
||||
<string name="autoMergePR">automatically merged pull request</string>
|
||||
<string name="deletedBranch">deleted branch %1$s at</string>
|
||||
<string name="pushedTag">pushed tag %1$s to</string>
|
||||
<string name="deletedTag">deleted tag %1$s from</string>
|
||||
<string name="releasedBranch">released %1$s at</string>
|
||||
<string name="syncedCommits">synced commits to %1$s at</string>
|
||||
<string name="syncedRefs">synced new reference %1$s to</string>
|
||||
<string name="syncedDeletedRefs">synced and deleted reference %1$s at</string>
|
||||
|
||||
<string name="attachment">Attachment</string>
|
||||
<string name="attachments">Attachments</string>
|
||||
|
|
Loading…
Reference in New Issue