Pkp-lib: [OJS 3.1.1.4] Translation keys might be confused for some locales (navigation.submissions & about.submissions)

Created on 6 Nov 2018  路  32Comments  路  Source: pkp/pkp-lib

Hi! See here for the details: https://forum.pkp.sfu.ca/t/ojs3-1-submissions-locale-key/46290

navigation.submissions and about.submissions may have different translations for some locales, so they cannot be used interchangeably.

All 32 comments

@asmecher, I might need some help tracking this down. From what @Ph-We wrote in the forum, I am not sure if the locale keys or the code displaying them changed between 3.0 and today.

@mtub, I think the relevant introduction since OJS 3.0 would be the custom nav menus code. @Ph-We, searching the code, I get...

$ fw navigation.submissions | grep -v locale
./lib/pkp/classes/services/PKPNavigationMenuService.inc.php
./lib/pkp/templates/common/header.tpl
./lib/pkp/templates/dashboard/index.tpl
./registry/navigationMenus.xml
$ fw about.submissions | grep -v locale
./lib/pkp/templates/frontend/pages/submissions.tpl
./templates/frontend/components/primaryNavMenu.tpl

Do you have a proposal for how to rearrange the use of the two keys?

Well, what we would like to have in the end is the about.submissions key being used in the 'About' dropdown list in the Navigation menu by default (instead of navigation.submissions):

image

So I might only suppose, that about.submissions should be used in either ./registry/navigationMenus.xml or ./lib/pkp/classes/services/PKPNavigationMenuService.inc.php _instead of navigation.submissions._ Or maybe in both of them...

I'm not especially familiar with that part of the code -- @defstat, which or both of the above changes would be needed?

Just to be more specific: the item in the 'About' dropdown menu should have the same key (about.submissions) as the item in the breadcrumbs (in the page, to which that item leads):

image

See here e.g.: https://jsps.hse.ru/about/submissions

Unfortunately, we could not find some 'universal' translation, which would encompass both meanings: 'the process of submission' and 'the documents submitted' (as the English 'submissions' does).

Hi all! In my perspective the submissions page, and the about submissions page are two different things that could have different translations to describe the link to each. For the navigation menus feature the navigation.submissions key is currently being used to point to the about.submissions page, mainly because the purpose of the navigation.submissions was to point to submissions page, which at a later version of the feature was assigned to the navigation.dashboard key.

Not sure if I have perplexed the issue, but, bottom line, I think that both keys should be available for the different purposes, even though the code is not currently using the navigation.submissions key to redirect to the submissions page. Further more, the use of the navigation.submissions key to point to the about -> submissions page could be misleading and perhaps should be changed to about.submissions key.

@defstat, thank you for this reply. However, we are still at a loss why the navigation.submissions is displayed instead of about.submissions.

@Ph-We sorry about the misunderstanding. I am saying that the navigation.submissions key is being used because it was already there for another Navigation Menu Item, and the translation in English of that key happened to match the about.submission key at the time. Also, because of the new key "manager.navigationMenus.submissions.description" which is used for describing this NMI, it was a choice of "consistency" with the other NM feature translated keys.

We could use about.submission though. Do you think we should change the key?

@defstat I am a main maintainer of Russian translation and I agree with @Ph-We, we should change the key to be consistent in the translations. In English locale these two keys (navigation.submissions and about.submissions) are identical, but in Russian (and may be in other Slavonic languages) we can't do it the same way, because navigation.submissions is about the particular items (submissions=sent manuscripts), but about.submissions is about the process of sending these items (submissions=how to submit manuscripts), so I have to translate it in different way.

One more thing: on the screenshot by @Ph-We

image

You can see about.submissions (袨褌锌褉邪胁泻邪 屑邪褌械褉懈邪谢芯胁 = how to submit manuscripts) as the heading on the page (highlighted yellow in the background) and it's right, but in the navigation menu you see navigation.submissions (袨孝袩袪袗袙袥袝袧袧蝎袝 袦袗孝袝袪袠袗袥蝎 = sent manuscripts), so users are confused by the menu.

