untranslated string in Harmony child theme
-
it looks like this function in
Library.js
is not returning the correct string:library.addProfileItem = async (data) => { data.links.push({ id: 'theme', route: 'theme', icon: 'fa-paint-brush', name: 'Theme settings', visibility: { self: true, other: false, moderator: false, globalMod: false, admin: false, }, }); return data; };
-
here's my
plugin.json
:{ "id": "nodebb-theme-harmony-sweetp", "url": "https://github.com/sweetppro/nodebb-theme-sweetp", "hooks": [ { "hook": "static:app.load", "method": "init" }, { "hook": "filter:admin.header.build", "method": "addAdminNavigation" }, { "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas" }, { "hook": "filter:config.get", "method": "getThemeConfig" }, { "hook": "filter:settings.get", "method": "getAdminSettings" }, { "hook": "filter:user.saveSettings", "method": "saveUserSettings" }, { "hook": "filter:user.profileMenu", "method": "addProfileItem" }, { "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" }, { "hook": "filter:middleware.render", "method": "removeFinalBreadcrumb" } ], "scripts": [ "../nodebb-theme-harmony/public/harmony.js", "scripts/sweetp.js" ], "modules": { "../admin/plugins/harmony.js": "../nodebb-theme-harmony/public/admin.js", "../client/account/theme.js": "../nodebb-theme-harmony/public/settings.js", "sweetp/customHelpers.js": "public/modules/customHelpers.js", "sweetp/customHelpers-common.js": "public/modules/customHelpers-common.js" }, "templates": "templates" }
-
addProfileItem
should like thislibrary.addProfileItem = async (data) => { data.links.push({ id: 'theme', route: 'theme', icon: 'fa-paint-brush', name: '[[themes/harmony:settings.title]]', visibility: { self: true, other: false, moderator: false, globalMod: false, admin: false, }, }); return data; };
-
-
@baris ah sorry, that is how the
Library.js
file looks.
The code I posted is actually from the parent Harmony theme, I guess I posted code from an older commit.I still have the issue.
Do I need to specifically overridelibrary.addProfileItem
in my theme to get the correct string? -
Im also getting this error:
[Error] Failed to load resource: the server responded with a status of 404 () (harmony.json, line 0)
for the file:
https://myforum.com/assets/language/en-GB/harmony.json?v=hd29mea4lak
it should be looking in - shouldn't it?
https://myforum.com/assets/language/en-GB/themes/harmony.json?v=hd29mea4lak
Copyright © 2024 NodeBB | Contributors