Forums / Install & configuration / [Solved] Translate Error Message ?

[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

eZ debug

Timing: Jan 18 2025 05:20:02
Script start
Timing: Jan 18 2025 05:20:02
Module start 'content'
Timing: Jan 18 2025 05:20:03
Module end 'content'
Timing: Jan 18 2025 05:20:03
Script end

Main resources:

Total runtime1.4995 sec
Peak memory usage4,096.0000 KB
Database Queries212

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0135 588.9453180.8281
Module start 'content' 0.01351.2971 769.7734628.2109
Module end 'content' 1.31060.1888 1,397.9844345.0625
Script end 1.4994  1,743.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00640.4271210.0003
Check MTime0.00360.2394210.0002
Mysql Total
Database connection0.00230.154210.0023
Mysqli_queries1.396993.15502120.0066
Looping result0.00200.13272100.0000
Template Total1.452196.820.7260
Template load0.00200.131220.0010
Template processing1.450196.704820.7250
Template load and register function0.00010.004910.0001
states
state_id_array0.00100.066610.0010
state_identifier_array0.00140.091620.0007
Override
Cache load0.00180.1194800.0000
Sytem overhead
Fetch class attribute can translate value0.00100.065430.0003
Fetch class attribute name0.00150.0987110.0001
XML
Image XML parsing0.00100.065430.0003
class_abstraction
Instantiating content class attribute0.00000.0024180.0000
General
dbfile0.00570.3825330.0002
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 46
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs