a#UM!IDRk1`@fYA{(upWveDrhHjEd<)B`7RIq-vIox%N+heuj-QnXG
z!<=}Q?>*(x7^z`hi%3}-C%z3?CXO=KJszn)8Dm20uj@B~pF5+oYz5AALD4*&oF
diff --git a/languages/it.po b/languages/it.po
index 634f682..184eb98 100644
--- a/languages/it.po
+++ b/languages/it.po
@@ -24,56 +24,100 @@ msgstr ""
msgid "Multilanguage"
msgstr "Multilingua"
-#: MultilanguagePlugin.php:56 MultilanguagePlugin.php:62
-#: views/shared/user-language/user-language.php:2
+#: MultilanguagePlugin.php:56 MultilanguagePlugin.php:335
+#: MultilanguagePlugin.php:56 MultilanguagePlugin.php:579
+#: views/shared/user-language/user-language.php:3
msgid "Preferred Language"
msgstr "Lingua preferita"
-#: MultilanguagePlugin.php:64
-msgid "Multilanguage Content"
-msgstr "Contenuto multilingua"
+#: MultilanguagePlugin.php:335
+msgid "Default language is %s."
+msgstr "La lingua predefinita è %s."
-#: MultilanguagePlugin.php:228
+#: MultilanguagePlugin.php:608
msgid "Translate to: "
-msgstr "Traduci in:"
+msgstr "Traduci in: "
-#: config_form.php:4
+#: views/admin/plugins/multilanguage-config-form.php:2
+msgid "To learn more about translating the core interfaces, %sread this%s."
+msgstr "Per saperne di più sulla traduzione dell'interfaccia principale, %sleggi questo%s."
+
+#: views/admin/plugins/multilanguage-config-form.php:7
+msgid "Automatically append to header"
+msgstr "Aggiungi automaticamente all'intestazione"
+
+#: views/admin/plugins/multilanguage-config-form.php:10
+msgid "If checked, the switcher will be automatically displayed via the hook \"public_header\", else you need to put it in your theme."
+msgstr "Se selezionato, le opzioni di scelta verranno automaticamente mostrate tramite l'hook \"public_header\", altrimenti dovrai inserirli manualmente nel tuoi tema."
+
+#: views/admin/plugins/multilanguage-config-form.php:18
+msgid "Reset translations"
+msgstr "Annulla le traduzioni"
+
+#: views/admin/plugins/multilanguage-config-form.php:22
+msgid "Reset all translations when files in \"plugins/Translations/languages\" or \"themes/my-theme/languages\" were updated manually."
+msgstr "Annulla tutte le traduzioni quandi i file in \"plugins/Translations/languages\" or \"themes/my-theme/languages\" sono aggiornati manualmente."
+
+#: views/admin/plugins/multilanguage-config-form.php:30
+msgid "Language display mode"
+msgstr "Modo di visualizzazione lingua"
+
+#: views/admin/plugins/multilanguage-config-form.php:33
+msgid "Select the language display mode for your site (both Admin and Public side)."
+msgstr "Seleziona il modo di visualizzazione lingua per il tuo sito (sia lato Admin che Pubblico)"
+
+#: views/admin/plugins/multilanguage-config-form.php:36
+msgid "Flag (default)"
+msgstr "Bandiera (predefinito)"
+
+#: views/admin/plugins/multilanguage-config-form.php:37
+msgid "2-letters language code"
+msgstr "Codice lingua di 2 lettere"
+
+#: views/admin/plugins/multilanguage-config-form.php:38
+msgid "Full language name"
+msgstr "Nome intero della lingua"
+
+#: views/admin/plugins/multilanguage-config-form.php:45
+msgid "Languages"
+msgstr "Lingue"
+
+#: views/admin/plugins/multilanguage-config-form.php:48
msgid "Select the languages into which your site can be translated."
-msgstr "Seleziona le lingue in cui può essere tradotto il tuo sito."
+msgstr "Seleziona le lingue in vuoi rendere traducibile il tuo sito"
-#: config_form.php:41
-msgid ""
-"The languages available to translate content. To learn more about "
-"translating the core interfaces, read this."
-msgstr "Lingue disponibili per tradurre i contenuti. Per scoprire di più riguardo alla traduzione delle interfacce principali, leggi questo."
+#: views/admin/plugins/multilanguage-config-form.php:52
+msgid "Language"
+msgstr "Lingua"
-#: config_form.php:49
-msgid "Check the metadata fields that you want to make translatable."
-msgstr "Seleziona i campi di metadati che vuoi rendere traducibili."
+#: views/admin/plugins/multilanguage-config-form.php:53
+msgid "Code"
+msgstr "Codice"
-#: views/admin/translations/content-language.php:2
-msgid "Content Languages"
-msgstr "Lingue dei contenuti"
+#: views/admin/plugins/multilanguage-config-form.php:54
+msgid "Public"
+msgstr "Pubblico"
-#: views/admin/translations/content-language.php:25
-#, php-format
-msgid "Default language is %s"
-msgstr "La lingua predefinita è %s"
+#: views/admin/plugins/multilanguage-config-form.php:55
+msgid "Admin"
+msgstr "Admin"
-#: views/admin/translations/content-language.php:26
-msgid "Exhibits"
-msgstr "Esposizione"
+#: views/admin/plugins/multilanguage-config-form.php:80
+msgid "Record Elements"
+msgstr "Elementi dei record"
-#: views/admin/translations/content-language.php:43
-msgid "Simple Pages"
-msgstr "Simple Pages"
+#: views/admin/plugins/multilanguage-config-form.php:83
+msgid "Check the metadata fields that you want to make translatable."
+msgstr "Seleziona i campi di metadati che vuoi rendere traducibili"
-#: views/shared/user-language/user-language.php:40
-msgid "Select your prefered language"
-msgstr "Scegli la tua lingua preferita"
+#: views/shared/user-language/user-language.php:8
+msgid "Select your preferred language"
+msgstr "Seleziona la tua lingua preferita"
-#: views/shared/user-language/user-language.php:43
-#, php-format
+#: views/shared/user-language/user-language.php:11
msgid "The default language is %s"
-msgstr "La lingua predefinita è %s"
+msgstr "La lingua predefinita è"
+
+#: views/shared/user-language/user-language.php:20
+msgid "Save Changes"
+msgstr "Salva modifiche"
\ No newline at end of file
diff --git a/languages/template.pot b/languages/template.pot
index 5554fb7..0950432 100644
--- a/languages/template.pot
+++ b/languages/template.pot
@@ -9,6 +9,7 @@ msgstr ""
"Project-Id-Version: Locale\n"
"Report-Msgid-Bugs-To: http://github.com/patrickmj/Multilanguage/issues\n"
"POT-Creation-Date: 2014-09-21 17:49-0500\n"
+"PO-Revision-Date: 2021-03-27 22:33+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -20,56 +21,100 @@ msgstr ""
msgid "Multilanguage"
msgstr ""
-#: MultilanguagePlugin.php:56 MultilanguagePlugin.php:62
-#: views/shared/user-language/user-language.php:2
+#: MultilanguagePlugin.php:56 MultilanguagePlugin.php:335
+#: MultilanguagePlugin.php:56 MultilanguagePlugin.php:579
+#: views/shared/user-language/user-language.php:3
msgid "Preferred Language"
msgstr ""
-#: MultilanguagePlugin.php:64
-msgid "Multilanguage Content"
+#: MultilanguagePlugin.php:335
+msgid "Default language is %s."
msgstr ""
-#: MultilanguagePlugin.php:228
+#: MultilanguagePlugin.php:608
msgid "Translate to: "
msgstr ""
-#: config_form.php:4
+#: views/admin/plugins/multilanguage-config-form.php:2
+msgid "To learn more about translating the core interfaces, %sread this%s."
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:7
+msgid "Automatically append to header"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:10
+msgid "If checked, the switcher will be automatically displayed via the hook "public_header", else you need to put it in your theme."
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:18
+msgid "Reset translations"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:22
+msgid "Reset all translations when files in "plugins/Translations/languages" or "themes/my-theme/languages" were updated manually."
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:30
+msgid "Language display mode"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:33
+msgid "Select the language display mode for your site (both Admin and Public side)."
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:36
+msgid "Flag (default)"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:37
+msgid "2-letters language code"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:38
+msgid "Full language name"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:45
+msgid "Languages"
+msgstr ""
+
+#: views/admin/plugins/multilanguage-config-form.php:48
msgid "Select the languages into which your site can be translated."
msgstr ""
-#: config_form.php:41
-msgid ""
-"The languages available to translate content. To learn more about "
-"translating the core interfaces, read this."
+#: views/admin/plugins/multilanguage-config-form.php:52
+msgid "Language"
msgstr ""
-#: config_form.php:49
-msgid "Check the metadata fields that you want to make translatable."
+#: views/admin/plugins/multilanguage-config-form.php:53
+msgid "Code"
msgstr ""
-#: views/admin/translations/content-language.php:2
-msgid "Content Languages"
+#: views/admin/plugins/multilanguage-config-form.php:54
+msgid "Public"
msgstr ""
-#: views/admin/translations/content-language.php:25
-#, php-format
-msgid "Default language is %s"
+#: views/admin/plugins/multilanguage-config-form.php:55
+msgid "Admin"
msgstr ""
-#: views/admin/translations/content-language.php:26
-msgid "Exhibits"
+#: views/admin/plugins/multilanguage-config-form.php:80
+msgid "Record Elements"
msgstr ""
-#: views/admin/translations/content-language.php:43
-msgid "Simple Pages"
+#: views/admin/plugins/multilanguage-config-form.php:83
+msgid "Check the metadata fields that you want to make translatable."
msgstr ""
-#: views/shared/user-language/user-language.php:40
-msgid "Select your prefered language"
+#: views/shared/user-language/user-language.php:8
+msgid "Select your preferred language"
msgstr ""
-#: views/shared/user-language/user-language.php:43
-#, php-format
+#: views/shared/user-language/user-language.php:11
msgid "The default language is %s"
msgstr ""
+
+#: views/shared/user-language/user-language.php:20
+msgid "Save Changes"
+msgstr ""
\ No newline at end of file
From 478369ac1626e214ea8178de52ce654a6457c126 Mon Sep 17 00:00:00 2001
From: DBinaghi <39097246+DBinaghi@users.noreply.github.com>
Date: Sat, 27 Mar 2021 22:47:39 +0100
Subject: [PATCH 15/19] Update README.md
---
README.md | 43 ++++++-------------------------------------
1 file changed, 6 insertions(+), 37 deletions(-)
diff --git a/README.md b/README.md
index 212b904..cd6435c 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,7 @@ Multilanguage (plugin for Omeka)
[Multilanguage] is an [Omeka] plugin that is a limited attempt to make parts of
Omeka multilanguage. It integrates the [locale switcher] from [BibLibre] for
-public front-end and admin back-end, and [Translations], for management of
-translations of specific or hard coded theme strings.
+public front-end and admin back-end.
Installation
@@ -14,6 +13,9 @@ Uncompress files and rename plugin folder `Multilanguage`.
Then install it like any other Omeka plugin and follow the config instructions.
+The plugin [Translations] may be useful too to translate hard-coded strings of
+the theme.
+
Configuration
-------------
@@ -69,36 +71,6 @@ The language of the exhibit pages is forced to their exhibit’s one.
The pages and exhibits with a language that doesn’t match the current language
are still accessible, as long as the link is known or is hard coded somewhere.
-### Translations of specific strings
-
-Often, the theme contains hard-coded strings. To get them translated, you first
-need to translate them, then to make them available in Omeka.
-
-#### Translations of strings
-
-In Omeka, the translations are managed with `.po` files in the directory `application/languages/`
-for the core and in the directory `languages/` of each enabled plugin. This
-plugin works the same.
-
-Simply update the translations files either in the directory `languages/` of the
-current theme, either in the directory `languages/` of the plugin: the main one
-`template.pot` and each translation like `fr.po` and `fr.mo`. You can add any
-language, but respect the names of the files (see `application/languages/`) and
-copy the two files `.po` and `.mo` for each language.
-
-The translations themselves can be created with a tool like [poedit], or [lokalize],
-or any other compliant software or online service.
-
-#### Reset cache of translations
-
-Omeka uses a cache to store translations. To reset it, go the the config page of
-the plugin and check the box. It must be done each time a language is updated.
-
-When the cache is not cleared, you shoud reset the cache manually. You can
-restart the web server or to remove all files starting with `omeka_i18n_cache`
-in the temp directory of the web server, usually `/tmp`, or `/tmp/systemd-private-xxx/tmp`.
-Or wait some hours for the automatic refresh of the translations.
-
### Theme adaptation
#### Standard functions
@@ -121,8 +93,6 @@ metadata($item, array('Dublin Core', 'Description'), array('snippet' => 150));
html_escape(snippet(metadata($item, array('Dublin Core', 'Description'), array('no_escape' => true)), 0, 150));
```
-For the function metadata(), the key `display_title` may not be translated, so
-use `array('Dublin Core', 'Title')`.
#### Specific functions
@@ -225,14 +195,13 @@ Copyright
* Copyright 2015-2016 Patrick Murray-John (see [patrickmj] on Github)
* Copyright 2017 BibLibre (see [BibLibre] on Github)
* Copyright Daniel Berthereau, 2018 (see [Daniel-KM] on GitHub)
+* Copyright Daniele Binaghi, 2021 (see [DBinaghi] on GitHub)
[Multilanguage]: https://github.com/patrickmj/multilanguage
[Omeka]: https://omeka.org
[locale switcher]: https://github.com/Daniel-KM/Omeka-plugin-LocaleSwitcher
[Translations]: https://github.com/Daniel-KM/Omeka-plugin-Translations
-[poedit]: https://poedit.net
-[lokalize]: https://www.kde.org/applications/development/lokalize
[`helpers/functions.php`]: https://github.com/patrickmj/Multilanguage/blob/master/helpers/functions.php
[flag-icon-css]: http://flag-icon-css.lip.is/
[plugin issues]: https://github.com/patrickmj/Multilanguage/issues
@@ -240,4 +209,4 @@ Copyright
[patrickmj]: https://github.com/patrickmj
[BibLibre]: https://github.com/BibLibre
[Daniel-KM]: https://github.com/Daniel-KM "Daniel Berthereau"
-
+[DBinaghi]: https://github.com/DBinaghi "Daniele Binaghi"
From f2bf923487def89555f641422eacf543f1b808d1 Mon Sep 17 00:00:00 2001
From: DBinaghi <39097246+DBinaghi@users.noreply.github.com>
Date: Sat, 27 Mar 2021 22:48:14 +0100
Subject: [PATCH 16/19] Update plugin.ini
---
plugin.ini | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin.ini b/plugin.ini
index ef828a0..c3194ca 100644
--- a/plugin.ini
+++ b/plugin.ini
@@ -5,6 +5,6 @@ description = "Creates multilanguage support for Omeka, with a locale switcher.
license = "GPL-3.0"
link = "https://github.com/patrickmj/Multilanguage"
support_link = "https://github.com/patrickmj/Multilanguage/issues"
-version = "1.5.0"
+version = "1.6.0"
omeka_minimum_version = "2.1"
omeka_target_version = "2.7"
From 49aad9fce77bd5c4661a32844add5952c3f8055d Mon Sep 17 00:00:00 2001
From: DBinaghi <39097246+DBinaghi@users.noreply.github.com>
Date: Sat, 27 Mar 2021 22:58:47 +0100
Subject: [PATCH 17/19] Added display mode switch for Admin sinde
---
MultilanguagePlugin.php | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/MultilanguagePlugin.php b/MultilanguagePlugin.php
index e130efb..b1caf64 100644
--- a/MultilanguagePlugin.php
+++ b/MultilanguagePlugin.php
@@ -541,7 +541,7 @@ public function filterLocale($locale)
public function filterAdminNavigationGlobal($nav)
{
- $showCountryCode = (bool) get_option('multilanguage_show_countrycode');
+ $displayMode = get_option('multilanguage_display_mode');
$enabledLocales = unserialize(get_option('multilanguage_locales_admin'));
if (empty($enabledLocales)) {
return $nav;
@@ -557,12 +557,25 @@ public function filterAdminNavigationGlobal($nav)
$url = url('setlocale', array('locale' => $locale, 'redirect' => $currentUrl));
$title = locale_human($locale);
- if (!$showCountryCode) $class = 'flag-icon flag-icon-' . strtolower($country);
+ $class = '';
+ $label = null;
+
+ switch ($displayMode) {
+ case 'code':
+ $label = '[' . strtolower($country) . ']';
+ break;
+ case 'name':
+ $label = locale_human($locale, true);
+ break;
+ default:
+ $class = 'flag-icon flag-icon-' . strtolower($country);
+ }
+
if ($locale === $currentLocale) {
$class .= ' active';
}
$link = array(
- 'label' => ($showCountryCode ? '[' . $locale . ']' : null),
+ 'label' => $label,
'uri' => $url,
'class' => $class,
'title' => $title,
From 060f9e3bf512b821ac41f6cf11e6deeddb7dce76 Mon Sep 17 00:00:00 2001
From: DBinaghi <39097246+DBinaghi@users.noreply.github.com>
Date: Sat, 27 Mar 2021 23:00:47 +0100
Subject: [PATCH 18/19] Moved $displayMode outside loop
---
views/shared/common/locale-switcher.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/views/shared/common/locale-switcher.php b/views/shared/common/locale-switcher.php
index 7213e39..b97314b 100644
--- a/views/shared/common/locale-switcher.php
+++ b/views/shared/common/locale-switcher.php
@@ -32,9 +32,10 @@
?>
localeToCountry($locale);
- switch (get_option('multilanguage_display_mode')) {
+ switch ($displayMode) {
case "code":
$content = "[" . strtolower($country) . "]";
break;
From 765edee2f9e8cd10daa6bb6e6dd3edbb3ce7e928 Mon Sep 17 00:00:00 2001
From: DBinaghi <39097246+DBinaghi@users.noreply.github.com>
Date: Thu, 2 Sep 2021 17:43:28 +0200
Subject: [PATCH 19/19] Added new line break for flex styling
---
MultilanguagePlugin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MultilanguagePlugin.php b/MultilanguagePlugin.php
index b1caf64..e095f17 100644
--- a/MultilanguagePlugin.php
+++ b/MultilanguagePlugin.php
@@ -629,7 +629,7 @@ public function filterTranslateField($components, $args)
$code
);
}
- $components['form_controls'] .= '';
+ $components['form_controls'] .= '';
return $components;
}