[Geomoose-users] Translation to pt-br

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Geomoose-users] Translation to pt-br

Helton Uchoa-2
Hi,

I'm trying to translate GM 3.6.2. I saw this link: https://geomoose.github.io/gm3/howto/add-a-language.html but it was not very clear to me.

I tried make a pt-br.json in scr/lang and make a symbolic link from en.json to this file in src/gm3/lang/ but doesn't work.

Any suggestions about the most appropriated approach?

Best regards,

Uchoa
--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

Brent Fraser
Hi,
 
   Make sure you set the path to your new language file correctly/. Put
your file in the same directory as your app.js file, then you can reference
it  like so:
 

     lang: {         my_lang: './pt-br.json',     },
 
 
 Best Regards,
 Brent Fraser
 
 -------- Original Message --------

> From: "Helton Nogueira Uchoa" <[hidden email]>
> Sent: June 28, 2020 8:08 AM
> To: "GeoMOOSE Users List" <[hidden email]>
> Subject: [Geomoose-users] Translation to pt-br
>
> Hi,
>
> I'm trying to translate GM 3.6.2. I saw this link:
> https://geomoose.github.io/gm3/howto/add-a-language.html but it was not
> very clear to me.
>
> I tried make a pt-br.json in scr/lang and make a symbolic link from
en.json

