mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 00:05:27 -05:00
Add i18n; avoid injecting unneeded dependencies.
This commit is contained in:
parent
dc235b91d9
commit
2c2bb4c130
4 changed files with 10 additions and 21 deletions
|
@ -91,5 +91,5 @@ script(type="text/ng-template", id="historyLabelTooltipTpl")
|
||||||
p.history-label-tooltip-title
|
p.history-label-tooltip-title
|
||||||
i.fa.fa-tag
|
i.fa.fa-tag
|
||||||
| {{ $ctrl.labelText }}
|
| {{ $ctrl.labelText }}
|
||||||
p.history-label-tooltip-owner Created by {{ $ctrl.labelOwnerName }}
|
p.history-label-tooltip-owner #{translate("history_label_created_by")} {{ $ctrl.labelOwnerName }}
|
||||||
time.history-label-tooltip-datetime {{ labelCreationDateTime | formatDate }}
|
time.history-label-tooltip-datetime {{ labelCreationDateTime | formatDate }}
|
||||||
|
|
|
@ -77,17 +77,6 @@ aside.change-list(
|
||||||
is-owned-by-current-user="label.user_id === $ctrl.currentUser.id"
|
is-owned-by-current-user="label.user_id === $ctrl.currentUser.id"
|
||||||
on-label-delete="deleteLabel(label)"
|
on-label-delete="deleteLabel(label)"
|
||||||
)
|
)
|
||||||
//- .history-entry-label(
|
|
||||||
//- ng-if="update.labels.length > 0"
|
|
||||||
//- ng-repeat="label in update.labels"
|
|
||||||
//- )
|
|
||||||
//- span.history-entry-label-comment
|
|
||||||
//- i.fa.fa-tag
|
|
||||||
//- | {{ label.comment }}
|
|
||||||
//- button.history-entry-label-delete-btn(
|
|
||||||
//- stop-propagation="click"
|
|
||||||
//- ng-click="deleteLabel(label)"
|
|
||||||
//- ) ×
|
|
||||||
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
||||||
div.action.action-edited(ng-if="history.isV2 && update.pathnames.length > 0")
|
div.action.action-edited(ng-if="history.isV2 && update.pathnames.length > 0")
|
||||||
| #{translate("file_action_edited")}
|
| #{translate("file_action_edited")}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
ng-disabled="history.loadingFileTree"
|
ng-disabled="history.loadingFileTree"
|
||||||
)
|
)
|
||||||
i.fa.fa-tag
|
i.fa.fa-tag
|
||||||
| Label this version
|
| #{translate("history_label_this_version")}
|
||||||
button.history-toolbar-btn(
|
button.history-toolbar-btn(
|
||||||
ng-click="toggleHistoryViewMode();"
|
ng-click="toggleHistoryViewMode();"
|
||||||
ng-disabled="history.loadingFileTree"
|
ng-disabled="history.loadingFileTree"
|
||||||
|
@ -27,20 +27,20 @@ script(type="text/ng-template", id="historyV2AddLabelModalTemplate")
|
||||||
novalidate
|
novalidate
|
||||||
)
|
)
|
||||||
.modal-header
|
.modal-header
|
||||||
h3 Add label
|
h3 #{translate("history_add_label")}
|
||||||
.modal-body
|
.modal-body
|
||||||
.alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
|
.alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
|
||||||
.alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
|
.alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
|
||||||
.form-group
|
.form-group
|
||||||
input.form-control(
|
input.form-control(
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="New label name"
|
placeholder=translate("history_new_label_name")
|
||||||
ng-model="inputs.labelName"
|
ng-model="inputs.labelName"
|
||||||
focus-on="open"
|
focus-on="open"
|
||||||
required
|
required
|
||||||
)
|
)
|
||||||
p.help-block(ng-if="update")
|
p.help-block(ng-if="update")
|
||||||
| A new label will be added as of
|
| #{translate("history_new_label_added_at")}
|
||||||
strong {{ update.meta.end_ts | formatDate:'ddd Do MMM YYYY, h:mm a' }}
|
strong {{ update.meta.end_ts | formatDate:'ddd Do MMM YYYY, h:mm a' }}
|
||||||
.modal-footer
|
.modal-footer
|
||||||
button.btn.btn-default(
|
button.btn.btn-default(
|
||||||
|
@ -50,18 +50,18 @@ script(type="text/ng-template", id="historyV2AddLabelModalTemplate")
|
||||||
) #{translate("cancel")}
|
) #{translate("cancel")}
|
||||||
input.btn.btn-primary(
|
input.btn.btn-primary(
|
||||||
ng-disabled="addLabelModalForm.$invalid || state.inflight"
|
ng-disabled="addLabelModalForm.$invalid || state.inflight"
|
||||||
ng-value="state.inflight ? 'Adding label' : 'Add label'"
|
ng-value="state.inflight ? '" + translate("history_adding_label") + "' : '" + translate("history_add_label") + "'"
|
||||||
type="submit"
|
type="submit"
|
||||||
)
|
)
|
||||||
|
|
||||||
script(type="text/ng-template", id="historyV2DeleteLabelModalTemplate")
|
script(type="text/ng-template", id="historyV2DeleteLabelModalTemplate")
|
||||||
.modal-header
|
.modal-header
|
||||||
h3 Delete label
|
h3 #{translate("history_delete_label")}
|
||||||
.modal-body
|
.modal-body
|
||||||
.alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
|
.alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
|
||||||
.alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
|
.alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
|
||||||
p.help-block(ng-if="labelDetails")
|
p.help-block(ng-if="labelDetails")
|
||||||
| Are you sure you want to delete the following label:
|
| #{translate("history_are_you_sure_delete_label")}
|
||||||
strong "{{ labelDetails.comment }}"
|
strong "{{ labelDetails.comment }}"
|
||||||
| ?
|
| ?
|
||||||
.modal-footer
|
.modal-footer
|
||||||
|
@ -74,4 +74,4 @@ script(type="text/ng-template", id="historyV2DeleteLabelModalTemplate")
|
||||||
type="button"
|
type="button"
|
||||||
ng-click="deleteLabel()"
|
ng-click="deleteLabel()"
|
||||||
ng-disabled="state.inflight"
|
ng-disabled="state.inflight"
|
||||||
) {{ state.inflight ? 'Deleting label' : 'Delete label' }}
|
) {{ state.inflight ? '#{translate("history_deleting_label")}' : '#{translate("history_delete_label")}' }}
|
||||||
|
|
|
@ -2,7 +2,7 @@ define [
|
||||||
"base"
|
"base"
|
||||||
"ide/history/util/displayNameForUser"
|
"ide/history/util/displayNameForUser"
|
||||||
], (App, displayNameForUser) ->
|
], (App, displayNameForUser) ->
|
||||||
historyEntryController = ($scope, $element, $attrs, $filter, _) ->
|
historyEntryController = ($scope, $element, $attrs, _) ->
|
||||||
ctrl = @
|
ctrl = @
|
||||||
_getUserById = (id) ->
|
_getUserById = (id) ->
|
||||||
_.find ctrl.users, (user) ->
|
_.find ctrl.users, (user) ->
|
||||||
|
|
Loading…
Reference in a new issue