Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

this alias aren't resolved in some syntaxes #757

Open
rommni opened this issue Aug 28, 2020 · 0 comments
Open

this alias aren't resolved in some syntaxes #757

rommni opened this issue Aug 28, 2020 · 0 comments
Assignees
Labels

Comments

@rommni
Copy link
Contributor

rommni commented Aug 28, 2020

Some code of our team using a particular way to declare some "mini class" inside of a qooxdoo class.

qx.Class.define("myProject.MyClass",
{   
    extend: qx.ui.container.Composite,

    include : [qx.locale.MTranslation],

    construct: function () {
        this.SortOfClass = new this.__CreateSortOfClass(this, someArguments);
    }

    members: {
        __CreateSortOfClass(pThis, someArguments) {
            let that = pThis;
            // Some initialization
            let someTrad = that.tr("MyStringToTranslate");
        }
    }
}

In this particular case the qx.tool.compiler.ClassFile.js doesn't recognize that as a thisAliases and so it can be a problem for example for translations, because the "MyStringToTranslate" isn't recognize as a translation Id used so isn't added to qx.$$translations and so the tr return the Id instead of the translated string.

I recognize that it is a very particular use case and for the moment we found a fix by using "writeAllTranslations" : true in compile.json, however I don't know if it can cause other problems and if one of you want to have a look and have a solution it would be very pleasant for us ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants