the3dfxdude / 7kaa

Seven Kingdoms: Ancient Adversaries - Go to the main source repository at https://sourceforge.net/projects/skfans/ for source code and builds
https://7kfans.com
Other
253 stars 71 forks source link

Arabic lang #107

Closed OmarAglan closed 5 years ago

OmarAglan commented 5 years ago

Hello i was playing this game for a while and have been asking can this game support arabic lang? if its support It i will start working on adding arabic file

raz0rknaif commented 5 years ago

Yes, it should support Arabic. We would need a font and to do stuff with the calendar and numbers tho. Please begin)

the3dfxdude commented 5 years ago

No that is not really true. If you want support, the written language must be able to support an 8-bit character encoding written left to right. Please identify a usable 8-bit character encoding that can be used left to right.

raz0rknaif commented 5 years ago

ISO/IEC 8859-6 ?

Ah OK. left to right... if I remember right, at the mosque there were books written from left to right in Arabic.

raz0rknaif commented 5 years ago

Perhaps someone else has a better answer, but there are Unicode Bidirectional Formatting Codes such as 202D (LEFT-TO-RIGHT OVERRIDE (LRO) which causes an RTL script to be written LTR.

For example,

LTR Override

The &#x202D code will cause Hebrew to be written left to right until the end "pop" character ‬. The example text is the first four letters of the Hebrew alphabet which begins with the letter alef (א).

Normal RTL: אבגד
Code: ‭אבגד‬

Result: ‭אבגד‬

Here is an English example,

RTL Override

The &#x202E code will cause English to be written right to left until the end "pop" character ‬. The example text is "Hello World."

Code: ‮Hello World‬
Result: ‮Hello World‬

It is indeed "written in the other direction," but the letters are still written "normally." Dunno. Maybe there is a "backwards" Arabic font.

the3dfxdude commented 5 years ago

The po file ought to be encoded in UTF-8 for all practical purposes. When running the game, gettext will return messages encoded in the system encoding, which let's also say it's UTF-8 for practical purposes. But the game's font code only supports 8-bit character encodings (not multibyte). So we then convert from gettext (UTF-8) to 8-bit single code. We need to identify a code set that is compatible, where we can feed an array of 8-bit words into the render function and get out what we would need. Right now I don't see any code set that words. I think we can only do left to right, without any kind of special annotations.

OmarAglan commented 5 years ago

i don't like it? arabic works with rtl only. i can reverse the words but it will not be good thing to do!

the3dfxdude commented 5 years ago

Nope. Reversing rtl purposely at any point seems like a failing solution.

Is it possible that latin characters ltr are appropriate in your locale? It's only a minor solution, but we need your feedback if it's even possible to consider.

Does ISO/IEC 8859-6 cover all the arabic characters in your locale? Note if we were to go this route, someone will need to update the Font code in the game to support rtl.

OmarAglan commented 5 years ago

Is it possible that latin characters ltr are appropriate in your locale? It's only a minor solution, but we need your feedback if it's even possible to consider.

yes i would say it support it

Does ISO/IEC 8859-6 cover all the arabic characters in your locale? Note if we were to go this route, someone will need to update the Font code in the game to support rtl.

yes it does and it will be great way to start

OmarAglan commented 5 years ago

also note i am not a programer so i can't help in any programing sadly :(

the3dfxdude commented 5 years ago

That's ok. No problem you are not a programmer.

I will accept a translation of arabic using latin script, if there is at least one more supporting opinion shared that this is acceptable to the arabic language community. Loki please note this means that the message file will be UTF-8, and should have latin character script when submitted. Omaranwa, feel free to contribute anything you could towards translating when Loki or I gives a go-ahead.

Supporting ISO 8859-6 is going to be a difficult project, so I won't accept a translation targeting that font/codeset until the details are worked out.

OmarAglan commented 5 years ago

I will accept a translation of arabic using latin script, if there is at least one more supporting opinion shared that this is acceptable to the arabic language community. Loki please note this means that the message file will be UTF-8, and should have latin character script when submitted. Omaranwa, feel free to contribute anything you could towards translating when Loki or I gives a go-ahead.

ah, i'm sorry for this but i will not write arabic in latin character script, because its not the right way to do this. also i will add arabic as it is and will wait for proper RTL support.

OmarAglan commented 5 years ago

Supporting ISO 8859-6 is going to be a difficult project, so I won't accept a translation targeting that font/codeset until the details are worked out.

i can wait for it.

the3dfxdude commented 5 years ago

OK thanks for the clarification. I was trying to be doubly sure.

raz0rknaif commented 5 years ago

Good evening gentlemen. Just my two cents:

I am also not a programmer, so from my perspective, I see no hinderance to submitting an arabic translation. I don't want to say, "let's do this work and let the programmers deal with the rest." I grealy admire the techinical skills involved in dev support for the multilingual support. But I think there is no harm in having an ar.po. in /po.

To be honest, I am very ethusisastic about people doing a translation. I am not checking in, I am just super curious and excited about progress to a translation lol. So I would prefer not waiting. I can wait for support in the code, but "I want the translation." I wouldn't deny someone the opportunity to submit a translation. I hope to work things out to get this .po file accepted. Even at the minimum, I would like to just read it myself to better understand how the English text is interpreted and translated.

On another note,

I don't like 8859-6 because it doesnt support Perisan and Urdu. I assume all Arabic dialects are supported by 8859-6, but it is so sub par in terms of languages using an Arabic script. I'm not sure of the technicalities, but I wouldn't want to add support for 8859-6 when a Persian (et cetera) translation is offered or submitted.

Personally, I would prefer to work on the Russian translations further, such as the graphics, audio, and remaining unmarked English text. Id est a complete translation.

the3dfxdude commented 5 years ago

No, there are issues with supporting something half-way. I'm not going to accept something we cannot properly support. We either plan to get it done right, or we simply say we can't do it now.

This user says ISO 8859-6 supports his locale. This must mean he is not from Persian or Urdu regions. If someone wants to have Persion or Urdu, then we need to ask again which 8-bit codesets would work. If there aren't any, then again the answer is simply we can't do it right now.

raz0rknaif commented 5 years ago

Okay, if you think that's best. I will accept the translation if that means anything. I work via a fork of the project and was fixin on working a bit more independently on translations. I cannot provide multilingual support in the code, but I hope to collaborate with translators in the ongoing future.

On Wed, Sep 26, 2018 at 8:10 AM, the3dfxdude notifications@github.com wrote:

No, there are issues with supporting something half-way. I'm not going to accept something we cannot properly support. We either plan to get it done right, or we simply say we can't do it now.

This user says ISO 8859-6 supports his locale. This must mean he is not from Persian or Urdu regions. If someone wants to have Persion or Urdu, then we need to ask again which 8-bit codesets would work. If there aren't any, then again the answer is simply we can't do it right now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/the3dfxdude/7kaa/issues/107#issuecomment-424708556, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab7iI1yTWp7k97Tdo7fs3c8jJuN6l5WKks5ue3ysgaJpZM4WwsUS .

-- Timothy Rink: 6462CD04 https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C7780B26462CD04 @ https://keyserver.ubuntu.com/ for PGP key.

OmarAglan commented 5 years ago

@raz0rknaif i will add arabic and i will wait for proper rtl support

raz0rknaif commented 5 years ago

@Omaranwa sounds great! i will also wait.

feel free to contact me if you have any questions about the source text. i dont mind)

On Thu, Sep 27, 2018 at 4:10 AM, Omaranwa notifications@github.com wrote:

@raz0rknaif https://github.com/raz0rknaif i will add arabic and i will wait for proper rtl support

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/the3dfxdude/7kaa/issues/107#issuecomment-425017991, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab7iI0B-0r19xP8UZReYre0aW6zjeuOzks5ufJX-gaJpZM4WwsUS .

-- Timothy Rink: 6462CD04 https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C7780B26462CD04 @ https://keyserver.ubuntu.com/ for PGP key.

the3dfxdude commented 5 years ago

This appears to be an offer for translation. Please work with raz0rknaif on how to work on the translation. Closing.