first translation patch - broken characters

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Timeout
Level 4
Level 4
Posts: 183
Joined: Sat Feb 23, 2008 12:45 pm

first translation patch - broken characters

Post by Timeout »

Hi!

I managed after a couple of hours playing with git to get the first patch right :

Code: Select all

diff --git a/dlls/shell32/shell32_Fr.rc b/dlls/shell32/shell32_Fr.rc
index dd1a455..c59c20f 100644
--- a/dlls/shell32/shell32_Fr.rc
+++ b/dlls/shell32/shell32_Fr.rc

@@ -252,3 +252,19 @@ STRINGTABLE

  IDS_NEWFOLDER         "Nouveau dossier"
 }
+
+{
+ IDS_LICENSE_CAPTION,     "Licence Wine"
+
+ IDS_LICENSE,
+"Wine est un logiciel libre, vous pouvez le redistribuer et/ou le modifier \
+selon les termes de la License Publique G351n351rale Limit351e GNU dans sa version 2.1 \
+ou (340 votre choix) toute version ult351rieure.\n \
+\n\
+Wine est distribu351 car potentiellement utile mais SANS AUCUNE GARANTIE, m352me sans \ garantie implicite de POSSIBILIT311 DE COMMERCIALISATION ou D'APTITUDE 300 UN BUT \ SP311CIFIQUE. Veuillez vous reporter 340 la Licence publique g351n351rale limit351e pour \ plus de d351tails.\n \
+Vous devriez avoir re347u une copie de la Licence Publique G351n351rale \
+GNU Limit351e en m352me temps que cette biblioth350que ; si ce n'est pas \
+le cas, 351crivez 340 la Free Software Foundation, Inc., 51 Franklin St, \
+Fifth Floor, Boston, MA 02111-1301, 311tats-Unis."
+}
+

However the French special characters are broken when creating the diff. Is it normal or what should I do?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: first translation patch - broken characters

Post by vitamin »

Timeout wrote:I managed after a couple of hours playing with git to get the first patch right :
Unfortunately license is one of those things that should not be translated. Or it will loose it's power. See for example here : http://www.gnu.org/licenses/translations.html
Timeout wrote:However the French special characters are broken when creating the diff. Is it normal or what should I do?
What codepage have you used to edit the file? And what codepage have you used to look at the diff? I know it works - Russian has all special characters :)
Timeout
Level 4
Level 4
Posts: 183
Joined: Sat Feb 23, 2008 12:45 pm

Re: first translation patch - broken characters

Post by Timeout »

vitamin wrote: Unfortunately license is one of those things that should not be translated. Or it will loose it's power. See for example here : http://www.gnu.org/licenses/translations.html
However it had been translated on "clock" for instance, I took most of the translation there and adapted it to what I though it to be be better.

Legally though, If one does not have conditions in a language that he/she can understand, it would not be applicable to him/her.

Most contracts have a translation where at the end it is written that for any problem with the understanding of the contract, the original text in xxx will prevail (particularly if you make a Wine in French but expect that the user can understand English - most French people will learn it at school but will forget quickly about it as a matter of principle once they left school).
Timeout wrote: What codepage have you used to edit the file? And what codepage have you used to look at the diff?
I used Gedit with the correct characters and had it so on the screen when I made the diff.
Russian is a specific case, it's not using latin letters at all, so perhaps there is a specific configuration for it.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: first translation patch - broken characters

Post by vitamin »

Timeout wrote:
vitamin wrote: Unfortunately license is one of those things that should not be translated. Or it will loose it's power. See for example here : http://www.gnu.org/licenses/translations.html
However it had been translated on "clock" for instance, I took most of the translation there and adapted it to what I though it to be be better.

Legally though, If one does not have conditions in a language that he/she can understand, it would not be applicable to him/her.
I'm not a legal expert just thought it's worth to mention.
Timeout wrote:
vitamin wrote: What codepage have you used to edit the file? And what codepage have you used to look at the diff?
I used Gedit with the correct characters and had it so on the screen when I made the diff.
Russian is a specific case, it's not using latin letters at all, so perhaps there is a specific configuration for it.
Well I can write in English too :D What I'm talking about is what encoding did you set gedit to? If it's utf-8 then it would explain the problem. By default Wine is not using utf-8 for resource files since windows doesn't. You need to use the same encoding that windows uses cp-1250 if I'm not mistaken.
Timeout
Level 4
Level 4
Posts: 183
Joined: Sat Feb 23, 2008 12:45 pm

Post by Timeout »

Windows 1050 is (middle European) is not working due to invalid characters. 1052 (west European) did convert but caused the sames issues so I will try the other encoding format.

Gedit had it set at another ISO encoding.
mikolajz
Level 2
Level 2
Posts: 20
Joined: Wed Feb 27, 2008 7:18 am

Post by mikolajz »

For French you should use cp-1252. It is very similary to iso-8859-1, but some characters are different, so it's better to choose it correctly. Do the characters appear broken when opening the About > License dialog e.g. in notepad? If so, then you should open the resource file in the correct charset (e.g. specifing the charset in File > Open in geddit), the characters will be probably similarly broken, and you should fix them manually.

If the characters display correctly then there is something wrong with the patch. That's strange as I never had problem with Git and Polish characters in patches. Maybe it is your viewer that have a problem? What are you using to view it? Maybe it just expects the UTF-8 encoding and can't dislpay the characters that are correctly stored in the file?
Timeout
Level 4
Level 4
Posts: 183
Joined: Sat Feb 23, 2008 12:45 pm

Post by Timeout »

The characters are fine on my computer when applying directly the patch and fine when I compile it.

Git is messing it when I apply the diff. It has probably nothing to do with Wine, probably with the way Git is making the diff.

Edit: the screen output of the distribution is set to UTF-8. Maybe that's the problem (even if the patch itself has the correct format).
mikolajz
Level 2
Level 2
Posts: 20
Joined: Wed Feb 27, 2008 7:18 am

Post by mikolajz »

If you can apply the patch and Wine compiles correctly then probably the patch is correct. Could you put the patch file somewhere in the Internet so that I could download it? Alternatively, send it as an attachement to [email protected] (with no HTML content in e-mail or PGP signature, so that it displays correctly in the archives). I will check, if it works for me.

In case you don't know, sending to [email protected] is asking for the patch to be included into Wine. So you may want to check the spelling etc. before doing it.

Also, I have just noticed that there is no STRINGTABLE keyword before the '{'. It compiles and works fine for you without it?
Timeout
Level 4
Level 4
Posts: 183
Joined: Sat Feb 23, 2008 12:45 pm

Post by Timeout »

You are right about the STRINGTABLE. I forgot it when adding the rest (at first it didn't compile because the IDS part was missing and I got the idea from the Dutch translation- Thank you to whoever did it first).

I will try to compile it once more with STRINGTABLE added and if it works with you (maybe the numbers are something internal to Git), I will work on the rest.

Edit:PROBLEM SOLVED! After adding "STRINTABLE", the characters are correct. I will submit the patch.
Locked