librelist archives

« back to archive

Translation in pt_BR doesn't work in Converse.js

Translation in pt_BR doesn't work in Converse.js

From:
Edigley Fraga
Date:
2015-08-01 @ 15:34
Hello,

I am trying to use converse.js in brazilian portuguese. The chat is working
great, but I can't figure out how to translate the interface to pt_BR.
I initialize converse in the following way:

<html>
<head>
...
<link rel="stylesheet" type="text/css" media="screen"
href="converse/css/converse.min.css">
...
</head>
  <body>
...
    <script type="text/javascript"
src="converse/builds/converse.min.js"></script>
    <script type="text/javascript"
src="converse/builds/locales.js"></script>

  </body>
<script>
    require(['converse'], function (converse) {
        converse.initialize({
            bosh_service_url: 'https://conversejs.org/http-bind/',
            keepalive: true,
            message_carbons: true,
            play_sounds: true,
            roster_groups: true,
            show_controlbox_by_default: true,
            xhr_user_search: false,
            allow_chat_pending_contacts: true,
            i18n: locales.pt_br,
            allow_chat_pending_contacts: true,
        });
    });
</script>

</html>

If I put another locale, for exampel, i18n: locales.de, some labels get
translated, but not all. It's wierd, because I think I am doing what is
expected.
I hope you guys can help me.

Thanks,
Edigley Fraga

Re: [conversejs] Translation in pt_BR doesn't work in Converse.js

From:
Jc Brand
Date:
2015-08-09 @ 10:10

On 01 Augustus 2015 5:34:10 nm. GMT+02:00, Edigley Fraga 
<edigley@gmail.com> wrote:
>Hello,
>
>I am trying to use converse.js in brazilian portuguese. The chat is
>working
>great, but I can't figure out how to translate the interface to pt_BR.
>I initialize converse in the following way:
>
><html>
><head>
>...
><link rel="stylesheet" type="text/css" media="screen"
>href="converse/css/converse.min.css">
>...
></head>
>  <body>
>...
>    <script type="text/javascript"
>src="converse/builds/converse.min.js"></script>
>    <script type="text/javascript"
>src="converse/builds/locales.js"></script>
>
>  </body>
><script>
>    require(['converse'], function (converse) {
>        converse.initialize({
>            bosh_service_url: 'https://conversejs.org/http-bind/',
>            keepalive: true,
>            message_carbons: true,
>            play_sounds: true,
>            roster_groups: true,
>            show_controlbox_by_default: true,
>            xhr_user_search: false,
>            allow_chat_pending_contacts: true,
>            i18n: locales.pt_br,
>            allow_chat_pending_contacts: true,
>        });
>    });
></script>
>
></html>
>
>If I put another locale, for exampel, i18n: locales.de, some labels get
>translated, but not all. It's wierd, because I think I am doing what is
>expected.

Not all translations are complete. Some languages have missing 
translations. Sounds like that is the issue here.

JC 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.