ho-dev / HattrickOrganizer

Assistant for Hattrick online football manager
https://ho-dev.github.io/HattrickOrganizer/
GNU Lesser General Public License v3.0
195 stars 79 forks source link

[eBUG] Issue on translate with apostrophe and {0} placeholder #277

Closed mistermax80 closed 4 years ago

mistermax80 commented 4 years ago

In italian lang this string: feedbackplugin.dataTooOld = I tuoi dati non sono recenti, l'ultimo aggiornamento è {0}. Aggiorna i tuoi dati da Hattrick (scarica). Appears: Schermata 2019-11-06 alle 23 49 24

modifing the code as following, the message appears correctly traslated. feedbackplugin.dataTooOld = <html>I tuoi dati non sono recenti, l&rsquo;ultimo aggiornamento è {0}. Aggiorna i tuoi dati da Hattrick (scarica).</html>

@akasolace I think, it can a issue on the java/text/MessageFormat.java uses for traslate message, but I didn't see if fix in message format or modify the text in poeditor. What do you think?

akasolace commented 4 years ago

In Italian lang this string

I guess this is non specific to Italian but should affect all language (except English) because the variable name get translated

@mistermax80 I suggest you do:

feedbackplugin.dataTooOld = <html>I tuoi dati non sono recenti, l&rsquo;ultimo aggiornamento è {0}. Aggiorna i tuoi dati da Hattrick.</html>

and then use String.Format to pass your variable

mistermax80 commented 4 years ago

sure It is not a issue on italian, but there is apostrophe and placeholder.

akasolace commented 4 years ago

@mistermax80 have you read my previous message ? I think it just come down to translating the variable name. If it is unclear to you, I can fix this tonight.

mistermax80 commented 4 years ago

"download" is not a variable, it is only text. do you think the HO reads "download" as an variable? If you try italian lang and remove the apostrophe in the sentence, it works fine, for this I think the issue is the apostrophe and placeholder {0} in the same sentence. Anyway, in this moment I don't know how to resolve, so if you have time, you can try. Thanks.