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

add persian translate #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

taranehsaei
Copy link

translate strings to Persian and add rtl for AndroidManifest file.

Copy link
Member

@Kamuno Kamuno left a comment

Choose a reason for hiding this comment

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

Thank you for taking the time to translate the app into a different language. Sadly there is currently no way for us to check if the translation is correct. Also you should use direction independent properties "start/end" instead of hardcoded "right/left".

  • Why are there 3 different string files instead of just one?
  • Why is the rtl layout forced on the Help page?
  • Adding translatable="false" onto many strings that should be translated. This breaks already existing translations.

@@ -51,10 +54,15 @@ protected void onCreate(Bundle savedInstanceState) {
generalExpandableListView.setAdapter(expandableListAdapter);

overridePendingTransition(0, 0);

getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
Copy link
Member

Choose a reason for hiding this comment

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

this is not necessary .. the layout will just adjust itself if edited propperly. This should not be set by default.

@@ -55,9 +59,10 @@
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_gravity="right"
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed? "start" is correct here. It will automatically adjust if a rtl language is active as the start would then be on the right side.

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
tools:openDrawer="start"
android:layout_gravity="right"
Copy link
Member

Choose a reason for hiding this comment

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

again .. hardcoded right... should be "start"

Copy link
Author

Choose a reason for hiding this comment

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

when we change language to Persian everything is fine except one and thats navigation drawer its better to open from rtl but its not i just want to change it from ltr to rtl

Copy link
Member

Choose a reason for hiding this comment

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

For it to work properly and not break existing languages you should use the direction independent values "start" and "end" they are basically "left" and "right" but they switch around whenever an rtl language is active..

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Member

Choose a reason for hiding this comment

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

What is this file for?

<string name="version_number">Version</string>
<string name="about_author">Author: </string>
<string name="version_number" translatable="false">Version</string>
<string name="about_author" translatable="false">Author: </string>
Copy link
Member

Choose a reason for hiding this comment

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

Adding translatable="false" here breaks the german translation that indeed translates this string.

<string name="about_author_names" translatable="false">Tobias Neidig </string>
<string name="about_author_contributors"> and contributors.</string>
<string name="about_author_contributors" translatable="false"> and contributors.</string>
Copy link
Member

Choose a reason for hiding this comment

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

same here.. this should be translated.

@Kamuno Kamuno added the language Adding a language label Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement language Adding a language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants