Closed ndegwamartin closed 3 years ago
The form was NOT translated when I changed device language to Kiswahili (both Tanzanian and Kenyan dialect). French translation works but appears the skip logic applied via the rules is affected. My thinking is it maybe referencing actual text instead of the keys for the options. That can be corrected.
@dubdabasoduba Can you review this? I am gonna assign you to it as well. Thanks.
Merging #113 (b752355) into master (1cc1354) will decrease coverage by
0.10%
. The diff coverage is62.50%
.
@@ Coverage Diff @@
## master #113 +/- ##
============================================
- Coverage 75.01% 74.91% -0.11%
- Complexity 422 425 +3
============================================
Files 40 41 +1
Lines 1429 1443 +14
Branches 321 321
============================================
+ Hits 1072 1081 +9
- Misses 110 115 +5
Partials 247 247
Impacted Files | Coverage Δ | |
---|---|---|
...mcore/utils/internationalization/LanguageHelper.kt | 50.00% <50.00%> (ø) |
|
...erdstone/neatformcore/form/json/JsonFormBuilder.kt | 80.23% <70.00%> (-0.54%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 1cc1354...b752355. Read the comment docs.
The form was NOT translated when I changed device language to Kiswahili (both Tanzanian and Kenyan dialect). French translation works but appears the skip logic applied via the rules is affected. My thinking is it maybe referencing actual text instead of the keys for the options. That can be corrected.
We had configured the translation with the incorrect locale suffix. For Swahili should be sw
instead of swa
. More on locales and valid language codes can be found here. I'll add this link to the README as well
General question: Can the translations work with properties provided from another source other than loading them from the
resources
directory? For the forms, you can build from a file in the assets or from aString
source which can be stored in any place hence the reasons for having 2 constructors for the form builder. One accepts name of file in the assets directory whereas the other uses the JSON string provided.
Depends on how we'd want to implement this e.g.
Depends on how we'd want to implement this e.g.
- Would we want to store that json string form as already translated?
- If not, are the translations also provided alongside it?
I assume the translations will be provided alongside the form, that way we go with second option as it is more flexible.
@ndegwamartin Can you update spinner widget and any other widget with options that is saving the label instead of the key for the option. This is affecting rules processing in a multilanguange setup. E.g if the rule is declared to use the default language label, it will not work for other languages. This is reproducible on the Spinner. Debug this method com.nerdstone.neatformcore.rules.RulesFactory#updateFactsAndExecuteRules
and see the value that is passed (should be option key instead. I have not tested for radio groups/multi choice checkboxes.
The form was NOT translated when I changed device language to Kiswahili (both Tanzanian and Kenyan dialect). French translation works but appears the skip logic applied via the rules is affected. My thinking is it maybe referencing actual text instead of the keys for the options. That can be corrected.
We had configured the translation with the incorrect locale suffix. For Swahili should be
sw
instead ofswa
. More on locales and valid language codes can be found here. I'll add this link to the README as well
Did you push the fix for Swahili translation? I see the file extension is still the same in your last commit.
Also remember to increment the app version in the README/build.gradle file. I will remove Bintray configs in another commit, for now we can work with GitHub Package Registry.
Depends on how we'd want to implement this e.g.
- Would we want to store that json string form as already translated?
- If not, are the translations also provided alongside it?
I assume the translations will be provided alongside the form, that way we go with second option as it is more flexible.
If we pick the second option I think we'd then need to modify the constructor to accept an optional language translation file (or content)
Alright we can overload.
On Mon, May 17, 2021, 8:43 PM Martin Ndegwa @.***> wrote:
Depends on how we'd want to implement this e.g.
- Would we want to store that json string form as already translated?
- If not, are the translations also provided alongside it?
I assume the translations will be provided alongside the form, that way we go with second option as it is more flexible.
If we pick the second option I think we'd then need to modify the constructor to accept an optional language translation file (or content)
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ellykits/neat-form/pull/113#issuecomment-842511765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGM667AEUFN4GHXCPB4EW53TOFIVNANCNFSM43UQOBDQ .
@ndegwamartin I experienced app crash in Android version 10
Error logs
2021-05-25 16:20:45.333 3412-3412/com.nerdstone.neatform W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@b5ec994
2021-05-25 16:20:45.417 3412-3412/com.nerdstone.neatform E/CustomExceptions$$special$$inlined$CoroutineExceptionHandler: CoroutineExceptionHandler got java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
I have opened the new issue for fixing the issue with the spinner skip logic. This is good to go :+1:
Closes #69