-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"?> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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.
translate strings to Persian and add rtl for AndroidManifest file.