anhility / BestInSlotRedux

A fork and continuation of the BestInSlot WoW addon.
MIT License
2 stars 15 forks source link

Some frFR strings wrongly encoded #29

Closed Meivyn closed 6 years ago

Meivyn commented 6 years ago

For these strings:

L["Deleting this is irreversible. Are you sure?"] = [=[
Cette action est irr\195\169versible. Voulez-vous continuer ?]=]

L[ [=[You can't delete this custom list.
It is in use at:
%s]=] ] = [=[Vous ne pouvez pas supprimer cette liste personnalis\195\169e.
Elle est utilis\195\169e pour :
%s]=]

L["You've picked: %s"] = [=[Vous avez choisi :
%s]=]

Seems like CurseForge don't encode to \r\n like it should.

anhility commented 6 years ago

Try updating your addon. I've gone through the translated strings and removed/inserted newline where it was needed.

Meivyn commented 6 years ago

This one still wrongly encoded as of 7.3.15:

L[ [=[You can't delete this custom list.
It is in use at:
%s]=] ] = [=[Vous ne pouvez pas supprimer cette liste personnalis\195\169e.
Elle est utilis\195\169e pour :
%s]=]
anhility commented 6 years ago

Make a custom list, add some items to it and try delete it without removing the items so you can give me a screen shot of what happens. It should all be on multiple lines.

anhility commented 6 years ago

Replicated your error now. Give me a minute to fix it

Meivyn commented 6 years ago

https://i.imgur.com/rWb5wWH.png

L[ [=[You can't delete this custom list.
It is in use at:
%s]=] ] = [=[Vous ne pouvez pas supprimer cette liste personnalis\195\169e.
Elle est utilis\195\169e pour :
%s]=]

To fix:

L["You can't delete this custom list.\r\nIt is in use at:\r\n%s"] = "Vous ne pouvez pas supprimer cette liste personnalis\195\169e.\r\nElle est utilis\195\169e pour :\r\n%s"
anhility commented 6 years ago

Found the fault. Had added newlines on accident in the localization on CurseForge. I will be fixed with the next release. Should be:

L["You can't delete this custom list.\r\nIt is in use at:\r\n%s"] = [=[Vous ne pouvez pas supprimer cette liste personnalis\195\169e.
Elle est utilis\195\169e pour :
%s]=]

edit: The translations can be on several lines as long as they are withing the brackets like this [=[ text ]=] in the lua file. It's the original string that was wrongly added in the locale file so the addon couldn't find it to replace the text with.

Meivyn commented 6 years ago

Well, tried your code and it's better but still wrongly encoded. https://i.imgur.com/x1dw24H.png

anhility commented 6 years ago

Did your code fix it or does it also give the encoding numbers?

Meivyn commented 6 years ago

Fix it. Something is wrong with [=[ brackets. Editing the CurseForge's translation with \r\n would work or not?

anhility commented 6 years ago

Yeah, seems when I read up on Lua it needs to be [==[ due to the translated string being on three rows. Weird

Or not... Looked up the old translation and it's the same as I wrote earlier... Hmm, I'll look into it later today.

anhility commented 6 years ago

Fixed the localization. Will push it later with a new release. It's at least just a minor error that don't break the addon.

Meivyn commented 6 years ago

Or not... Looked up the old translation and it's the same as I wrote earlier... Hmm, I'll look into it later today.

Maybe that was bugged earlier too. I can check it if you can link me the old locales.

anhility commented 6 years ago

It's the same in the old locales too. Changed the strings on CurseForge so it should be fine with next release

Meivyn commented 6 years ago

It's still wrongly encoded as of 7.3.16.

anhility commented 6 years ago

Which string?

Meivyn commented 6 years ago

The same as before.

anhility commented 6 years ago

Seems to be wrong no matter what. Will rewrite how the string is implemented during the weekend so it won't use any \r or \n

anhility commented 6 years ago

Broke up the string to two strings so the control characters won't get encoded by the localisation. New strings at the CurseForge page in a minute

anhility commented 6 years ago

Fixed now. Tested even with your translation and it was correctly encoded. Will be in the next release.

Meivyn commented 6 years ago

Thanks.