> to this file in src/gm3/lang/ but doesn't work.
>
> Any suggestions about the most appropriated approach?
>
> Best regards,
>
> Uchoa
> --
> Helton Nogueira *UCHOA* :: [hidden email]
> *GIS/IT/IoT/Lean/Innovation/Sustainability Specialist*
> +55 *85* 98886-3909 (OI - *WhatsApp*) :: +55 *85* 99716-7769 (TIM)
> Blog: helton.uchoa.com/
> LinkedIn: br.linkedin.com/in/heltonuchoa/
> Facebook: fb.me/EngUchoa (@EngUchoa)
> Twitter: twitter.com/EngUchoa (@EngUchoa)
> Vimeo: vimeo.com/channels/engenheirouchoa
> Papers: pt.scribd.com/heltonuchoa
> _______________________________________________ Geomoose-users mailing
list [hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users


_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

Dan Little-2
And if you submit it as a PR (or email it to me), we can include it in future releases so you do not have to maintain it locally!!

On Sun, Jun 28, 2020, 10:05 Brent Fraser <[hidden email]> wrote:
Hi,

   Make sure you set the path to your new language file correctly/. Put
your file in the same directory as your app.js file, then you can reference
it  like so:


     lang: {         my_lang: './pt-br.json',     },


 Best Regards,
 Brent Fraser

 -------- Original Message --------
> From: "Helton Nogueira Uchoa" <[hidden email]>
> Sent: June 28, 2020 8:08 AM
> To: "GeoMOOSE Users List" <[hidden email]>
> Subject: [Geomoose-users] Translation to pt-br
>
> Hi,
>
> I'm trying to translate GM 3.6.2. I saw this link:
> https://geomoose.github.io/gm3/howto/add-a-language.html but it was not
> very clear to me.
>
> I tried make a pt-br.json in scr/lang and make a symbolic link from
en.json
> to this file in src/gm3/lang/ but doesn't work.
>
> Any suggestions about the most appropriated approach?
>
> Best regards,
>
> Uchoa
> --
> Helton Nogueira *UCHOA* :: [hidden email]
> *GIS/IT/IoT/Lean/Innovation/Sustainability Specialist*
> +55 *85* 98886-3909 (OI - *WhatsApp*) :: +55 *85* 99716-7769 (TIM)
> Blog: helton.uchoa.com/
> LinkedIn: br.linkedin.com/in/heltonuchoa/
> Facebook: fb.me/EngUchoa (@EngUchoa)
> Twitter: twitter.com/EngUchoa (@EngUchoa)
> Vimeo: vimeo.com/channels/engenheirouchoa
> Papers: pt.scribd.com/heltonuchoa
> _______________________________________________ Geomoose-users mailing
list [hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users


_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

Helton Uchoa-2
Hi, here is a first release.

The portuguese is a language with high flexibility, so one expression in english can be represented in many ways in portuguese.

I still haven't been able to translate the geomoose with this file. I am translating with hard coding. It would be great to include the pt-br in the gm3 source code with an option to change the language just by changing the configuration file.

Best regards,

Uchoa

--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)


Em dom., 28 de jun. de 2020 às 12:15, Dan Little <[hidden email]> escreveu:
And if you submit it as a PR (or email it to me), we can include it in future releases so you do not have to maintain it locally!!

On Sun, Jun 28, 2020, 10:05 Brent Fraser <[hidden email]> wrote:
Hi,

   Make sure you set the path to your new language file correctly/. Put
your file in the same directory as your app.js file, then you can reference
it  like so:


     lang: {         my_lang: './pt-br.json',     },


 Best Regards,
 Brent Fraser

 -------- Original Message --------
> From: "Helton Nogueira Uchoa" <[hidden email]>
> Sent: June 28, 2020 8:08 AM
> To: "GeoMOOSE Users List" <[hidden email]>
> Subject: [Geomoose-users] Translation to pt-br
>
> Hi,
>
> I'm trying to translate GM 3.6.2. I saw this link:
> https://geomoose.github.io/gm3/howto/add-a-language.html but it was not
> very clear to me.
>
> I tried make a pt-br.json in scr/lang and make a symbolic link from
en.json
> to this file in src/gm3/lang/ but doesn't work.
>
> Any suggestions about the most appropriated approach?
>
> Best regards,
>
> Uchoa
> --
> Helton Nogueira *UCHOA* :: [hidden email]
> *GIS/IT/IoT/Lean/Innovation/Sustainability Specialist*
> +55 *85* 98886-3909 (OI - *WhatsApp*) :: +55 *85* 99716-7769 (TIM)
> Blog: helton.uchoa.com/
> LinkedIn: br.linkedin.com/in/heltonuchoa/
> Facebook: fb.me/EngUchoa (@EngUchoa)
> Twitter: twitter.com/EngUchoa (@EngUchoa)
> Vimeo: vimeo.com/channels/engenheirouchoa
> Papers: pt.scribd.com/heltonuchoa
> _______________________________________________ Geomoose-users mailing
list [hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users


_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

pt-br.json (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

James Klassen
If you change anything in ./src you will need to rebuild GeoMoose to see the effect.

The easiest way to add a language to a site (without rebuilding GeoMoose) is to put the pt-br.json file next to index.html and app.js in ./examples/desktop.  Then add the lang configuration to the gm3.Application initializer in app.js to tell GeoMoose where to look for the language file as stated in the docs.

GeoMoose normally picks which language to use based on the preferred language settings of the user's web browser.  Alternatively, you can force GeoMoose to pick a different language by adding the 'lng' parameter to the url 

    .... index.html?lng=pt-br# ....

On Sat, Jul 4, 2020, 20:02 Helton Nogueira Uchoa <[hidden email]> wrote:
Hi, here is a first release.

The portuguese is a language with high flexibility, so one expression in english can be represented in many ways in portuguese.

I still haven't been able to translate the geomoose with this file. I am translating with hard coding. It would be great to include the pt-br in the gm3 source code with an option to change the language just by changing the configuration file.

Best regards,

Uchoa

--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)


Em dom., 28 de jun. de 2020 às 12:15, Dan Little <[hidden email]> escreveu:
And if you submit it as a PR (or email it to me), we can include it in future releases so you do not have to maintain it locally!!

On Sun, Jun 28, 2020, 10:05 Brent Fraser <[hidden email]> wrote:
Hi,

   Make sure you set the path to your new language file correctly/. Put
your file in the same directory as your app.js file, then you can reference
it  like so:


     lang: {         my_lang: './pt-br.json',     },


 Best Regards,
 Brent Fraser

 -------- Original Message --------
> From: "Helton Nogueira Uchoa" <[hidden email]>
> Sent: June 28, 2020 8:08 AM
> To: "GeoMOOSE Users List" <[hidden email]>
> Subject: [Geomoose-users] Translation to pt-br
>
> Hi,
>
> I'm trying to translate GM 3.6.2. I saw this link:
> https://geomoose.github.io/gm3/howto/add-a-language.html but it was not
> very clear to me.
>
> I tried make a pt-br.json in scr/lang and make a symbolic link from
en.json
> to this file in src/gm3/lang/ but doesn't work.
>
> Any suggestions about the most appropriated approach?
>
> Best regards,
>
> Uchoa
> --
> Helton Nogueira *UCHOA* :: [hidden email]
> *GIS/IT/IoT/Lean/Innovation/Sustainability Specialist*
> +55 *85* 98886-3909 (OI - *WhatsApp*) :: +55 *85* 99716-7769 (TIM)
> Blog: helton.uchoa.com/
> LinkedIn: br.linkedin.com/in/heltonuchoa/
> Facebook: fb.me/EngUchoa (@EngUchoa)
> Twitter: twitter.com/EngUchoa (@EngUchoa)
> Vimeo: vimeo.com/channels/engenheirouchoa
> Papers: pt.scribd.com/heltonuchoa
> _______________________________________________ Geomoose-users mailing
list [hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users


_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

James Klassen
Resend because the email was too big for the listserv.

On 7/5/20 6:20 PM, Jim Klassen wrote:
lang needs to be at the top level, not under map.

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
}, },
lang: {
br: './pt-br.json',
}
});


