[Solved] Translate Error Message ?

Author Message

Paul Etienney

Wednesday 19 November 2008 2:28:37 am

Hello,

I have a form to collect information.

Some attributes are "Requiered". If i dont "fill" this attributes, the error message is :

Missing or invalid input

* Nom: Input required.
* Email: The email address is empty.
* Téléphone: Input required.

I would like to show the same message but in French. I can't remember what is the good setting and where the .ts file must be.

Here is my RegionalSettings

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=fre-FR
SiteLanguageList[]=eng-GB
TextTranslation=enabled

Thank you very much.

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Stéphane Bullier

Friday 21 November 2008 10:54:30 am

Hello,

The text for validation
design/standard/templates/content/collectedinfo_validation.tpl

If you use eZ publish 4.0.1, you have to download and install fr internationalization file into /share/translations folder

http://ez.no/content/download/218929/1468770/file/translation.zip

Stéphane

Paul Etienney

Wednesday 03 December 2008 8:11:31 am

Thank you,

I did install the french .ts file.

I set French as the main language of siteaccess, the object i am viewing is in french. The translation in the .ts file is ok and so is the context. The cache is cleared.

Do I forget a point ?

- Settings OK
- Object language Ok
- .ts file OK
- cache OK

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Stéphane Bullier

Wednesday 03 December 2008 12:50:03 pm

Hello Paul,

Are you using the website interface extension?

Have you identified the model used to collect information display ?

Stéphane

Paul Etienney

Monday 08 December 2008 9:18:11 am

Hello Stéphane,

I use the ezwebin_sit extension. I have already tried to edit the .ts files inside but it does not produce any change.

What do you mean by "mode".

I actually i have edited every french .ts file. If the the translation was not created, i did create it but nothing changes.

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Stéphane Bullier

Tuesday 09 December 2008 12:32:05 am

Hello Paul,

About model, I mean template.

The template use to show error message is :
design/standard/templates/content/collectedinfo_validation.tpl

The translations have to be add in share/translations/fre-FR/translation.ts file into context
"<name>kernel/classes/datatypes</name>" :

<message>
  <source>Input required.</source>
  <translation>Entrée requise.</translation>
</message>
<message>
  <source>The email address is empty.</source>
  <translation>L&apos;adresse courriel est vide.</translation>
</message>

Stéphane

Paul Etienney

Tuesday 09 December 2008 2:19:32 am

Stéphane, everything you wrote is done :

- I use content/collectedinfo_validation.tpl
- I do have the french .ts file with good context, good source... But this .ts file is not used.

In my debug I have something ike this :

Non-static method eZInformationCollectionAttribute::create() should not be called statically, assuming $this from incompatible context in C:\wamp\www\aspaway\kernel\content\collectinformation.php on line 212

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Stéphane Bullier

Tuesday 09 December 2008 9:08:11 am

I check my settings/siteaccess/fr/site.ini.append.php and I see a difference between your.

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
SiteLanguageList[]=fre-FR
SiteLanguageList[]=eng-GB
TextTranslation=enabled

You have also clear the cache ?

Stéphane

Paul Etienney

Thursday 11 December 2008 6:31:48 am

THANK YOU !!!!!!

I enabled the text translation. It works.

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:27:30
Script start
Timing: Jan 18 2025 11:27:30
Module start 'layout'
Timing: Jan 18 2025 11:27:30
Module start 'content'
Timing: Jan 18 2025 11:27:30
Module end 'content'
Timing: Jan 18 2025 11:27:30
Script end

Main resources:

Total runtime0.0153 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.0313152.6406
Module start 'layout' 0.00510.0031 740.671939.4766
Module start 'content' 0.00820.0055 780.1484101.4922
Module end 'content' 0.01370.0015 881.640646.3047
Script end 0.0152  927.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.0707140.0002
Check MTime0.00106.7865140.0001
Mysql Total
Database connection0.00095.837910.0009
Mysqli_queries0.002415.789930.0008
Looping result0.00000.078010.0000
Template Total0.00127.810.0012
Template load0.00074.259110.0007
Template processing0.00053.547710.0005
Override
Cache load0.00042.865910.0004
General
dbfile0.00031.663180.0000
String conversion0.00000.056240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs