You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aleksei Valikov <va...@gmx.net> on 2007/02/19 10:57:27 UTC

[ANN] Transcoder Maven2 plugin - check completeness of your multilingual resources

Hi.

I've recently release the Transcoder plugin:

https://transcoder.dev.java.net/

I hope you'll find it useful.

Here's a small description.

The Transcoder plugin for Maven2 is used to check multilingual resources for the 
completeness of translation. This plugin analyzes property files contained 
within the application and reports entries which were not translated into one of 
the required languages. Missing entries are written into property files in some 
target directory.

In practice, if you develop a multi-lingual project, you may need to be sure 
that you've translated all the language entries into all of the required 
languages. In case your language resources are distributed among multiple JARs, 
this may be hard to do. The Transcoder plugin performs the in-depth check of 
your JARs/resources and generates a list of properties yet-to-be-translated.

How is the check performed?

     The plugin is configured with a list of languages (locales) and a list of 
resource names. It also implicitly knows runtime dependencies of the project. So 
the Transcoder plugin checks that:

         * for every runtime dependency and every resource name,
         * if certain entry exists in resource property file for one of the 
configured languages,
         * then it exists in resource property files for all of the configured 
languages (within the same dependency).

What is the output?

     The plugin has the target configuration parameter 
${project.build.directory}/missing-resources by default. In case resource file 
within some given dependency misses some entries for one of the languages, they 
will be written into the 
${target}/${groupId}/${artifactId}/${resourceName}_${locale}.properties file. 
${target} is the target directory (see above), ${groupId} and ${artifactId} are 
the group id and the artifact id of the given dependency, ${resourceName} and 
${locale} are current resource name and language.

     Example. Consider we're missing the German user.username (locale: de) entry 
in the resource de/disy/preludio2/messages of the 
de.disy.preludio2:preludio2-shared. In this case we'll get the file 
target/missing-resources/de.disy.preludio2/preludio2-shared/de/disy/preludio2/messages_de.properties 
containing something like:

     user.username=@@TODO.user.username@@

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [ANN] Transcoder Maven2 plugin - check completeness of your multilingual resources

Posted by Manos Batsis <ma...@geekologue.com>.
Aleksei Valikov wrote:
> You are welcome to join the project and do the JSP parsing as you see it.

Request sent, thanks for sharing :-)

Cheers,

Manos


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [ANN] Transcoder Maven2 plugin - check completeness of your multilingual resources

Posted by Aleksei Valikov <va...@gmx.net>.
Hi.

>> I've recently release the Transcoder plugin:
>> https://transcoder.dev.java.net/
> 
> Awesome! I was actually getting ready to work on something like this for 
> md4j-quickstarter [1], although more webapp oriented. Can this be 
> extended to:
> 
> * Parse a set of JSP (or other presentation technology) files with 
> user-provided regexps to build a set of property keys
> * Compare these against the property files, to output files with missing 
> or unused property keys
> 
> If you are interested, i would be happy to give a helping hand :-)
> 
> [1] http://www.geekologue.com/md4j/tutorial-with-maven.html

Thanks!

Well, this surely can be extended. I just wanted to start with a small and 
simple but yet complete thing. The plugin now just checks resources for 
cross-language completeness. That is, the set of keys per dependency/resource 
name is calculated as a set of all keys in all languages for that 
dependency/resource. This is just one algorithm to calculate this set. You are 
right, there must be much more of them. Like, parsing JSPs/Java code/Facelets 
templates/whatever.

I think I'll make these algorithms extensible/pluggable and probably start with 
the Java code parsing (this is what I need for my projects). You are welcome to 
join the project and do the JSP parsing as you see it.

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [ANN] Transcoder Maven2 plugin - check completeness of your multilingual resources

Posted by Manos Batsis <ma...@geekologue.com>.
Aleksei Valikov wrote:
> I've recently release the Transcoder plugin:
> https://transcoder.dev.java.net/

Awesome! I was actually getting ready to work on something like this for 
md4j-quickstarter [1], although more webapp oriented. Can this be 
extended to:

* Parse a set of JSP (or other presentation technology) files with 
user-provided regexps to build a set of property keys
* Compare these against the property files, to output files with missing 
or unused property keys

If you are interested, i would be happy to give a helping hand :-)

[1] http://www.geekologue.com/md4j/tutorial-with-maven.html

Cheers,

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org