Make a few more targets translatable. Tracks should now be pretty close to fully translatable.

This commit is contained in:
Jyri-Petteri Paloposki 2021-01-11 00:15:44 +02:00
parent f2abb970ed
commit 971ef477e5
21 changed files with 457 additions and 403 deletions

View file

@ -1,4 +1,4 @@
<h3>Map fields to be imported<h3>
<h3><%= I18n.t 'data.import.map_title' %><h3>
<%= form_tag csv_import_data_path do %>
<% @labels.each do |l| %>
<%= label_tag l %>:
@ -7,5 +7,5 @@
<% end %>
<%= hidden_field_tag :file, @filename %>
<%= hidden_field_tag :import_to, @import_to %>
<%= submit_tag "Import" %>
<%= submit_tag I18n.t("data.import.submit") %>
<% end %>

View file

@ -1,15 +1,15 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h2>Importing data</h2>
<h2><%= I18n.t "data.import.header" %></h2>
<div>
<h3>Please upload your CSV file</h3>
<h3><%= I18n.t "data.import.upload_csv" %></h3>
<%= form_tag csv_map_data_path, :id => 'upload_form', multipart: true do %>
<label for="import_to">Import to:</label>
<label for="import_to"><%= I18n.t "data.import.target_field" %></label>
<%= select_tag(:import_to, options_for_select([['Projects', 'projects'], ['Todos', 'todos']], 1) ) %>
<br><br>
<%= file_field_tag :file %>
<%= submit_tag "Upload", :id => "upload_form_submit" %>
<%= submit_tag I18n.t("data.import.upload"), :id => "upload_form_submit" %>
<% end %>
</div>
</div>

View file

@ -1,36 +0,0 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3>Daten exportieren</h3>
<p>Sie k&ouml;nnen zwischen den folgenden Formaten w&auml;hlen:</p>
<ul>
<li><strong>YAML: </strong>F&uuml;r den Daten-Import bevorzugt.<br/><i>Bitte beachten Sie, dass der YAML-Import zur Zeit noch experimentelle Funktionalit&auml;t darstellt. Nutzen Sie diese Option also nicht. um kritische Daten zu sichern.</i></li>
<li><strong>CSV: </strong>Am besten f&uuml;r den Export in eine Tabellen-Kalkulation oder &auml;hnliche Auswertungs-Software geeignet</li>
<li><strong>XML: </strong>Am besten f&uuml;r den Daten-Import oder automatische Weiterverarbeitung</li>
</ul>
</div>
<br/><br/>
<table class="export_table">
<tr>
<th>Beschreibung</th>
<th>Download link</th>
</tr>
<tr>
<td>YAML-Datei mit all Ihren Aktionen, Umgebungen, Projekten, Tags und Notizen</td>
<td><%= link_to "YAML Datei", :controller => 'data', :action => 'yaml_export' %></td>
</tr>
<tr>
<td>CSV-Datei mit all Ihren Aktionen, benannten Umgebungen und Projekten</td>
<td><%= link_to "CSV Dile (Aktionen, Umgebungen und Projekte)", :controller => 'data', :action => 'csv_actions' %></td>
</tr>
<tr>
<td>CSV-Datei mit all Ihren Notizen</td>
<td><%= link_to "CSV Datei (nur Notizen)", :controller => 'data', :action => 'csv_notes' %></td>
</tr>
<tr>
<td>XML-Datei mit all Ihren Aktionen, Umgebungen, Projekten, Tags und Notizen</td>
<td><%= link_to "XML file (actions only)", :controller => 'data', :action => 'xml_export' %></td>
</tr>
</table>
</div><!-- End of feeds -->
</div>

View file

@ -1,36 +0,0 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3>Exporting data</h3>
<p>You can choose between the following formats:</p>
<ul>
<li><strong>YAML: </strong>Best for exporting data. <br/><i>Please note that importing YAML files is currently supported only in experimentally. Do not rely on it for backing up critical data.</i></li>
<li><strong>CSV: </strong>Best for importing into spreadsheet or data analysis software</li>
<li><strong>XML: </strong>Best for importing or repurposing the data</li>
</ul>
</div>
<br/><br/>
<table class="export_table">
<tr>
<th>Description</th>
<th>Download link</th>
</tr>
<tr>
<td>YAML file containing all your actions, contexts, projects, tags and notes</td>
<td><%= link_to "YAML file", data_yaml_export_path %></td>
</tr>
<tr>
<td>CSV file containing all of your actions, with named contexts and projects</td>
<td><%= link_to "CSV file (actions, contexts and projects)", data_csv_actions_path %></td>
</tr>
<tr>
<td>CSV file containing all your notes</td>
<td><%= link_to "CSV file (notes only)", data_csv_notes_path %></td>
</tr>
<tr>
<td>XML file containing all your actions, contexts, projects, tags and notes</td>
<td><%= link_to "XML file (actions only)", data_xml_export_path %></td>
</tr>
</table>
</div><!-- End of feeds -->
</div>

View file

