Instruccions to rename some Kotahi menus/UI components

We are changing the editors dropdown menu labels, so wee need a little guidance for our developers to proceed.

Also, we need to preselect which users can apear in which dropdown menu. As in our workflow we have “Revisor Encargado, Revisor Invitado, Revisor de Estilo” those are the labels we want, and we want to only select the people who belong to those roles.

It is possible to change the text and labelling of these dropdowns (and many other UI components) by supplying your own custom translations (instructions here).

But we do not yet provide many user roles, except on a per-manuscript level. For any particular manuscript, a user can be assigned to various different roles such as reviewer, editor, senior editor etc., but these are not roles the user holds across the entire group. At the group level, the only special role a user can be assigned is Group Manager; and at the highest system level (across all groups) the only special role is Admin.

We recognise there is interest in assigning a greater variety of roles at group level, but we’re still not clear on exactly what roles might be desired or what features those roles might restrict or enable. Allowing customers to define their own roles may be the best approach.

It sounds as though one of the main benefits for you would simply be allowing such users to be listed by their roles to make selection easier.

I saw the translationOverrides.example, but I’m not sure of how to write the name of the selector I want to change:

this is the selector in the chrome inspector “assignseniorEditor”, then in the file I see this object:
/* Your changes here, to override app/i18n/en/translation.js. EXAMPLE:

    msStatus: {

      accepted: 'Approved',

    },

    manuscriptsTable: {

      'Manuscript number': 'Preprint number',

    },

how do I translate the selector to the proper code?

You won’t be able to find the keys to change by inspecting elements in the browser. Instead you must look at the file app/i18n/en/translation.js (or app/i18n/es-la/translation.js if you are viewing the app in Latin-American Spanish). You will find this is organised by areas of program functionality and contains the various pieces of UI text. You can search for the text you want to replace. Follow this structure when populating your translationOverrides.js.

Here’s an example of someone providing translation overrides for the “Assign senior editor”, “Assign handling editor” and “Assign editor” dropdowns, plus some other labelling relating to the editor roles:

Note that you seem to be intending to relabel the editors as “reviewers”, if I understand correctly. Kotahi provides separate functionality for assigning reviewers, whose only power is to comment on the article they’ve been assigned to review. If in your workflow reviewers have power to accept/reject and edit manuscripts in the system, then your changes make sense. If you need to discuss the particulars of roles and workflow, @ryan.dix is a good person to chat with.

1 Like

Hi @benwh, I did as you said on my local instance, but it doesn’t update on the frontend (I even stopp the containers):

@ryan.dix hey, we need help with this :sweat_smile:

@benwh I tested it without the “assign” object, and it’s also not working

@proal Are you on kotahi 3.0.2? This translation override feature only shipped with the latest version. If you’re on the latest main it’s possible it could have been broken, as we’ve just made significant changes to project structure. I still have to test that. But I’ve tested and it is working on 3.0.2.
Also, make sure you have the name and location of the file correct. translationOverrides.example.js contains instructions for how to name/locate it.

Thank’s @benwh,

there was an extra bracket. My apologies.

1 Like