Make a few string and help page translatable. Fix the recurring todo dialog close button.

This commit is contained in:
Jyri-Petteri Paloposki 2021-01-06 10:54:17 +02:00
parent 465419f46a
commit 31aa6e6516
13 changed files with 163 additions and 12 deletions

View file

@ -841,6 +841,7 @@ var RecurringTodosPage = {
RecurringTodosPage.reset_radio();
$('#recurring_daily').show();
},
closeText: 'X',
appendTo: "#content"
});

View file

@ -54,28 +54,31 @@ module ApplicationHelper
end
def link_to_context(context, descriptor = sanitize(context.name))
link_to(descriptor, context, :title => "View context: #{context.name}")
link_to(descriptor, context, :title => I18n.t("contexts.view_link", :name => context.name))
end
def link_to_project(project, descriptor = sanitize(project.name))
link_to(descriptor, project, :title => "View project: #{project.name}")
link_to(descriptor, project, :title => I18n.t("projects.view_link", :name => project.name))
end
def link_to_edit_note(note, descriptor = sanitize(note.id.to_s))
link_to(descriptor, edit_note_path(note),
{ :id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings" })
:id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings")
end
def link_to_project_mobile(project, accesskey, descriptor = sanitize(project.name))
link_to(descriptor, project_path(project, :format => 'm'), { :title => "View project: #{project.name}", :accesskey => accesskey })
link_to(descriptor, project_path(project, :format => 'm'),
:title => I18n.t("projects.view_link", :name => project.name), :accesskey => accesskey)
end
def item_link_to_context(item)
link_to_context(item.context, prefs.verbose_action_descriptors ? "[#{item.context.name}]" : "[C]")
link_to_context(item.context,
prefs.verbose_action_descriptors ? "[#{item.context.name}]" : "[" + I18n.t("contexts.letter_abbreviation") + "]")
end
def item_link_to_project(item)
link_to_project(item.project, prefs.verbose_action_descriptors ? "[#{item.project.name}]" : "[P]")
link_to_project(item.project,
prefs.verbose_action_descriptors ? "[#{item.project.name}]" : "[" + I18n.t("projects.letter_abbreviation") + "]")
end
def render_flash

View file

@ -1,12 +1,12 @@
<h1>Help</h1>
<h1><%= t('help.title') %></h1>
<p>You can find information on the usage in the <a href="https://github.com/TracksApp/tracks/wiki/User-manual">User manual</a> in the project GitHub wiki.</p>
<p><%= raw t('help.usage', :manual_link => '<a href="https://github.com/TracksApp/tracks/wiki/User-manual">' + t('help.manual_link_text') + '</a>') %></p>
<p>If you encounter a bug or have a feature request, please report it in the <a href="https://github.com/TracksApp/tracks/issues">issue queue</a>.</p>
<p><%= raw t('help.bugs', :issue_link => '<a href="https://github.com/TracksApp/tracks/issues">' + t('help.issue_link_text') + '</a>') %></p>
<p>We gladly welcome all contributions to Tracks. Check the <a href="https://www.getontracks.org/contribute/">project website</a> for further information. You can also come discuss with the community:</p>
<p><%= raw t('help.contribute', :contribute_link => '<a href="https://www.getontracks.org/contribute/">' + t('help.contribute_link_text') + '</a>') %></p>
<ul>
<li><a href="http://groups.google.com/group/TracksApp">Mailing list</a></li>
<li><a href="https://webchat.freenode.net/#Tracks">IRC channel #Tracks@FreeNode</a> (also available in <a href="https://matrix.to/#/#tracks:matrix.org">Matrix</a>)</li>
<li><a href="http://groups.google.com/group/TracksApp"><%= t('help.mailing_list_link_text') %></a></li>
<li><%= raw t('help.irc_bullet', :irc_link => '<a href="https://webchat.freenode.net/#Tracks">' + t('help.irc_link_text') + '</a>', :matrix_link => '<a href="https://matrix.to/#/#tracks:matrix.org">' + t('help.matrix_link_text') + '</a>') %></li>
</ul>