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

Gujarati phonetic layout #562

Merged
merged 7 commits into from
Mar 3, 2024
Merged

Conversation

Yogesh-B
Copy link
Contributor

@Yogesh-B Yogesh-B commented Feb 18, 2024

Added Gujarati phonetic layout.

  • added layout xml
  • added changes in KeyModifier.java for shift key combinations
  • re-generated values/layouts.xml
  • re-generated check_layout.output

Tested debug APK build(gradle and java), working fine on my device.

Copy link
Owner

@Julow Julow left a comment

Choose a reason for hiding this comment

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

Looks good :) I have left some comments but I'd be happy to merge it like this if you think it's ready.

@@ -50,6 +50,10 @@ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeho
# grek_qwerty
Duplicate keys: ;
1 warnings
# guj_phonetic_in
Duplicate keys: +, -, =, _, `, ટ, ડ
Copy link
Owner

Choose a reason for hiding this comment

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

This indicates symbols that are present twice on the layout. This wastes some space and looks weird.

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keyboard name="ગુજરાતી ફોનેટિક - Gujarati Phonetic" script="gujarati">
<row>
Copy link
Owner

Choose a reason for hiding this comment

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

The top row doesn't look good in combination to the built-in number row (that can be enabled in the settings). Do you think every users of this layout will want to have this row ?

Also, the layout is very high due to top row. It takes almost half of the screen on my device. You can make the top row a bit smaller with height="0.75" (like the built-in number row).

Copy link
Contributor Author

@Yogesh-B Yogesh-B Feb 18, 2024

Choose a reason for hiding this comment

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

Screenshot_2024-02-18-22-29-59-773_com.github.android.jpg

we can do something like this to remove the top row. [**also as you see in the Screen Shot, numbers are shown properly in keyboard but output is not in devanagari. I feel like there is a bug. Devanagari numbers work fine in normal view, just this number view is not working proper]

normal working in below view:
Screenshot_2024-02-18-22-38-30-500_com.github.android.jpg

Copy link
Owner

Choose a reason for hiding this comment

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

The devanagari digits are specified here: https://github.com/Julow/Unexpected-Keyboard/blob/master/srcs/juloo.keyboard2/KeyModifier.java#L1060
Are they wrong ?

To change the numpad digits when your layout is visible, you'd need to add a new similar map and call it from here: https://github.com/Julow/Unexpected-Keyboard/blob/master/srcs/juloo.keyboard2/KeyModifier.java#L100

Copy link
Contributor Author

@Yogesh-B Yogesh-B Feb 28, 2024

Choose a reason for hiding this comment

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

The first screen shot just shows the layout in Devanagari(or any other language), but when typing, it puts output as english numbers. I think it is using values from https://github.com/Julow/Unexpected-Keyboard/blob/master/res/xml/numeric.xml .

I tried adding Gujarati number in the java file you suggested, but had same issue as mentioned above.

Edit: just tested by adding Gujarati numbers to the numeric.xml , it is outputting values we define there. the KeyModifier.java->modify_numpad_script is just for UI part. actual output comes from xml mapping.
(Sorry but I am not a android/java/kotlin developer, just did some debugging. : )

Copy link
Owner

Choose a reason for hiding this comment

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

You are right, there's a serious bug in the numpad. I fixed it in 8c7559d and fixed the number row in 8b5d971.

You can now remove the number row from your layout and enable the number row in the settings.

Note that the layout must also contain the numerals for people that don't use the number row option.

srcs/layouts/guj_phonetic_in.xml Outdated Show resolved Hide resolved
@Yogesh-B
Copy link
Contributor Author

I could not find option to enable script specific numeric row, hence currently adding first row permanent and have made changes to row height so that it does not take up space.

Now the layout looks quite good and feels almost same as experience on PC. No issue in merging it.

Numeric layout related issue can be done in another pull/issue.

@Julow
Copy link
Owner

Julow commented Feb 28, 2024

Now that the number row and numpad are fixed on master, could you pull master and update the layout ?

I've added support for the gujarati numerals in this branch: https://github.com/Julow/Unexpected-Keyboard/tree/gujarati_numpad_script
Though, I'm not sure I got them right so I'd prefer if you could push that to your branch or push the implementation you had earlier.

Copy link
Owner

@Julow Julow left a comment

Choose a reason for hiding this comment

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

The layout looks nice :) I have a comment but I would merge before next release anyway.

Many thanks for helping improve the keyboard :)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keyboard name="ગુજરાતી ફોનેટિક - Gujarati Phonetic" script="gujarati">
<row>
<key key0="ટ" key1="`" key2="1" key3="!" key4="esc"/>
Copy link
Owner

Choose a reason for hiding this comment

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

The western numerals are on the keyboard instead of the gujarati ones. Is this intended ?

@Julow Julow merged commit a1de69b into Julow:master Mar 3, 2024
4 checks passed
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.

None yet

2 participants