mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
Add i18n.
This commit is contained in:
parent
6e7e76a3ce
commit
f858786f2d
4 changed files with 20 additions and 16 deletions
|
@ -53,18 +53,18 @@ aside.change-list(
|
|||
div.description(ng-click="select()")
|
||||
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
||||
div.action.action-edited(ng-if="history.isV2 && update.pathnames.length > 0")
|
||||
| Edited
|
||||
| #{translate("file-action-edited")}
|
||||
div.docs(ng-repeat="pathname in update.pathnames")
|
||||
.doc {{ pathname }}
|
||||
div.docs(ng-repeat="project_op in update.project_ops")
|
||||
div(ng-if="project_op.rename")
|
||||
.action Renamed
|
||||
.action #{translate("file-action-renamed")}
|
||||
.doc {{ project_op.rename.pathname }} → {{ project_op.rename.newPathname }}
|
||||
div(ng-if="project_op.add")
|
||||
.action Created
|
||||
.action #{translate("file-action-created")}
|
||||
.doc {{ project_op.add.pathname }}
|
||||
div(ng-if="project_op.remove")
|
||||
.action Deleted
|
||||
.action #{translate("file-action-deleted")}
|
||||
.doc {{ project_op.remove.pathname }}
|
||||
div.users
|
||||
div.user(ng-repeat="update_user in update.meta.users")
|
||||
|
|
|
@ -67,18 +67,18 @@ aside.change-list(
|
|||
div.description(ng-click="select()")
|
||||
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
||||
div.action.action-edited(ng-if="history.isV2 && update.pathnames.length > 0")
|
||||
| Edited
|
||||
| #{translate("file-action-edited")}
|
||||
div.docs(ng-repeat="pathname in update.pathnames")
|
||||
.doc {{ pathname }}
|
||||
div.docs(ng-repeat="project_op in update.project_ops")
|
||||
div(ng-if="project_op.rename")
|
||||
.action Renamed
|
||||
.action #{translate("file-action-renamed")}
|
||||
.doc {{ project_op.rename.pathname }} → {{ project_op.rename.newPathname }}
|
||||
div(ng-if="project_op.add")
|
||||
.action Created
|
||||
.action #{translate("file-action-created")}
|
||||
.doc {{ project_op.add.pathname }}
|
||||
div(ng-if="project_op.remove")
|
||||
.action Deleted
|
||||
.action #{translate("file-action-deleted")}
|
||||
.doc {{ project_op.remove.pathname }}
|
||||
div.users
|
||||
div.user(ng-repeat="update_user in update.meta.users")
|
||||
|
@ -133,12 +133,20 @@ script(type="text/ng-template", id="historyEntryTpl")
|
|||
li.history-entry-change(
|
||||
ng-repeat="pathname in ::$ctrl.entry.pathnames"
|
||||
)
|
||||
span.history-entry-change-action Edited
|
||||
span.history-entry-change-action #{translate("file-action-edited")}
|
||||
span.history-entry-change-doc {{ ::pathname }}
|
||||
li.history-entry-change(
|
||||
ng-repeat="project_op in ::$ctrl.entry.project_ops"
|
||||
)
|
||||
span.history-entry-change-action {{ ::$ctrl.getProjectOpAction(project_op) }}
|
||||
span.history-entry-change-action(
|
||||
ng-if="::project_op.rename"
|
||||
) #{translate("file-action-renamed")}
|
||||
span.history-entry-change-action(
|
||||
ng-if="::project_op.add"
|
||||
) #{translate("file-action-created")}
|
||||
span.history-entry-change-action(
|
||||
ng-if="::project_op.remove"
|
||||
) #{translate("file-action-deleted")}
|
||||
span.history-entry-change-doc {{ ::$ctrl.getProjectOpDoc(project_op) }}
|
||||
.history-entry-metadata
|
||||
time.history-entry-metadata-time {{ ::$ctrl.entry.meta.end_ts | formatDate:'h:mm a' }}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
span(ng-show="history.loadingFileTree")
|
||||
i.fa.fa-spin.fa-refresh
|
||||
| #{translate("loading")}...
|
||||
span(ng-show="!history.loadingFileTree") Browsing project as of
|
||||
span(ng-show="!history.loadingFileTree") #{translate("browsing-project-as-of")}
|
||||
time.history-toolbar-time {{ history.selection.updates[0].meta.end_ts | formatDate:'Do MMM YYYY, h:mm a' }}
|
||||
.history-toolbar-btn(
|
||||
ng-click="toggleHistoryViewMode();"
|
||||
)
|
||||
i.fa
|
||||
| Compare project versions
|
||||
| #{translate("compare-project-versions")}
|
|
@ -5,10 +5,6 @@ define [
|
|||
historyEntryController = ($scope, $element, $attrs) ->
|
||||
ctrl = @
|
||||
ctrl.displayName = displayNameForUser
|
||||
ctrl.getProjectOpAction = (projectOp) ->
|
||||
if projectOp.rename? then "Renamed"
|
||||
else if projectOp.add? then "Created"
|
||||
else if projectOp.remove? then "Deleted"
|
||||
ctrl.getProjectOpDoc = (projectOp) ->
|
||||
if projectOp.rename? then "#{ projectOp.rename.pathname} → #{ projectOp.rename.newPathname }"
|
||||
else if projectOp.add? then "#{ projectOp.add.pathname}"
|
||||
|
|
Loading…
Reference in a new issue