Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize Persian Language #239

Merged
merged 21 commits into from
Jan 1, 2023
Merged

Conversation

DanielBlackBeard
Copy link
Contributor

@DanielBlackBeard DanielBlackBeard commented Dec 21, 2022

  • Initialize Persian language file
  • add to selector

+Initialize Persian language file
+add to selector
@arm64v8a
Copy link
Contributor

nekoray/CMakeLists.txt

Lines 291 to 295 in 255d95e

# Target Source Translations
set(TS_FILES
translations/zh_CN.ts
)

Please add language here too, and then run the build.

In this way, every time you compile, the strings that need to be translated will be automatically output to the .ts file, so that you can use Qt Linguist for easy translation.

@arm64v8a
Copy link
Contributor

It's ok, this PR can almost be merged.

But I checked, and the translated strings are very limited, and most of the entire interface is still in English.

So if you are interested, you can continue to push the translation to this PR.

@DanielBlackBeard

@DanielBlackBeard
Copy link
Contributor Author

It's ok, this PR can almost be merged.

But I checked, and the translated strings are very limited, and most of the entire interface is still in English.

So if you are interested, you can continue to push the translation to this PR.

@DanielBlackBeard

Hi,Thanks
In the first step, I wanted to initialize this project.
Now that everything is ok, I will continue to translate this. I hope I can prepare this soon.

@DanielBlackBeard
Copy link
Contributor Author

DanielBlackBeard commented Dec 31, 2022

Hi . I have a request.
If possible, can you make a video of how to cmake the project and build it(in macOS). Actually, I could not make it both in Windows and Mac.

Because I want to translate and to check the output every time, this will help me to have a good translation.

@arm64v8a

update: I using GitHub action but it take a lot of time for doing it from scratch every time.

+add more Persian translation
+ delete rewrite English text
@DanielBlackBeard
Copy link
Contributor Author

After built it , i tested it and there is a problem that the Translate use LTR formation , Middle east language are RTL and when language change to persian(farsi) , texts need to be RTL format .

@DanielBlackBeard
Copy link
Contributor Author

Translation result:
Some phrases are LTR and show it wrongly, but The Translation in most of sections is wonderful and readable and I like it very much.
I think everybody can use it.

Copy link
Contributor Author

@DanielBlackBeard DanielBlackBeard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Translate Readme to Persian and make it in Docs section
  • Translate Phrases and words for Persian language
  • add Macos build section to main readme

@arm64v8a arm64v8a self-requested a review January 1, 2023 08:25
@arm64v8a arm64v8a merged commit 8aee735 into MatsuriDayo:main Jan 1, 2023
@DanielBlackBeard
Copy link
Contributor Author

thanks @arm64v8a

@arm64v8a
Copy link
Contributor

arm64v8a commented Jan 1, 2023

The language is merged. I'm running the a test build https://github.com/MatsuriDayo/nekoray/actions/runs/3816019747

If you find that some texts are not RTL, you can take a screenshot and tell me.

@DanielBlackBeard
Copy link
Contributor Author

DanielBlackBeard commented Jan 1, 2023

for examples:
It usually gets into trouble when the English word is in the same sentence with Farsi
image
image
image
image
image

@arm64v8a
Copy link
Contributor

arm64v8a commented Jan 1, 2023

OK. I try to fix this before next release.

For example: Scan QR Code should display as

image

@arm64v8a
Copy link
Contributor

arm64v8a commented Jan 1, 2023

As far as I know, when the layout direction of Qt is LTR (for example, when the system is English), Qt will display texts as RTL only when it is pure Middle Eastern text.

When you set your system language to fr_IR, you would see this layout: image

So the solution is, if the language is Persian, set QT_LAYOUT_DIRECTION to RTL, so that the mixed text (any text including Persian word) can be displayed correctly, and the entire layout becomes RTL. Some strings (eg. traffic) need a Unicode LRO to be displayed correctly in this mode.

Is this acceptable? I saw quite a few Middle Eastern users like the RTL layout.

image

@DanielBlackBeard
Copy link
Contributor Author

This photo you gave is wonderful. Both the user interface is completely RTL ,the text in this photo is displayed correctly.
If it is created in this way, it will be really great.
Thankful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants