Ticket #1117 (closed defect: wontfix)

Opened 14 months ago

Last modified 13 months ago

Cannot translate certain words using AgaviSimpleTranslator

Reported by: christian.krupa@… Owned by: dominik
Priority: low Milestone: 1.0.2
Component: translation Version: 1.0.0
Severity: minor Keywords:
Cc: Patch attached: no

Description

it is not possible to translate the word "on" or "off". the translationmanager translate the words to "1" and "". here is an example:

translation.xml:

...
                    <message_translator class="AgaviSimpleTranslator">
                        <parameter name="">
                            <parameter name="de">
...
<parameter name="on">Am</parameter><!-- works -->
...
                            </parameter>
                            <parameter name="en">

<parameter name="on_">on</parameter> <!-- print "1" in frontend -->
<parameter name="on"><![CDATA[&#79;&#110;]]></parameter> <!-- print "on" in frontend -->
...


Attachments

Change History

Changed 14 months ago by felix

"on", "yes", "true" are literalized to (bool)true

"off", "no", "false" are literalized to (bool)false

in all configs.

See  http://trac.agavi.org/ticket/1005 for a detailed explanation.

Changed 13 months ago by david

  • status changed from new to closed
  • summary changed from translation.xml to Cannot translate certain words using AgaviSimpleTranslator
  • resolution set to wontfix
  • milestone set to 1.0.2

This is expected behavior. AgaviSimpleTranslator is, as the name implies, simple in its nature and uses embedded configuration parameters for translation. Those are by design intended for configuration use and thus are cast to certain boolean values during compilation as explained above by Felix; the AgaviSimpleTranslator class or the AgaviTranslationManager have no control over this.

Please use AgaviGettextTranslator or a custom translator implementation. Translating such values with AgaviSimpleTranslator will be possible once #1005 is implemented.

Add/Change #1117 (Cannot translate certain words using AgaviSimpleTranslator)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.