Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsorted translated commodity lists #5844

Closed
JeromeChignoli opened this issue Jun 20, 2024 · 3 comments · Fixed by #5846
Closed

Unsorted translated commodity lists #5844

JeromeChignoli opened this issue Jun 20, 2024 · 3 comments · Fixed by #5846

Comments

@JeromeChignoli
Copy link

Hello.
Trade computer lists unsorted commodities when not in english language.
I use french translation:
"Air processors" translates to "Processeurs d'air".
In trade computer screens, "Processeurs d'air" is the first line of the list.

Observed behaviour

translated lists are alphabetically sorted by English value.

Expected behaviour

translated lists should be alphabetically sorted by translated value.

Steps to reproduce

select other languages in options screen.

My pioneer version (and OS):
ver 20240203 on: Linux

Steps to correct

in /data/pigui/modules/system-econ-view.lua, table.sort function in lines 101, 102, 128 & 129 needs to be:
lcomm[a[1]] < lcomm[b[1]] ( in place of a[1] < b[1] ).

@impaktor
Copy link
Member

impaktor commented Jun 21, 2024

If I remember correctly, this is because we sort not on language, but on the KEY used, which we do because then categories are shows in some what logical order.

EDIT: KEY is an English lanugage string.

@JeromeChignoli
Copy link
Author

So maybe the commodity market needs to sort the same way.
It actually sorts by translated value.

@impaktor
Copy link
Member

Oh, then it's been changed in the N re-writes since last I waged war against those lines of code.

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

Successfully merging a pull request may close this issue.

3 participants