humhub / translation

Internal translation tool
https://translate.humhub.org
Apache License 2.0
17 stars 15 forks source link

Broken Translatable core & custom module dropdown menu #31

Closed ArchBlood closed 2 years ago

ArchBlood commented 4 years ago

Would seem that now most translations are broken and only show % this also affects custom modules that have translatable files

Screenshot_3

Throws this on trying, no error logs

{
    "url": "/translation/translate/index?moduleId=directory&language=zh-CN",
    "status": 404,
    "response": {
        "error": true,
        "message": ""
    },
    "textStatus": "error",
    "xhr": {
        "readyState": 4,
        "responseText": "{\"error\":true,\"message\":\"\"}",
        "responseJSON": {
            "error": true,
            "message": ""
        },
        "status": 404,
        "statusText": "Not Found"
    },
    "dataType": "json",
    "error": true,
    "message": "",
    "errorThrown": "Not Found",
    "validationError": false
}
luke- commented 4 years ago

I can't replicate this on our translation server. Are there any specific steps to reproduce the problem?

ArchBlood commented 4 years ago

Not exactly sure, all I did was enable the module while having custom modules with custom namespaces, example being the scroll up module and a few others from @GreenMeteor 🤔

luke- commented 4 years ago

Strange, so this does not affect our translation community?

ArchBlood commented 4 years ago

Doesn't look like it affect the translation site unless the translation site also use custom modules with custom namespaces?

Example

namespace gm\humhub\modules\scrollup
luke- commented 4 years ago

Hmm just tested it, and the scrollup modules works fine with a custom namespace.

ArchBlood commented 4 years ago

I've disabled and re-enabled the module some of the options have come back but not all are available still. :thinking:

ArchBlood commented 4 years ago

Although once I try updating the translation it throws the same error... :disappointed:

luke- commented 4 years ago

Hmm I cannot reproduce this with the "scrollup" module on my local environment

buddh4 commented 4 years ago

I could not recreate the broken core modules as in your screenshot, but I probably found the problem with your custom modules. Currently the directory name of your module needs to match the module id. So it does not work if your module directory name is e.g. humhub-modules-scrollup it needs to be scrollup.

Regarding the broken core modules, are there maybe any other errors hidden in the logs?

buddh4 commented 4 years ago

I did also run php yii message/extract-module scrollup

ArchBlood commented 4 years ago

I only got the scrollup module translation working when changing the namespace but got most of core working again, as for error logs didn't show any @buddh4