Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed incorrect Italian chars value and translated new lines #1090

Closed
wants to merge 1 commit into from

3 participants

@ghost

This fix removes a database error when saving a new theme selection.

@philsturgeon philsturgeon commented on the diff
...m/cms/modules/themes/language/italian/themes_lang.php
((11 lines not shown))
$lang['themes.set_default_error'] = 'Impossibile impostare "%s" come nuovo tema predefinito.';
-$lang['themes.already_exists_error'] = 'Esiste già un tema con questo nome.';
+$lang['themes.already_exists_error'] = 'Esiste già un tema con questo nome.';
@philsturgeon Owner

Is there a reason not to have the actual characters there? It should display fine, as we do it for other languages.

@ghost
ghost added a note

Yes, importing the php file and editing it, the line 6 was like that:
-->$lang['themes.set_default_success'] = 'Il tema "%s" Ë ora il tuo nuovo tema predefinito.';
so the char "è" changed in "Ë".

This caused a db error during the UPDATE query
-->"Error Number: 1366 Incorrect string value: '\xE8 ora ...' for column 'user_data' at row 1 ..."

That's why I changed the special char at line 8 as well.
Now I can change the frontend themes and it works without errors.

@philsturgeon Owner

This has been known to happen when character encoding is set wrong in a theme file. We have UTF-8 characters in all languages and have not had any problems reported so far.

@ghost
ghost added a note

I don't think it's a problem of template file, because I'm using the default one and I didn't change any line of code.
The problem is in the language file.
When I select the template I want to change and I'm going to save there is a problem at C.I. level (model side)

Error Number: 1366

Incorrect string value: '\xE8 ora ...' for column 'user_data' at row 1

UPDATE `default_ci_sessions` SET `last_activity` = 1326717914, `user_data`
=
'a:8:{s:9:\"user_data\";s:0:\"\";s:8:\"username\";s:5:\"xxxx\";s:5:\"email\";s:16:\"
xxx@xxxxx.it\";s:2:\"id\";s:1:\"1\";s:7:\"user_id\";s:1:\"1\";s:8:\"group_id\";s:1:\"1\";s:5:\"group\";s:5:\"admin\";s:17:\"flash:new:success\";s:58:\"Il
tema \"conjuction\" � ora il tuo nuovo tema predefinito.\";}' WHERE
`session_id` = '526030ef51a796bc4bd5d8e4ee8c58c3'

As you can see the problem is in the flash data of session, used to show the success message in the backend.

I'm using Coda(Panic) editor and my character setting is UTF-8.

Anyway, as good practice, I suggest to use html entities for italian accented characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@petsagouris

@philsturgeon is correct, The encoding of the file is not UTF8 (no BOM). I checked but there is some problem and I can't push to make a pull request about it.

@petsagouris

@ghost please go ahead and change the encoding to UTF8 without BOM (this can be done easily in Notepad++) and please request a pull again so that the problem is solved. Make sure you use the proper characters (not the HTML character codes).

@jerel jerel closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 22, 2012
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +7 −7 system/cms/modules/themes/language/italian/themes_lang.php
View
14 system/cms/modules/themes/language/italian/themes_lang.php
@@ -1,11 +1,11 @@
<?php
-$lang['themes.save_success'] = 'The theme options have been saved successfully.'; #translate
-$lang['themes.re-index_success'] = 'The theme options have been re-indexed successfully'; #translate
-$lang['themes.no_options'] = 'This theme has no options.'; #translate
-$lang['themes.set_default_success'] = 'Il tema "%s" è ora il tuo nuovo tema predefinito.';
+$lang['themes.save_success'] = 'I parametri del tema sono stati salvati correttamente.';
+$lang['themes.re-index_success'] = 'I parametri del tema sono stati re-indicizzati correttamente';
+$lang['themes.no_options'] = 'Questo tema non ha parametri da configurare.';
+$lang['themes.set_default_success'] = 'Il tema "%s" &egrave; ora il tuo nuovo tema predefinito.';
$lang['themes.set_default_error'] = 'Impossibile impostare "%s" come nuovo tema predefinito.';
-$lang['themes.already_exists_error'] = 'Esiste già un tema con questo nome.';
+$lang['themes.already_exists_error'] = 'Esiste gi&agrave; un tema con questo nome.';
@philsturgeon Owner

Is there a reason not to have the actual characters there? It should display fine, as we do it for other languages.

@ghost
ghost added a note

Yes, importing the php file and editing it, the line 6 was like that:
-->$lang['themes.set_default_success'] = 'Il tema "%s" Ë ora il tuo nuovo tema predefinito.';
so the char "è" changed in "Ë".

This caused a db error during the UPDATE query
-->"Error Number: 1366 Incorrect string value: '\xE8 ora ...' for column 'user_data' at row 1 ..."

That's why I changed the special char at line 8 as well.
Now I can change the frontend themes and it works without errors.

@philsturgeon Owner

This has been known to happen when character encoding is set wrong in a theme file. We have UTF-8 characters in all languages and have not had any problems reported so far.

@ghost
ghost added a note

I don't think it's a problem of template file, because I'm using the default one and I didn't change any line of code.
The problem is in the language file.
When I select the template I want to change and I'm going to save there is a problem at C.I. level (model side)

Error Number: 1366

Incorrect string value: '\xE8 ora ...' for column 'user_data' at row 1

UPDATE `default_ci_sessions` SET `last_activity` = 1326717914, `user_data`
=
'a:8:{s:9:\"user_data\";s:0:\"\";s:8:\"username\";s:5:\"xxxx\";s:5:\"email\";s:16:\"
xxx@xxxxx.it\";s:2:\"id\";s:1:\"1\";s:7:\"user_id\";s:1:\"1\";s:8:\"group_id\";s:1:\"1\";s:5:\"group\";s:5:\"admin\";s:17:\"flash:new:success\";s:58:\"Il
tema \"conjuction\" � ora il tuo nuovo tema predefinito.\";}' WHERE
`session_id` = '526030ef51a796bc4bd5d8e4ee8c58c3'

As you can see the problem is in the flash data of session, used to show the success message in the backend.

I'm using Coda(Panic) editor and my character setting is UTF-8.

Anyway, as good practice, I suggest to use html entities for italian accented characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
$lang['themes.extract_error'] = 'Impossibile estrarre il tema.';
$lang['themes.upload_success'] = 'Tema caricato con successo.';
$lang['themes.default_delete_error'] = 'Non puoi eliminare il tema predefinito.';
@@ -17,9 +17,9 @@
$lang['themes.list_title'] = 'Lista temi';
$lang['themes.upload_desc'] = 'Seleziona un file e clicca sul tasto Carica';
-$lang['themes.options'] = 'Options'; #translate
+$lang['themes.options'] = 'Parametri';
$lang['themes.theme_label'] = 'Tema';
$lang['themes.make_default'] = 'Rendi predefinito';
-$lang['themes.version_label'] = 'Version'; #translate
+$lang['themes.version_label'] = 'Versione';
$lang['themes.default_theme_label'] = 'Tema predefinito';
$lang['themes.no_themes_installed'] = 'Non ci sono temi installati.';
Something went wrong with that request. Please try again.