So can you change in navigation menu navigation.submissions to about.submissions?

Yes I will open a PR for that, as a reference to this issue.

Thanks!

@defstat, have you already managed to do something with this issue?

@Ph-We Sorry for the delay, I lost track of that one.

I am changing the navigation.submissions locale to about.submissions for the Navigation Menu Items but there are the following occurrences:

about.submissions

navigation.submissions

Both places, I suppose the translation means to be "Submissions" in English. (and not the equivalent to about.submissions). If that is correct, what should we put there in order to be consistent?

@defstat, I've looked at the code but can you provide screenshots of how these particular keys look on the particular pages after rendering all the template? Just to understand the context. Maybe we even need the third key for some of these places.

Assuming there were no problems in 3.0.*, would it be relevant to take those parts of code as correct?

Indeed the about.submissions reference is correct. The https://github.com/pkp/pkp-lib/blob/master/templates/frontend/pages/submissions.tpl is called by the AboutContextHandler so that seems to be the correct translation.

The other reference, (https://github.com/pkp/pkp-lib/blob/master/templates/common/header.tpl and https://github.com/pkp/pkp-lib/blob/master/templates/dashboard/index.tpl) is at the "Dashboard" page which looks like this:

untitled

[1] Is from https://github.com/pkp/pkp-lib/blob/master/templates/common/header.tpl#L76
[2, 3] Is from https://github.com/pkp/pkp-lib/blob/master/templates/dashboard/index.tpl#L10

So should I change the Navigation Menu locale and leave the navigation.submissions for those two references?

@defstat I think you should leave navigation.submissions for [1, 2, 3]. @Ph-We, do you agree with me?

The 'Dashboard' page looks quite correct now in our instance of 3.1.1.4:

image

So if navigation.submissions is rendered as "袨褌锌褉邪胁谢械薪薪褘械 屑邪褌械褉懈邪谢褘", then it should still be there in [1,2,3]. So nothing needs to be changed in this case (?).

OK, then I only made the change for the specific Navigation Menu Item locale.
I suppose that the navigation.submissions may be "off place" right now though?

@NateWr

PRs

These look good @defstat. The tests may be related to the fatal error in master at the moment. Let me see look into that.

@NateWr, yes I think it is the fatal error, because I can't login because of that (and so the waitForElementPresent('link=Logout') is false)

@defstat Can you rebase now that the tests in master are fixed? Happy to merge once the tests pass.

@NateWr I rebased and I am getting an "The command "phpenv global 7.2" failed and exited with 1 during ." error on some jobs (see https://travis-ci.org/pkp/omp/jobs/492775034)

@defstat, I think that was a Travis service hiccough -- I've restarted the job and expect it'll get farther this time.

@defstat The tests look good. There was just one OJS test that fell over again. If you see that has passed, rebase again and let me know and I'll merge. :+1:

Hi @defstat, I'm really sorry for reminding again, but may we hope your PR will be merged before 3.1.2 is released?

@NateWr
[stable 3.1.2] PRs

:+1: I've merged the stable PRs. The tests have passed for the master PRs, so just give them a quick rebase and ping me and I can merge them.

@Ph-We This will be part of 3.1.2.

@defstat , @NateWr , we are really thankful to both of you!

@defstat , @NateWr , this may sound weird, but unfortunately nothing has changed in our instance of ojs 3.1.2 (test environment).
Also tagging @ppv1979

UPD: Nothing has changed for those journals which never edited the menu. So the string only changes for the newly created ones and those which have some additional menu items.

@Ph-We The stable3-1-2 branch has the changes - just added them to the master branch as well
@NateWr

PRs

Merged. Closing. :+1:

Was this page helpful?
0 / 5 - 0 ratings