Fixes obsolete texts or add translations. Fixes #813

This commit is contained in:
Denny Bresch 2019-08-12 09:49:48 +02:00 committed by Martin Edenhofer
parent 19ca528635
commit 29c9d3546b
15 changed files with 37 additions and 31 deletions

View file

@ -243,7 +243,7 @@ class App.ControllerGenericDescription extends App.ControllerModal
head: 'Description'
content: =>
marked(@description)
marked(App.i18n.translateContent(@description))
onSubmit: =>
@close()

View file

@ -149,7 +149,8 @@ class BotAdd extends App.ControllerModal
error: (xhr) =>
data = JSON.parse(xhr.responseText)
@formEnable(e)
@el.find('.alert').removeClass('hidden').text(data.error || 'Unable to save Bot.')
error_message = App.i18n.translateContent(data.error || 'Unable to save Bot.')
@el.find('.alert').removeClass('hidden').text(error_message)
)
class BotEdit extends App.ControllerModal
@ -196,7 +197,8 @@ class BotEdit extends App.ControllerModal
error: (xhr) =>
data = JSON.parse(xhr.responseText)
@formEnable(e)
@el.find('.alert').removeClass('hidden').text(data.error || 'Unable to save changes.')
error_message = App.i18n.translateContent(data.error || 'Unable to save changes.')
@el.find('.alert').removeClass('hidden').text(error_message)
)
App.Config.set('Telegram', { prio: 5100, name: 'Telegram', parent: '#channels', target: '#channels/telegram', controller: Index, permission: ['admin.channel_telegram'] }, 'NavBarAdmin')

View file

@ -153,8 +153,8 @@ class Index extends App.ControllerSubContent
syncChanges: =>
@loader = new App.ControllerModalLoading(
head: 'Get latest translations'
message: 'Getting latest translations from i18n.zammad.com'
head: App.i18n.translateContent('Get latest translations')
message: App.i18n.translateContent('Getting latest translations from i18n.zammad.com')
container: @el.closest('.content')
)
hide = =>

View file

