Skip to content

Commit ccc15b9

Browse files
geek1011lunny
authored andcommittedMar 11, 2017
Make strings translatable (#1188) (#1198)
* Add strings to ini * Make strings translatable (#1188)
1 parent 74cde12 commit ccc15b9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed
 

‎options/locale/locale_en-US.ini

+3
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,9 @@ settings.add_protected_branch_failed= %s Locked failed
837837
settings.remove_protected_branch_success=%s Unlocked successfully
838838
settings.protected_branch_deletion=To delete a protected branch
839839
settings.protected_branch_deletion_desc=Anyone with write permissions will be able to push directly to this branch. Are you sure?
840+
settings.default_branch_desc = The default branch is considered the "base" branch in your repository against which all pull requests and code commits are automatically made, unless you specify a different branch.
841+
settings.choose_branch = Choose a branch...
842+
settings.no_protected_branch = There are no protected branches
840843
841844
diff.browse_source = Browse Source
842845
diff.parent = parent

‎templates/repo/settings/branches.tmpl

+5-7
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
{{.CsrfTokenHtml}}
1515
<input type="hidden" name="action" value="default_branch">
1616
<div class="item">
17-
The default branch is considered the "base" branch in your repository,
18-
against which all pull requests and code commits are automatically made,
19-
unless you specify a different branch.
17+
{{.i18n.Tr "settings.default_branch_desc"}}
2018
</div>
2119
{{if not .Repository.IsBare}}
2220
<div class="ui grid padded">
@@ -53,11 +51,11 @@
5351
<div class="ui fluid dropdown selection visible" tabindex="0">
5452
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
5553
{{range .LeftBranches}}
56-
<option value="">Choose a branch...</option>
54+
<option value="">{{.i18n.Tr "settings.choose_branch"}}</option>
5755
<option value="{{.}}">{{.}}</option>
5856
{{end}}
5957
</select><i class="dropdown icon"></i>
60-
<div class="default text">Choose a branch...</div>
58+
<div class="default text">{{.i18n.Tr "settings.choose_branch"}}</div>
6159
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
6260
{{range .LeftBranches}}
6361
<div class="item" data-value="{{.}}">{{.}}</div>
@@ -77,7 +75,7 @@
7775
<td class="right aligned"><button class="rm ui red button" data-url="{{$.Repository.Link}}/settings/branches?action=protected_branch&id={{.ID}}" data-val="{{.BranchName}}">Delete</button></td>
7876
</tr>
7977
{{else}}
80-
<tr class="center aligned"><td>There is no protected branch</td></tr>
78+
<tr class="center aligned"><td>{{.i18n.Tr "settings.no_protected_branch"}}</td></tr>
8179
{{end}}
8280
</tbody>
8381
</table>
@@ -88,4 +86,4 @@
8886
</div>
8987
</div>
9088
</div>
91-
{{template "base/footer" .}}
89+
{{template "base/footer" .}}

0 commit comments

Comments
 (0)
Please sign in to comment.