New Language: Can't figure it out

Author Message

Maarten Holland

Wednesday 21 January 2004 1:45:52 pm

I'm trying to create a new Dutch translation for eZ Publish 3. Unfortunately I can't get it to work. Here's what I've done so far:

- I've installed QT's Linguist for Windows on my desktop machine.
- Downloaded share/translations/untranslated/translation.ts from my testserver.
- Translated it partially.
- Saved it (just 'save' from QT, should I do anything else?)
- Created a new folder in share/translations: 'dut-NL', chmodded it 777, just to be sure.
- Uploaded the new translation.ts to this folder.
- Downloaded eng-GB.ini form share/locale
- Edited it and uploaded it as share/locale/dut-NL.ini.
- Created the new language in the setupsection of my admininterface.
- Changed settings/override/siteaccess/mysite/site.ini.append:

Changed:

[ContentSettings]
TranslationList=

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
TextTranslation=disabled

Into:

[ContentSettings]
TranslationList=

[RegionalSettings]
Locale=dut-NL
ContentObjectLocale=dut-NL
TextTranslation=enabled
TranslationCache=enabled

After this I get the following error when viewing my site:

Fatal error: Maximum execution time of 30 seconds exceeded in /path-to-ezpublish-root/lib/ezxml/classes/ezxml.php on line 271
Fatal error: eZ publish did not finish it's request

The execution of eZ publish was abruptly ended, the debug output is present below.

Here is the relevant snippet from ezxml.php:

268 // check for CDATA
269 $cdataSection = "";
270 $isCDATASection = false;
271 $cdataPos = strpos( $xmlDoc, "<![CDATA[", $pos );
272 if ( $cdataPos == $pos && $pos > 0)

Perhaps something is wrong with translation.ts? How can I validate it? I've had some errors while tranlating: 4 translations got a warning sign in front of it (red exclamation point), which I couldn't fix.

http://ez.no/developer/ez_publish_3/documentation/configuration/configuration/language_and_charset/creating_a_new_translation - This page tells me I need to execute 'bin/linux/ezlupdate -v dut-NL' but therefore I need to download, build and execute Trolltech's QT. Do I really need to do that or is that only necessary if I want to change/translate translation.ts on my server instead of my desktop machine?

Really hope anyone will help. Thank you for your time.

Cheers,

Maarten

Gunnstein Lye

Thursday 22 January 2004 7:58:46 am

You have done everything right as far as I can tell.

You get the PHP timeout because you don't have the mbstring extension enabled in PHP. Without it, eZ publish tries to do all charset related stuff by itself, which takes a lot more time. It would probably have worked, if your max PHP execution time was a bit longer. Enable mbstring, and you should have no problems.

The red warning sign in the linguist means that the formatting of your translated string does not match that of the english string. Probably a missing period (.) or something like that. There are buttons to control these warnings on the tool bar. (The file will be saved correctly even with these warnings.)

ezlupdate is necessary to update a translation.ts file when eZ publish templates have changed, or to create one if you don't have the untranslated .ts file. In your case, you don't need it. I'll update the doc.

Good luck!

Maarten Holland

Thursday 22 January 2004 11:05:39 am

Thank you for your reply. I saw you already updated the doc. Unfortunately I can't get mbstring to work, so I raised the max_execution_time to 300 sec. But now the pages load that slow, that it's not acceptable. Is it perhaps possible that you give some tips on configuring mbstring or post a sample of you php.ini?

Thanks in advance,

Maarten

Gunnstein Lye

Friday 23 January 2004 1:58:12 am

You don't need any settings for mbstring. As far as I know, mbstring must be enabled when compiling PHP, or try to get a precompiled PHP package with mbstring enabled. I have never compiled PHP myself, so I can't give any further advice. You could try to search the forums for 'mbstring'.

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 19 2025 09:11:41
Script start
Timing: Jan 19 2025 09:11:41
Module start 'layout'
Timing: Jan 19 2025 09:11:41
Module start 'content'
Timing: Jan 19 2025 09:11:42
Module end 'content'
Timing: Jan 19 2025 09:11:42
Script end

Main resources:

Total runtime1.2463 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.1797152.6250
Module start 'layout' 0.00520.0026 741.804739.4453
Module start 'content' 0.00781.2369 781.2500533.1016
Module end 'content' 1.24470.0015 1,314.351612.1563
Script end 1.2462  1,326.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2557160.0002
Check MTime0.00130.1074160.0001
Mysql Total
Database connection0.00090.074310.0009
Mysqli_queries1.184895.0656600.0197
Looping result0.00050.0381580.0000
Template Total1.214797.520.6074
Template load0.00190.152020.0009
Template processing1.212897.315120.6064
Template load and register function0.00020.014010.0002
states
state_id_array0.00100.077410.0010
state_identifier_array0.00090.071820.0004
Override
Cache load0.00170.1335590.0000
Sytem overhead
Fetch class attribute can translate value0.00050.043020.0003
Fetch class attribute name0.00110.086050.0002
XML
Image XML parsing0.00200.161320.0010
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00490.3937160.0003
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs