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

Neglecting genders of industry names #1104

Closed
DorpsGek opened this issue Aug 5, 2007 · 8 comments
Closed

Neglecting genders of industry names #1104

DorpsGek opened this issue Aug 5, 2007 · 8 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Aug 5, 2007

Meush opened the ticket and wrote:

Hello, I found the bug some time ago (a year?) and reported it on IRC, but its case was dropped because it is very rare - it concerns creating new industries, which doesn't happen frequently in-game.

Now, when prospecting an industry is possible, I'd like to remind you, developers about a bug in a code, which, I think, exists.

The problem is that gender of industry is not taken under account when preparing string STR_482D_NEW_UNDER_CONSTRUCTION or STR_482E_NEW_BEING_PLANTED_NEAR.
Here is how do the strings look like:

{BLACK}{BIGFONT}New {STRING} under construction near {TOWN}!
{BLACK}{BIGFONT}Rozpoczęto budowę nowe{G go j go} {STRING.d} blisko {TOWN}!
and
{BLACK}{BIGFONT}New {STRING} being planted near {TOWN}!
{BLACK}{BIGFONT}Now{G y a e} {STRING} został{G "" a o} posadzon{G y a e} blisko {TOWN}!

Industry name gets changed to a proper case (.d), however, the gender is always set to male - first.
So there is always nowego/nowy/posadzony instead of nowej/nowa/posadzona or nowego/nowe/nowe

Here are strings that contain industry names:

STR_00FA_COAL_MINE
{BLACK}{TINYFONT}{G=f}Kopalnia węgla
STR_0240_COAL_MINE
{BLACK}{G=f}Kopalnia Węgla
STR_4802_COAL_MINE
{G=f}Kopalnia Węgla

As you see, all strings contain proper gender setting (in this case it's female - the second gender), but the output string is created with male gender.

More info about genders: http://wiki.openttd.org/index.php/Format_of_langfiles# Example_2

This bug report may be clumsy and ambiguous, so please feel free to leave comments, to which I'll reply

Reported version: 0.5.2
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1104
@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Rubidium wrote:

Looking at the strings it gives me the following "feeling"; I've not tested it nor looked at the code:
Looks like it always looks at the gender of the string in front of it and because there isn't a string in front of it, the gender is the first one (i.e. male). Though that does not give a reason why the posadzon* one fails, though getting the gender once might reset it too.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1790

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Meush wrote:

I always had impression that industry related strings are awkward, beginning from industry name (like "{TOWN} {INDUSTRY}") in industry window and subsidies. But that's different topic.
Rubidium, would you like me to rearrange curly brackets to trace the problem? How to rearrange them?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1791

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Rubidium wrote:

It's caused by the cases; the cases push the gender information further into the string and places a "string with cases" marker at the beginning of the string, where the gender determination algorithm expects the gender information to be.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1796

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Meush wrote:

That's great you found it, may we expect a fix soon? :)

Just for clearness, my strings have gender information also in cases:
STR_00FA_COAL_MINE.d
{BLACK}{TINYFONT}{G=f}Kopalni węgla


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1797

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Rubidium wrote:

Ok, I think I've solved it. It was a combination of my first hunch and the cases issue. Genders are always retrieve of the next string unless you override that by defining the string (index) to override. As you can see in the next line, I've added the two 0s, so they take the gender of {STRING} instead of town.
For the sake of this test I've given forest (Las) a sexchange, so it is female in this example.

STR_482E_NEW_BEING_PLANTED_NEAR :{BLACK}{BIGFONT}Now{G y a e} {STRING} został{G 0 "" a o} posadzon{G 0 y a e} blisko {TOWN}!
now gives me "Nowa Las została posadzona blisko {TOWN}!". Is that correct (Las is female in this case).


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1798

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Meush wrote:

Yes, that's right :)
I will edit these strings soon.

Is change in code required, or editing strings alone will do the job?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1799

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Rubidium wrote:

Code changes are also required, but they'll most likely get to trunk before your changed strings do.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104#comment1800

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2007

Rubidium closed the ticket.

Reason for closing: Fixed

In r10792. At least the code changes, the langfile changes (adding two 0s) are still to be done via WT2.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1104

@DorpsGek DorpsGek closed this as completed Aug 5, 2007
@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant