ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
7.93k stars 2.16k forks source link

AnkiDroid to use flag names like anki #16242

Open Giyutomioka-SS opened 3 weeks ago

Giyutomioka-SS commented 3 weeks ago

Purpose / Description

AnkiDroid to use Flag names like Anki

Fixes

How Has This Been Tested?

On Realme 6 & Emulator

Screen Recording

https://github.com/ankidroid/Anki-Android/assets/91668590/67718564-a5d6-44c6-b6cb-7f6b2ae89f30

Checklist

Please, go through these checks before submitting the PR.

github-actions[bot] commented 3 weeks ago

Message to maintainers, this PR contains strings changes.

  1. Before merging this PR, it is best to run the "Sync Translations" GitHub action, then make and merge a PR from the i18n_sync branch to get translations cleaned out.
  2. Then merge this PR, and immediately do another translation PR so the huge change made by this PR's key changes are all by themselves.

Read more about updating strings on the wiki,

criticalAY commented 3 weeks ago

'byte[][] net.ankiweb.rsdroid.NativeMethods.openBackend(byte[])' Unit test are likely to fail again

Giyutomioka-SS commented 3 weeks ago

@david-allison, Unit tests are failing again. What should be done?

Aditya13s commented 2 weeks ago

@Giyutomioka-SS Remove the code or resource which are not in use.

Giyutomioka-SS commented 2 weeks ago

@Giyutomioka-SS Remove the code or resource which are not in use.

Already did

david-allison commented 2 weeks ago

Ping me in 24h, feel free to pick up another issue in the meantime

Giyutomioka-SS commented 2 weeks ago

Ping me in 24h, feel free to pick up another issue in the meantime

@david-allison

david-allison commented 2 weeks ago

@Giyutomioka-SS with apologies, my laptop died today.

Try our Discord for now, I'll be a while to get back to normal

Giyutomioka-SS commented 2 weeks ago

@david-allison please don’t apologize, machines can give up anytime, and i always keep a tab on anki discord just don’t talk much😅

david-allison commented 2 weeks ago

Feel free to ping the channel for help/a review, it's what we're here for!

mikehardy commented 2 weeks ago

Not sure why, but the backend is not being found?


        Caused by:
        java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: 'byte[][] net.ankiweb.rsdroid.NativeMethods.openBackend(byte[])' [in thread "ForkJoinPool-1-worker-1"]
            at net.ankiweb.rsdroid.NativeMethods.openBackend(Native Method)
            at net.ankiweb.rsdroid.Backend.<init>(Backend.kt:79)
            at net.ankiweb.rsdroid.BackendFactory.getBackend(BackendFactory.kt:39)
            at net.ankiweb.rsdroid.BackendFactory.getBackend$default(BackendFactory.kt:37)
            at com.ichi2.anki.CollectionManager.ensureBackendInner(CollectionManager.kt:183)
            at com.ichi2.anki.CollectionManager.access$ensureBackendInner(CollectionManager.kt:39)
            at com.ichi2.anki.CollectionManager$getBackend$1$1.invoke(CollectionManager.kt:132)
            at com.ichi2.anki.CollectionManager$getBackend$1$1.invoke(CollectionManager.kt:132)
            at com.ichi2.anki.CollectionManager$withQueue$2.invokeSuspend(CollectionManager.kt:86)
            at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:42)
            at com.ichi2.anki.CollectionManager$getBackend$1.invokeSuspend(CollectionManager.kt:132)

I looked at the commit history - it should be squashed - no reason for 5 commits - so I recommend learning how git rebase works and perhaps doing a git rebase -i HEAD~5 then changing pick on commits 2 through 5 to squash and after getting your local branch cleaned up like that so it is a single commit doing a git push --force-with-lease to push your cleaned-up local branch back out to github for this PR - that will kick off CI again and perhaps the linker problem will be solved?

If it is not solved by that, then I would also do a git add remote upstream git@github.com:ankidroid/Anki-Android, then a git fetch upstream, then a git rebase upstream/main on your branch to pull in all upstream changes to make sure the backend dependency is correct and again git push --force-with-lease to push those changes back out to github so the PR is updated. That will run CI again and hopefully the problem will be solved?

criticalAY commented 2 weeks ago

@david-allison @Giyutomioka-SS It is blocked until I come up with the right code to handle the flag names, as the previous commit I made related to flag names was reverted

BrayanDSO commented 2 weeks ago

It is blocked until I come up with the right code to handle the flag names,

I don't see a reason for blocking this one. It doesn't matter which PR goes first, as long as is works and doesn't break CI

criticalAY commented 2 weeks ago

This PR uses a method which was reverted to fix the CI failure and that is the reason for the conflicts, but if you intend to replace strings only then go ahead, @Giyutomioka-SS remember to find and replace the strings at all places now