On 7/5/20 1:03 PM, Helton Nogueira Uchoa wrote:
Hi,

I made the following change:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
lang: {
br: './pt-br.json',
},
}
});




_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

Helton Uchoa-2
I have tried this:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
lang: {
br: './pt-br.json',
},
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
}
});

But not work. 😞

--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)


Em dom., 5 de jul. de 2020 às 20:22, Jim Klassen <[hidden email]> escreveu:
Resend because the email was too big for the listserv.

On 7/5/20 6:20 PM, Jim Klassen wrote:
lang needs to be at the top level, not under map.

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
}, },
lang: {
br: './pt-br.json',
}
});


On 7/5/20 1:03 PM, Helton Nogueira Uchoa wrote:
Hi,

I made the following change:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
lang: {
br: './pt-br.json',
},
}
});




_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

James Klassen
I tried it right before I sent the email, so I know that works with the latest (beta) version.

Are you using a current GeoMoose?

Are there any messages in the browser's developer tools/console that might be a clue?

If it can't find or parse the json file it will fall back to English.


On Sun, Jul 5, 2020, 20:12 Helton Nogueira Uchoa <[hidden email]> wrote:
I have tried this:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
lang: {
br: './pt-br.json',
},
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
}
});

But not work. 😞

--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)


Em dom., 5 de jul. de 2020 às 20:22, Jim Klassen <[hidden email]> escreveu:
Resend because the email was too big for the listserv.

On 7/5/20 6:20 PM, Jim Klassen wrote:
lang needs to be at the top level, not under map.

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
}, },
lang: {
br: './pt-br.json',
}
});


On 7/5/20 1:03 PM, Helton Nogueira Uchoa wrote:
Hi,

I made the following change:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
lang: {
br: './pt-br.json',
},
}
});




_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Translation to pt-br

Helton Uchoa-2
Thanks for the tip, I will try the beta. 👍
--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)


Em dom., 5 de jul. de 2020 às 23:32, James Klassen <[hidden email]> escreveu:
I tried it right before I sent the email, so I know that works with the latest (beta) version.

Are you using a current GeoMoose?

Are there any messages in the browser's developer tools/console that might be a clue?

If it can't find or parse the json file it will fall back to English.


On Sun, Jul 5, 2020, 20:12 Helton Nogueira Uchoa <[hidden email]> wrote:
I have tried this:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
lang: {
br: './pt-br.json',
},
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
}
});

But not work. 😞

--
Helton Nogueira UCHOA :: [hidden email]
GIS/IT/IoT/Lean/Innovation/Sustainability Specialist
+55 85 98886-3909 (OI - WhatsApp) :: +55 85 99716-7769 (TIM)


Em dom., 5 de jul. de 2020 às 20:22, Jim Klassen <[hidden email]> escreveu:
Resend because the email was too big for the listserv.

On 7/5/20 6:20 PM, Jim Klassen wrote:
lang needs to be at the top level, not under map.

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
}, },
lang: {
br: './pt-br.json',
}
});


On 7/5/20 1:03 PM, Helton Nogueira Uchoa wrote:
Hi,

I made the following change:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
map: {
scaleLine: {
enabled: true,
units: 'imperial'
},
lang: {
br: './pt-br.json',
},
}
});




_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users