the fix for the bug in Portuguese translation

19 views
Skip to first unread message

Emerson R. Zamprogno

unread,
Mar 30, 2011, 4:07:12 PM3/30/11
to panoramio-t...@googlegroups.com
Could anyone please forward this to the development / maintanance team?

Here is the source code of a page configured as "Português (Portugal)" and then "Português (Brasil)".

Please pay attention to the variables "currentLanguage", which is used to send the translation request to Google Translate engine, and to which option has the attribute selected='selected' in footer_language_selector object in both cases.

Google Translate does not make distinction between pt_BR and pt_PT. So, whichever the footer_language_selector is either pt_BR or pt_PT, the variable currentLanguage must be set to just "pt" (as it's done for pt_PT, but not for pt_BR). Please, fix it. It's simple.


Português (Portugal):
-- does work, "pt_PT" is rendered to "pt"
Code:

var currentLanguage = 'pt';
var translatedFromStr = 'Translated from %(language)s.';
var translateErrorStr = 'Translation was unsuccessful.';
// The following language map can be fetched from translate by
// http://translate.google.com/translate_a/l?client=X&hl=X&cb=1
// It would cost an additional http call, and it will not cover translations
// for some of Panoramio supported languages (e.g., ma, ast), so we just
// precompute it here.
var languageMap = { // Supported source languages by Google Translate.
'af': 'Afrikaans',
'sq': 'Albanian',
'ar': 'Árabe',
'be': 'Belarusian',
(...)
'fa': 'Persa',
'pl': 'Polonês',
'pt': 'Português',
'ro': 'Romeno',
'ru': 'Russo',
'sr': 'Sérvio',
(...)
'vi': 'Vietnamese',
'cy': 'Galês',
'yi': 'Yiddish'
};

(...)

<div class="footer_language_selector">
<form action="/lang" method="get" id="language_selection">

<label for="languages">Escolha a língua</label>

<select id="languages" name="l">

<option
dir='ltr'

value='ast_ES.utf8'
>
Asturian
</option>

(...)

<option
dir='ltr'

value='pl_PL.utf8'
>
Polski
</option>

<option
dir='ltr'
selected='selected'
value='pt_PT.utf8'
>
Português (Portugal)
</option>

<option
dir='ltr'

value='pt_BR.utf8'
>
Português (Brasil)
</option>

<option
dir='ltr'

value='ro_RO.utf8'
>
Română
</option>

<option
dir='ltr'

value='ru_RU.utf8'
>
Русский
</option>
(...)
<option
dir='ltr'

value='zh_TW.utf8'
>
中文 (繁體)
</option>

</select>
<input type="submit" value="Ir" />
</form>
</div>
</div>



Português (Brasil) -- will work if "pt_BR" is rendered to "pt"
Code:

var currentLanguage = 'pt_BR';
var translatedFromStr = 'Translated from %(language)s.';
var translateErrorStr = 'Translation was unsuccessful.';
// The following language map can be fetched from translate by
// http://translate.google.com/translate_a/l?client=X&hl=X&cb=1
// It would cost an additional http call, and it will not cover translations
// for some of Panoramio supported languages (e.g., ma, ast), so we just
// precompute it here.
var languageMap = { // Supported source languages by Google Translate.
'af': 'Afrikaans',
'sq': 'Albanian',
'ar': 'Árabe',
'be': 'Belarusian',
(...)
'fa': 'Persa',
'pl': 'Polonês',
'pt': 'Português',
'ro': 'Romeno',
'ru': 'Russo',
'sr': 'Sérvio',
(...)
'vi': 'Vietnamese',
'cy': 'Galês',
'yi': 'Yiddish'
};

(...)

<div class="footer_language_selector">
<form action="/lang" method="get" id="language_selection">

<label for="languages">Escolha a língua</label>

<select id="languages" name="l">

<option
dir='ltr'

value='ast_ES.utf8'
>
Asturian
</option>

(...)

<option
dir='ltr'

value='pl_PL.utf8'
>
Polski
</option>

<option
dir='ltr'

value='pt_PT.utf8'
>
Português (Portugal)
</option>

<option
dir='ltr'
selected='selected'
value='pt_BR.utf8'
>
Português (Brasil)
</option>

<option
dir='ltr'

value='ro_RO.utf8'
>
Română
</option>

<option
dir='ltr'

value='ru_RU.utf8'
>
Русский
</option>
(...)
<option
dir='ltr'

value='zh_TW.utf8'
>
中文 (繁體)
</option>

</select>
<input type="submit" value="Ir" />
</form>
</div>
</div>

Galatas ©

unread,
Mar 30, 2011, 4:10:03 PM3/30/11
to panoramio-t...@googlegroups.com
There is a translation forum that may be the best place to report this matter.
http://www.panoramio.com/forum/viewforum.php?f=11

Draken

unread,
Mar 30, 2011, 4:20:02 PM3/30/11
to panoramio-t...@googlegroups.com
Moved to the Translation & Translators forum

Emerson R. Zamprogno

unread,
Mar 30, 2011, 4:21:10 PM3/30/11
to panoramio-t...@googlegroups.com
Quote Galatas:
There is a translation forum that may be the best place to report this matter.
http://www.panoramio.com/forum/viewforum.php?f=11


Not actually, Galatas. I checked the forum and it's for the site translation (translation of the pages, made by the humans). The bug I mentioned is about the Google Translate powered comments translation feature, which is machine translation and it's not working for "Português (Brazil)", for the reason I mentioned above. So, it's not an issue to be solved by the translators, but by the programmers.

Anyway, thank you for your attention and quick reply.

Draken

unread,
Mar 30, 2011, 4:30:32 PM3/30/11
to panoramio-t...@googlegroups.com
I strongly recommend your sending an e-mail: http://www.panoramio.com/forum/viewtopic.php?t=31846

Gerard Sanz

unread,
Apr 4, 2011, 1:15:13 PM4/4/11
to panoramio-t...@googlegroups.com
We are aware of the problem and we are working on it. It will be fixed very soon.

Thanks,
Gerard

Emerson R. Zamprogno

unread,
Apr 4, 2011, 1:20:12 PM4/4/11
to panoramio-t...@googlegroups.com
Dear colleagues,
It's already working now.
Thank you for your attention.

Gerard Sanz

unread,
Apr 4, 2011, 1:43:02 PM4/4/11
to panoramio-t...@googlegroups.com
A yes. I just checked with Balazs, and they fixed it already while I was in Singapore.

Cool.
Reply all
Reply to author
Forward
0 new messages