Properties in macro previews

We are having trouble getting our properties with translations to work in the macro preview for Confluence pages. All the rendering works except for getting properties with AJS.I18n.getText('key').

Currently we are testing in Confluence 6.7. We know for a fact that it is working in 6.1.1.

Any suggestions?

I somehow faced the same problem solved it by declaring the AJS.I18n.getS in the AJS.toInit:

AJS.toInit(function () {
    const I18N = {};
    I18N['dco.version'] = AJS.I18n.getText('dco.version');
    I18N['dco.sn'] = AJS.I18n.getText('dco.sn');
    I18N['dcephysical.version'] = AJS.I18n.getText('dcephysical.version');
    I18N['dcephysical.sn'] = AJS.I18n.getText('dcephysical.sn');
    I18N['dcevirtual.version'] = AJS.I18n.getText('dcevirtual.version');
    I18N['dcevirtual.sn'] = AJS.I18n.getText('dcevirtual.sn');
.....
}

used the I18N object instead of calling directly the AJS.I18n.getText

if you solved it in other way, please share

1 Like

Thanks @Panos. We have a few properties, so maintaining a second list of them would not be feasible for us. But nice to know that we are not alone in this matter.

Could it be a bug in newer Confluences? Did it work for you in earlier releases?

I face this on a 5.8.8 instance but i must say that suddenly came up. Through velocity i18n works fine, through JS it doesn’t.