librelist archives

« back to archive

External locales: how to do not include translations in converse build?

External locales: how to do not include translations in converse build?

From:
Benjamin Georgeault
Date:
2014-12-19 @ 15:21
Hi,

 I want to add converse.js to an existing web site. No problem with that, 
i made a custom build for that and it works like a charm. 

	My problem: 
	* The web site have one js file per locale for translations of all 
libraries use in the project. 
	* I do not want to add all locale files in the main converse build but in
each existing translation files. 
	* I try do to it but locales does not be added to locales var. 

 Did someone arleady done that?

 Thanks,
 Benjamin

Re: [conversejs] External locales: how to do not include translations in converse build?

From:
Jc Brand
Date:
2014-12-19 @ 15:42
On Fri, Dec 19, 2014 at 03:21:21PM +0000, Benjamin Georgeault wrote:
>    Hi,
> 
>    I want to add converse.js to an existing web site. No problem with that, i
>    made a custom build for that and it works like a charm.
> 
>    My problem:
> 
>      * The web site have one js file per locale for translations of all
>        libraries use in the project.
>      * I do not want to add all locale files in the main converse build but
>        in each existing translation files.
>      * I try do to it but locales does not be added to locales var.

I don't understand your last sentence above.

>    Did someone arleady done that?

Yes, there is currently a build that does not include locales.

See src/build-no-locales-no-otr.js

Basically, what you do is set the path for "locales" to ./locale/nolocales.js in
your build configuration file.

Your build will then not include any locales information in it.

Re: [conversejs] External locales: how to do not include translations in converse build?

From:
Benjamin Georgeault
Date:
2014-12-19 @ 17:34
Yes, i found it already and i use it, this is not the problem.

I want to build a file per local with translations data only. For example,
one en.js, one de.js, one fr.js, etc...

Benjamin

PS: sorry for my poor english



19 décembre 2014 16:43 "JC Brand" <lists@opkode.com> a écrit: 
> On Fri, Dec 19, 2014 at 03:21:21PM +0000, Benjamin Georgeault wrote:
> 
>> Hi,
>> 
>> I want to add converse.js to an existing web site. No problem with that, i
>> made a custom build for that and it works like a charm.
>> 
>> My problem:
>> 
>> * The web site have one js file per locale for translations of all
>> libraries use in the project.
>> * I do not want to add all locale files in the main converse build but
>> in each existing translation files.
>> * I try do to it but locales does not be added to locales var.
> 
> I don't understand your last sentence above.
> 
>> Did someone arleady done that?
> 
> Yes, there is currently a build that does not include locales.
> 
> See src/build-no-locales-no-otr.js
> 
> Basically, what you do is set the path for "locales" to ./locale/nolocales.js in
> your build configuration file.
> 
> Your build will then not include any locales information in it.

Re: [conversejs] External locales: how to do not include translations in converse build?

From:
Jc Brand
Date:
2014-12-20 @ 09:16
On Fri, Dec 19, 2014 at 05:34:41PM +0000, Benjamin Georgeault wrote:
> Yes, i found it already and i use it, this is not the problem.
> 
> I want to build a file per local with translations data only. For 
example, one en.js, one de.js, one fr.js, etc...

There already are single files for the translations.

See for example here:
https://github.com/jcbrand/converse.js/blob/master/locale/nl/LC_MESSAGES/nl.js

You can manually load that file via <script>.

These translation files rely on Jed.js being loaded, so you have to make sure
of that. Either by including it in the bundle or by loading it separately.


> 19 décembre 2014 16:43 "JC Brand" <lists@opkode.com> a écrit: 
> > On Fri, Dec 19, 2014 at 03:21:21PM +0000, Benjamin Georgeault wrote:
> > 
> >> Hi,
> >> 
> >> I want to add converse.js to an existing web site. No problem with that, i
> >> made a custom build for that and it works like a charm.
> >> 
> >> My problem:
> >> 
> >> * The web site have one js file per locale for translations of all
> >> libraries use in the project.
> >> * I do not want to add all locale files in the main converse build but
> >> in each existing translation files.
> >> * I try do to it but locales does not be added to locales var.
> > 
> > I don't understand your last sentence above.
> > 
> >> Did someone arleady done that?
> > 
> > Yes, there is currently a build that does not include locales.
> > 
> > See src/build-no-locales-no-otr.js
> > 
> > Basically, what you do is set the path for "locales" to 
./locale/nolocales.js in
> > your build configuration file.
> > 
> > Your build will then not include any locales information in it.