@ -48,8 +48,8 @@ class Widget extends App.Controller
maintanaceRestartAuto: (data) =>
return if @messageRestartAuto
@messageRestartAuto = new App.SessionMessage(
head: 'Zammad is restarting...'
message: 'Some system settings have changed, Zammad is restarting. Please wait until Zammad is back again.'
head: App.i18n.translateContent('Zammad is restarting...')
message: App.i18n.translateContent('Some system settings have changed, Zammad is restarting. Please wait until Zammad is back again.')
keyboard: false
backdrop: false
buttonClose: false
@ -64,8 +64,8 @@ class Widget extends App.Controller
maintanaceRestartManual: (data) =>
return if @messageRestartManual
@messageRestartManual = new App.SessionMessage(
head: 'Zammad need a restart!'
message: 'Some system settings have changed, please restart all Zammad processes! If you want to do this automatically, set environment variable APP___RESTART___CMD="/path/to/your___app___script.sh restart".'
head: App.i18n.translateContent('Zammad need a restart!')
message: App.i18n.translateContent('Some system settings have changed, please restart all Zammad processes! If you want to do this automatically, set environment variable APP___RESTART___CMD="/path/to/your___app___script.sh restart".')
keyboard: false
backdrop: false
buttonClose: false
@ -79,8 +79,8 @@ class Widget extends App.Controller
maintanaceConfigChanged: (data) =>
return if @messageConfigChanged
@messageConfigChanged = new App.SessionMessage(
head: 'Config has changed'
message: 'The configuration of Zammad has changed, please reload your browser.'
head: App.i18n.translateContent('Config has changed')
message: App.i18n.translateContent('The configuration of Zammad has changed, please reload your browser.')
keyboard: false
backdrop: true
buttonClose: false
@ -99,8 +99,8 @@ class Widget extends App.Controller
return if localAppVersion[1] isnt 'true'
message = =>
@messageAppVersion = new App.SessionMessage(
head: 'New Version'
message: 'A new version of Zammad is available, please reload your browser.'
head: App.i18n.translateContent('New Version')
message: App.i18n.translateContent('A new version of Zammad is available, please reload your browser.')
keyboard: false
backdrop: true
buttonClose: false

View file

@ -55,6 +55,7 @@ class App.Macro extends App.Model
]
@description = '''
Macros are....
Macros make it easy to automate common, multi-step tasks within Zammad.
You can use macros in Zammad to automate recurring sequences, saving time (and nerves). This allows a combined sequence of actions on the ticket to be executed with just one click.
'''

View file

@ -20,7 +20,7 @@ class App.Organization extends App.Model
Using **Organisations** you can **group** customers. This has among others two important benefits:
1. As an **Agent** you do not only have an overview of the open tickets for one person but an **overview over their whole organisation**.
2. As a **Customer** you can also check the **Tickets which your colleagues created** and modify their tickets (if your organization is set to "shared", which can be defined per organization)).
2. As a **Customer** you can also check the **Tickets which your colleagues created** and modify their tickets (if your organization is set to "shared", which can be defined per organization).
'''
uiUrl: ->

View file

@ -81,7 +81,7 @@ class App.Overview extends App.Model
@description = '''
You can create **overviews** for your agents and your customers. These could for instance serve as a sort of work list for items for which your agents would work.
You can also create overvies and limit them to specific agents or to groups of agents.
You can also create overviews and limit them to specific agents or to groups of agents.
'''
uiUrl: ->

View file

@ -38,7 +38,7 @@ class App.TextModule extends App.Model
# coffeelint: disable=no_interpolation_in_single_quotes
@description = '''
Create Text Modules to **spend less time writing responses**. TextModules can include smart variables like the users name or email address.
Create Text Modules to **spend less time writing responses**. Text Modules can include smart variables like the users name or email address.
Examples of snippets are:

View file

@ -14,9 +14,12 @@ class App.Trigger extends App.Model
@configure_overview = [
'name',
]
###
@description = '''
Trigger are....
@description = '''
Every time a customer creates a new ticket, they automatically receive a confirmation email to assure them that their issue has been submitted successfully. This behavior is built into Zammad, but its also highly customizable, and you can set up other automated actions just like it.
Maybe you want to set a higher priority on any ticket with the word urgent in the title. Maybe you want to avoid sending auto-reply emails to customers from certain organizations. Maybe you want mark a ticket as pending whenever someone adds an internal note to a ticket.
Whatever it is, you can do it with triggers: actions that watch tickets for certain changes, and then fire off whenever those changes occur.
'''
###

View file

@ -288,11 +288,11 @@ class App.User extends App.Model
@outOfOfficeTextPlaceholder: ->
today = new Date()
outOfOfficeText = 'Christmas holiday'
outOfOfficeText = App.i18n.translateContent('Christmas holiday')
if today.getMonth() < 3
outOfOfficeText = 'Easter holiday'
outOfOfficeText = App.i18n.translateContent('Easter holiday')
else if today.getMonth() < 9
outOfOfficeText = 'Summer holiday'
outOfOfficeText = App.i18n.translateContent('Summer holiday')
outOfOfficeText
outOfOfficeText: ->

View file

@ -2,7 +2,7 @@
<fieldset>
<h1><%- @T('Wall') %></h1>
<p class="description"><%- @T('Choose which group %s will get added to.', 'wall postings') %></p>
<p class="description"><%- @T('Choose the group in which wall postings will get added to.') %></p>
<div class="js-wall">
<h2><%= @channel.options.user.name %></h2>
<div data-page-id="<%= @channel.options.user.id %>" class="js-groups"></div>
@ -11,7 +11,7 @@
<hr>
<h1><%- @T('Pages') %></h1>
<p class="description"><%- @T('Choose which group %s will get added to.', 'page postings') %></p>
<p class="description"><%- @T('Choose the group in which page postings will get added to.') %></p>
<div class="js-pages">
<% if @channel.options.pages: %>
<% for page in @channel.options.pages: %>

View file

@ -11,7 +11,7 @@
<%- @Icon('status', 'ok inline') %>
<% else: %>
<%- @Icon('status', 'error inline') %>
<% end %></span> <input id="out_of_office_reason" name="out_of_office_text" class="form-control form-control--inline" type="text" placeholder="<%- @Ti('e. g.') %> <%- @Ti(@placeholder) %>" value="<% if !_.isEmpty(@localData.out_of_office_text): %><%= @localData.out_of_office_text %><% end %>"></h2>
<% end %></span> <input id="out_of_office_reason" name="out_of_office_text" class="form-control form-control--inline" type="text" placeholder="<%- @Ti('e.g.') %> <%- @Ti(@placeholder) %>" value="<% if !_.isEmpty(@localData.out_of_office_text): %><%= @localData.out_of_office_text %><% end %>"></h2>
</div>
</div>
<div class="action-block action-block--flex">

View file

@ -23,7 +23,7 @@
</div>
<div class="input form-group">
<div class="formGroup-label">
<label for=""><%- @T('Choose which group %s will get added to.', 'messages') %> <span>*</span></label>
<label for=""><%- @T('Choose the group in which messages will get added to.') %> <span>*</span></label>
</div>
<div class="controls">
<div class="js-messagesGroup"></div>

View file

@ -20,7 +20,7 @@
</div>
<div class="input form-group">
<div class="formGroup-label">
<label for=""><%- @T('Choose which group %s will get added to.', 'messages') %> <span>*</span></label>
<label for=""><%- @T('Choose the group in which messages will get added to.') %> <span>*</span></label>
</div>
<div class="controls">
<div class="js-messagesGroup"></div>

View file

@ -24,11 +24,11 @@
</table>
<h3><%- @T('Mentions Group') %></h3>
<p class="description"><%- @T('Choose which group %s will get added to.', 'mentions') %></p>
<p class="description"><%- @T('Choose the group in which mentions will get added to.') %></p>
<div class="js-mentionsGroup"></div>
<h3><%- @T('Direct Messages Group') %></h3>
<p class="description"><%- @T('Choose which group %s will get added to.', 'direct messages') %></p>
<p class="description"><%- @T('Choose the group in which direct messages will get added to.') %></p>
<div class="js-directMessagesGroup"></div>
<h3><%- @T('Retweets') %></h3>