@ -1,36 +0,0 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3>Exportar datos</h3>
<p>Puede escoger entre los siguientes formatos:</p>
<ul>
<li><strong>YAML: </strong>Mejor formato para exportar datos. <br/><i>Por favor tenga en cuenta que la importación de ficheros YAML actualmente esta soportada de forma experimental. No confíe en este formato para hacer copias de seguridad de datos importantes.</i></li>
<li><strong>CSV: </strong>Mejor formato para importar en una hoja de cálculo o en programas de análisis de datos.</li>
<li><strong>XML: </strong>Mejor formato para transformar los datos a otro formato</li>
</ul>
</div>
<br/><br/>
<table class="export_table">
<tr>
<th>Descripción</th>
<th>Enlace de descarga</th>
</tr>
<tr>
<td>Fichero YAML con todas sus acciones, contextos, proyectos, etiquetas y notas</td>
<td><%= link_to "Fichero YAML", data_yaml_export_path %></td>
</tr>
<tr>
<td>Fichero CSV con todas sus acciones, con contextos por nombre y proyectos</td>
<td><%= link_to "Fichero CSV (acciones, contextos y proyectos)", data_csv_actions_path %></td>
</tr>
<tr>
<td>Fichero CSV con todas sus notas</td>
<td><%= link_to "Fichero CSV (sólo notas)", data_csv_notes_path %></td>
</tr>
<tr>
<td>Fichero XML con todas sus acciones, contextos, proyectos, etiquetas y notas</td>
<td><%= link_to "Fichero XML", data_xml_export_path %></td>
</tr>
</table>
</div><!-- End of feeds -->
</div>

View file

@ -0,0 +1,36 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3><%= I18n.t "data.export.title" %></h3>
<p><%= I18n.t "data.export.format_header" %></p>
<ul>
<li><%= raw I18n.t "data.export.yaml_description", yaml: "<strong>" + I18n.t("data.yaml") + "</strong>" %><br/><em><%= I18n.t "data.export.yaml_experimental" %></em></li>
<li><%= raw I18n.t "data.export.csv_description", csv: "<strong>" + I18n.t("data.csv") + "</strong>" %></li>
<li><%= raw I18n.t "data.export.xml_description", xml: "<strong>" + I18n.t("data.xml") + "</strong>" %></li>
</ul>
</div>
<br/><br/>
<table class="export_table">
<tr>
<th><%= I18n.t "common.description" %></th>
<th><%= I18n.t "data.export.download_link" %></th>
</tr>
<tr>
<td><%= I18n.t "data.export.yaml_link_description" %></td>
<td><%= link_to I18n.t("data.export.yaml_link_title"), data_yaml_export_path %></td>
</tr>
<tr>
<td><%= I18n.t "data.export.csv_actions_description" %></td>
<td><%= link_to I18n.t("data.export.csv_actions_title"), data_csv_actions_path %></td>
</tr>
<tr>
<td><%= I18n.t "data.export.csv_notes_description" %></td>
<td><%= link_to I18n.t("data.export.csv_notes_title"), data_csv_notes_path %></td>
</tr>
<tr>
<td><%= I18n.t "data.export.xml_link_description" %></td>
<td><%= link_to I18n.t('data.export.xml_link_title'), data_xml_export_path %></td>
</tr>
</table>
</div>
</div>

View file

@ -1,17 +0,0 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<p><b>Vorsicht</b>: vor dem Import der YAML Datei werden alle Daten in Ihrer Datenbank gel&ouml;scht.
Falls Sie entsprechenden Zugriff auf Ihre Datenbank haben, empfiehlt es sich, ein Backup anzulegen,
bevor Sie fortfahren.
</p>
<p>F&uuml;gen Sie den Inhalt der kopierten YAML Datei in das untenstehende Formular ein:</p>
</div>
<p>
<%= form_for :import, @import, :url => {:controller => 'data', :action => 'yaml_import'} do |f| %>
<%= f.text_area :yaml %><br />
<input type="submit" value="Daten importieren">
<% end %>
</p>
</div><!-- End of feeds -->
</div><!-- End of display_box -->

View file

@ -1,17 +0,0 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<p><b>Beware</b>: all your current data will be destroyed before importing
the YAML file, so if you have access to the database, we strongly recommend
backing up the database right now in case that anything goes wrong.
</p>
<p>Paste the contents of the YAML file you exported into the text box below:</p>
</div>
<p>
<%= form_for :import, @import, :url => {:controller => 'data', :action => 'yaml_import'} do |f| %>
<%= f.text_area :yaml %><br />
<input type="submit" value="Import data">
<% end %>
</p>
</div><!-- End of feeds -->
</div><!-- End of display_box -->

View file

@ -0,0 +1,14 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<p><%= raw I18n.t "data.import.yaml_warning", warning: '<strong>' + I18n.t('data.import.warning') + '</strong>' %></p>
<p><%= I18n.t "data.import.paste_field" %></p>
</div>
<p>
<%= form_for :import, @import, :url => {:controller => 'data', :action => 'yaml_import'} do |f| %>
<%= f.text_area :yaml %><br />
<input type="submit" value="<%= I18n.t 'data.import.submit' %>">
<% end %>
</p>
</div><!-- End of feeds -->
</div><!-- End of display_box -->

View file

@ -1,5 +1,5 @@
<% if !(@errmessage == '') %>
<p><%= t('data.import_errors') %>:<pre><%= @errmessage %></pre></p>
<p><%= t('data.import.errors.some') %>:<pre><%= @errmessage %></pre></p>
<% else %>
<p><%= t('data.import_successful') %></p>
<p><%= t('data.import.successful') %></p>
<% end %>