You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of continuing to add more and more ugly if cases and hardcoding the lists of the languages it might be a good idea to make the code generic to allow adding more languages by just changing a simple configuration file.
Agree that the language handling needs refactoring since I remember the places to update which is error prone.
The issue with adding new language is that is it's not easy to parse XML of different languages since they exist in different formats of markup without any standard to parse them. AFAIK, there is no database dump available from Wiktionary and the XML dump has to be parsed per language using Python. Since I am not a native speaker I also need to randomly verify few words to ensure the meaning and parts of speech are correct. This also involves updating CDN which is also a manual process. This makes adding new languages a tiresome process.
Instead of continuing to add more and more ugly if cases and hardcoding the lists of the languages it might be a good idea to make the code generic to allow adding more languages by just changing a simple configuration file.
A few examples of code that needs changing:
NotificationDictionary/app/src/main/java/com/xtreak/notificationdictionary/MainActivity.kt
Lines 82 to 85 in d8ac11d
NotificationDictionary/app/src/main/java/com/xtreak/notificationdictionary/MainActivity.kt
Line 212 in d8ac11d
NotificationDictionary/app/src/main/java/com/xtreak/notificationdictionary/MainActivity.kt
Line 224 in d8ac11d
NotificationDictionary/app/src/main/java/com/xtreak/notificationdictionary/MainActivity.kt
Lines 278 to 279 in d8ac11d
Relevant issues: #39 #49 #55 #56
The text was updated successfully, but these errors were encountered: