Add remote translation button
- Create partial to render remote translation button. This button will send remote_translations as json to remote translations controller. - Add locales - Add styles Co-Authored-By: alessandro <agileontheweb@gmail.com>
This commit is contained in:
@@ -474,6 +474,26 @@ header {
|
||||
}
|
||||
}
|
||||
|
||||
.remote-translations-button {
|
||||
|
||||
.callout {
|
||||
margin: 0;
|
||||
padding: rem-calc(6);
|
||||
|
||||
[type="submit"] {
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
color: $brand;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.external-links {
|
||||
float: none;
|
||||
padding: rem-calc(6) 0;
|
||||
|
||||
11
app/views/shared/_remote_translations_button.html.erb
Normal file
11
app/views/shared/_remote_translations_button.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="remote-translations-button callout primary text-center">
|
||||
<% if display_remote_translation_button?(remote_translations) %>
|
||||
<%= form_tag remote_translations_path do %>
|
||||
<%= hidden_field_tag :remote_translations, remote_translations.to_json %>
|
||||
<%= t("remote_translations.text") %>
|
||||
<%= submit_tag t("remote_translations.button") %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= t("remote_translations.all_remote_translations_enqueued_text") %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -1034,5 +1034,7 @@ en:
|
||||
borda: Borda votation
|
||||
dowdall: Dowdall votation
|
||||
remote_translations:
|
||||
text: The content of this page is not available in your language
|
||||
create:
|
||||
enqueue_remote_translation: Translations have been correctly requested.
|
||||
button: Translate page
|
||||
|
||||
@@ -1031,5 +1031,7 @@ es:
|
||||
borda: Votación con recuento Borda
|
||||
dowdall: Votación con recuento Dowdall
|
||||
remote_translations:
|
||||
text: El contenido de esta página no está disponible en tu idioma
|
||||
create:
|
||||
enqueue_remote_translation: Se han solicitado correctamente las traducciones.
|
||||
button: Traducir página
|
||||
|
||||
Reference in New Issue
Block a user