nextcloud / translate

A Machine translation provider using Opus models by University of Helsinki running locally on CPU
11 stars 1 forks source link

Wrong translate config (leads to crash in android talk app) #17

Closed mahibi closed 1 year ago

mahibi commented 1 year ago

I got a report from a user who has this stuff in the translate capabilities. Just a tiny excerpt:


                                {
                                    "from": "es_AR",
                                    "fromLabel": "Español (Argentina)",
                                    "to": "he",
                                    "toLabel": "עברית"
                                },
                                {
                                    "from": "es_AR",
                                    "fromLabel": "Español (Argentina)",
                                    "to": "fa",
                                    "toLabel": "فارسى"
                                },
                                {
                                    "from": "es_AR",
                                    "fromLabel": "Español (Argentina)",
                                    "to": "th",
                                    "toLabel": "ภาษาไทย - Thai"
                                },
                                {
                                    "from": "es_AR",
                                    "fromLabel": "Español (Argentina)",
                                    "to": "lo",
                                    "toLabel": "ຂີ້ຕົວະ"
                                },
                                {
                                    "from": "es_AR",
                                    "fromLabel": "Español (Argentina)",
                                    "to": "ka_GE",
                                    "toLabel": "ქართული"
                                },
                                {
                                    "from": "es_AR",
                                    "fromLabel": "Español (Argentina)",
                                    "to": "zh_TW",
                                    "toLabel": "正體中文(臺灣)"
                                },

So there are hundreds(?) of combinations that are not intended/supported. This leads to a memory crash in the android talk app when opening conversations, see https://github.com/nextcloud/talk-android/issues/3099

Anyone has an idea how this translate config became like it is?

marcelklehr commented 1 year ago

Anyone has an idea how this translate config became like it is?

The only way this array is populated is when an app registers a translation provider and populates the available languages like this. This app only adds 4 languages and definitely not Thai.