Skip to content

Conversation

@catreedle
Copy link
Collaborator

Contributor checklist


Description

This PR adds a new Indonesian keyboard to Scribe's supported keyboards.

  • Create new file be/scri/services/IndonesianKeyboardIME.kt
  • Add new db for Indonesian assets/data/IDLanguageData.sqlit
  • Create new be.scri.helpers.indonesian.IDInterfaceVariables
  • Add Indonesian support to
    • be.scri.ui.screens.settings
    • AndroidManifest.xml
    • be.scri.helpers.LanguageMappingConstants
    • be.scri.helpers.data.TranslationDataManager
    • be.scri.helpers.ui.HintUtils
    • xml/method.xml
  • Create new file xml/method_indonesian.xml
  • Create res/xml key_letters file for Indonesian

Related issue

@github-actions
Copy link

Thank you for the pull request! 💙

The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Android rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The linting, formatting and testing workflows within the PR checks do not indicate new errors in the files changed

    • Tests may need to be reran as they're at times not deterministic
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

ac4f09d Latest update of i18n files
bad9ffc Translated using Weblate (Turkish) (scribe-org#96)
0c6bd83 Do latest JSON conversions to client app files
2c0ee20 Add Indonesian to global languages
62377d4 Add note on conventional comments to PR thank you
ef56ab0 Add Telugu and sort keys for campatibility with Weblate PRs
1179787 Translated using Weblate (Turkish) (scribe-org#95)
955283d Sort all JSON files
dc21ca8 Translations update from Hosted Weblate (scribe-org#94)
05ae09e Change the json keys to start with i18n.app for all app keys  (scribe-org#89)
ed999a5 Feature/kannada i18n (scribe-org#93)
6b80dbe feature: added tamil language support (scribe-org#90)
889f779 Update docs for syncing projects

git-subtree-dir: app/src/main/assets/i18n
git-subtree-split: ac4f09d0d61982f3c6940c8731ec511da6924ef5
@catreedle
Copy link
Collaborator Author

Hi @andrewtavis, @angrezichatterbox, @DeleMike
would love to have your feedback on this when you have the time, thank you 😊

@DeleMike
Copy link
Collaborator

Thanks @catreedle !

I will check this out :)

Copy link
Collaborator

@DeleMike DeleMike left a comment

Choose a reason for hiding this comment

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

Thanks again @catreedle ,

praise:

  • I love the fact you added an Indonesian tile in the download data screen
  • I do not know if Inodesia uses Latin alphabets. do they?

issue to look into:
When I tried to perfom the translation function, I tried to translate "dog" to indonesian, I was hit with

2025-10-27 22:13:36.922  6648-6648  MessageQueue-JNI        be.scri.debug                        E  android.database.sqlite.SQLiteException: no such column: id (code 1 SQLITE_ERROR): , while compiling: SELECT `id`
                                                                                                    FROM `english`
                                                                                                    WHERE word = ?
                                                                                                    	at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
                                                                                                    	at android.database.sqlite.SQLiteConnection.-$$Nest$smnativePrepareStatement(Unknown Source:0)
                                                                                                    	at android.database.sqlite.SQLiteConnection$PreparedStatementCache.createStatement(SQLiteConnection.java:1562)
                                                                                                    	at android.database.sqlite.SQLiteConnection.acquirePreparedStatementLI(SQLiteConnection.java:1098)
                                                                                                    	at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1126)
                                                                                                    	at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:686)
                                                                                                    	at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:614)
                                                                                                    	at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:62)
                                                                                                    	at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
                                                                                                    	at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
                                                                                                    	at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1823)
                                                                                                    	at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1755)
                                                                                                    	at be.scri.helpers.data.TranslationDataManager.queryForTranslation(TranslationDataManager.kt:78)
                                                                                                    	at be.scri.helpers.data.TranslationDataManager.getTranslationDataForAWord(TranslationDataManager.kt:51)
                                                                                                    	at be.scri.services.GeneralKeyboardIME.getTranslation(GeneralKeyboardIME.kt:2097)
                                                                                                    	at be.scri.services.GeneralKeyboardIME.handlePluralOrTranslateState(GeneralKeyboardIME.kt:2165)
                                                                                                    	at be.scri.services.GeneralKeyboardIME.handleKeycodeEnter(GeneralKeyboardIME.kt:2136)
                                                                                                    	at be.scri.helpers.KeyHandler.handleEnterKey(KeyHandler.kt:241)
                                                                                                    	at be.scri.helpers.KeyHandler.processKeyCode(KeyHandler.kt:95)
                                                                                                    	at be.scri.helpers.KeyHandler.handleKey(KeyHandler.kt:58)
                                                                                                    	at be.scri.services.IndonesianKeyboardIME.onKey(IndonesianKeyboardIME.kt:40)
                                                                                                    	at be.scri.views.KeyboardView.detectAndSendKey(KeyboardView.kt:1172)
                                                                                                    	at be.scri.views.KeyboardView.onModifiedTouchEvent(KeyboardView.kt:1824)
                                                                                                    	at be.scri.views.KeyboardView.onTouchEvent(KeyboardView.kt:1649)

There is an SQL error in there.

  • I also noticed the Indonesian Keyboard omitted the plural and conjugate commands. is that something that was agreed upon?

In summary,

  • the keyboard looks nice! does it follow Indonesia writing standards?
  • Just ensure that we have our three commands to allow the keyboard stay consistent.
  • Fix the sql find issue:
(1) no such column: id in "SELECT `id` FROM `english` WHERE word = ?"

Well done for these great work!!

@catreedle
Copy link
Collaborator Author

Hi @DeleMike, thank you for looking into this 😊
Yes, we use the Latin alphabet. Some ethnic language(s) have their own alphabet, but the formal national language uses the Latin alphabet.

For the translation error, I would need some help generating the translation database for Indonesian.

For the commands, Indonesian doesn't have conjugation or clear plural rules, so I assumed it made sense to omit them, also based on the discussion here.

Hope that clarifies things. Let me know if there's anything else. :)

@DeleMike
Copy link
Collaborator

Okay great! And thanks for the clarification @catreedle

You mentioned this in your issue:

Something that seems to be hard is the plural of nouns :) Thus the Plural key might be of more use to potential Scribe users :)

I am not sure I understand it.

I do understand why conjugation might not work. Is it something we should remove? (this is an edge case) @andrewtavis

for the generation of the Indonesian translation database, I’m wondering that the generation should be straightforward (just as the rest) unless there’s a something different we should do. Did you try it out? What did you do?

can you weigh in on this @axif0 ? (Concerning the Indonesian translation db). Thanks!

Well done for the great work @catreedle

@catreedle
Copy link
Collaborator Author

Here's how I tried to generate it @DeleMike using the CLI
Screenshot 2025-10-28 at 15 32 18

Screenshot 2025-10-28 at 15 35 49

and here's the result
Screenshot 2025-10-28 at 15 37 19

@catreedle
Copy link
Collaborator Author

You mentioned this in your issue:

Something that seems to be hard is the plural of nouns :) Thus the Plural key might be of more use to potential Scribe users :)

I am not sure I understand it.

There's no clear rule for Indonesian plural, I think scribe-org/Scribe-iOS#322 (comment)

@DeleMike
Copy link
Collaborator

Ah, I see. Can you share with me the Indonesian output? or do you have data? @axif0 , will have more concrete info here :)


You mentioned this in your issue:

Something that seems to be hard is the plural of nouns :) Thus the Plural key might be of more use to potential Scribe users :)

I am not sure I understand it.

There's no clear rule for Indonesian plural, I think scribe-org/Scribe-iOS#322 (comment)

Okay, got it :)
I think we should leave the final decision to @andrewtavis and @angrezichatterbox. Let us know what they think. But I agree with you! Totally makes sense. I just wanted to make sure we are abiding with consistent app design

@catreedle
Copy link
Collaborator Author

here is the Indonesian table @DeleMike :)
Screenshot 2025-10-28 at 16 03 15

@catreedle
Copy link
Collaborator Author

Okay, got it :) I think we should leave the final decision to @andrewtavis and @angrezichatterbox. Let us know what they think. But I agree with you! Totally makes sense. I just wanted to make sure we are abiding with consistent app design

sure :). thank you for confirming the details here @DeleMike :)

@DeleMike
Copy link
Collaborator

here is the Indonesian table @DeleMike :) Screenshot 2025-10-28 at 16 03 15


Great! That means that you have your data working.

So now, the challenge you are facing is? I would like a small brief again.

But I do know that you can just drop the SQLite file in the assets directory. And make sure you process it from your Kotlin code. You will also have to look into your DatabaseFileManager.kt file to see how integration works.

@catreedle
Copy link
Collaborator Author

Screenshot 2025-10-28 at 16 16 00

question: here is the translation DB in Scribe-Android, so I assumed it should be in this format?

I haven't tried running the app using the newly generated DB, tho 🤔

@DeleMike
Copy link
Collaborator

Yes, that is it. But I do not see the Indonesian column there. it is "in", right?

@catreedle
Copy link
Collaborator Author

No, it is not. Indonesia is "id". The TranslationData I generated has a table for each language, but the one for the app has one table with one column for each language.

@DeleMike
Copy link
Collaborator

That is true. I am not sure of the process to combine all generated translation data into one table. How are we gonna do this? @andrewtavis , is there a process for this?

The screenshot is from Scribe-Data. It separates one language per table

Screenshot 2025-10-28 at 10 44 12

cc: @axif0

Thanks @catreedle !! ✨
Let's wait a bit :)

@catreedle
Copy link
Collaborator Author

@DeleMike Thank you! ✨ ✨

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