Development

#253 (automatic internationalization file creation)

You must first sign up to be able to contribute.

Ticket #253 (closed enhancement: fixed)

Opened 3 years ago

Last modified 9 months ago

automatic internationalization file creation

Reported by: dleute@gmail.com Assigned to:
Priority: minor Milestone: 1.1.0
Component: askeet Version: 0.6.0
Keywords: Cc: yahoo@perenite.com
Qualification: Unreviewed

Description

I would love to see a feature that automatically takes the _ _ ( ) and puts them into the XLIFF base file so when development is done I just zip these files up and send them to translators.

That way once development is done, I don't have to worry about the XLIFF files. (or whatever translation type I chose to use)

--Derrek

Change History

02/26/06 18:44:52 changed by RoVeRT <symfony@rovert.net>

i18n does have a save() for saving untranslated strings it has seen but it only works if using only 1 translation file. Adding an option in i18n.yml to autosave wouldnt hurt anything and can later be expanded.

02/26/06 19:31:51 changed by dleute@gmail.com

Can you point me at the relevant framework files so I can see how this works?

--Derrek

03/01/06 13:09:35 changed by simonbun

If this could be combined with a cultures setting in i18n.yml like for instance:

cultures: [nl_BE, fr_FR, en_US]

If symfony would take this into account, i could adjust my custom helpers input_i18n_tag, object_input_i18n_tag, et al. and they could be used in symfony by default if they prove to be useful. They obviously generate an input field for each culture and use a label with the according language in the language of the current user.

Also, this cultures: setting could be used for adjusting the 'autosave' function RoVeRT talks about.

03/14/06 18:27:19 changed by luki

i am using following filter:

class I18nSaverFilter extends sfFilter {

    /**
     */
    function execute ($filterChain) {
      
      // execute next filter
      $filterChain->execute();
      
      if ($this->isFirstCall())
      {
        sfContext::getInstance()->getI18N()->getGlobalMessageSource()->save();
        sfContext::getInstance()->getI18N()->getMessageSource()->save();
      }
    }
}

if you are using xliff just enable i18n and put empty translation file e.g.

<?xml version="1.0"?>
<xliff version="1.0">
  <file orginal="global" source-language="pl" datatype="plaintext" >
    <body>
    </body>
  </file>
</xliff>

in app i18n directory

03/14/06 18:31:23 changed by luki

does anybody know how to remove those unicode encoded entites e.g &#xF3; = รณ automatically.. i think translators will have problem with that.

03/14/06 21:41:13 changed by luki

i am answering my own question .. ;)

if you want to use utf-8 character set you should use following empty file and UNIX endofline standard

<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.0">
  <file orginal="global" source-language="en" datatype="plaintext">
    <body></body>
  </file>
</xliff>

03/16/06 15:30:29 changed by benoitm

  • cc set to yahoo@perenite.com.
  • milestone changed from 0.6.1 to 0.6.2.

03/24/06 12:20:29 changed by benoitm

I've tried to address this enhancment through this : HowToGenerateI18NFiles

Hope it helps benoitm

04/10/06 11:43:06 changed by fabien

  • milestone changed from 0.6.2 to 1.0.0.

06/16/06 09:46:47 changed by fabien

  • milestone changed from 0.6.4 to 1.0.0.

08/29/06 17:26:02 changed by fabien

  • milestone changed from 0.6.4 to post-1.0.

12/09/07 09:16:02 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.
  • component set to askeet.
  • qualification set to Unreviewed.
  • milestone changed from post-1.0 to 1.1.0.

in r4359