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

gettext bugfixes and smallfixes. #7629

Merged
merged 5 commits into from May 13, 2014

Conversation

Projects
None yet
3 participants
@VlasovVitaly
Copy link
Contributor

commented May 13, 2014

VlasovVitaly@6fd9b83 Fixes very hidden bug:
before
This happens only in non-English languages. This string printed when programm required empty string from gettext. Commit fix that.

VlasovVitaly@21d6b3d Fixes small translations errors.

VlasovVitaly@6b1dfb4 Show translated names in crafting menu.

@@ -787,10 +787,10 @@ recipe *game::select_crafting_recipe()
mvwprintz(w_data, i - recmin, 2, c_dkgray, ""); // Clear the line
if (i == line) {
mvwprintz(w_data, i - recmin, 2, (available[i] ? h_white : h_dkgray),
item_controller->find_template(current[i]->result)->name.c_str());
_(item_controller->find_template(current[i]->result)->name.c_str()));

This comment has been minimized.

Copy link
@BevapDin

BevapDin May 13, 2014

Contributor

That should be

item_controller->find_template(current[i]->result)->nname(1).c_str()
@VlasovVitaly

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2014

Just this one or all? Why? Please, give me more info

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented May 13, 2014

All of them. This is the proper use of the pluralization system, introduced and explained there: #7167 (comment)

In short: Don't use itype::name, use itype::nname(<count>) instead.

@VlasovVitaly

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2014

@BevapDin Please check ab02fad

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented May 13, 2014

nname already returns the translated text. My fault, it should have been:
In short: Don't use _(itype::name.c_str()), use itype::nname(<count>).c_str() instead. The translation is done with ngettext in itype::nname.

@VlasovVitaly

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2014

ok. I hope this PR is finished.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented May 13, 2014

Looks fine 👍

@KA101 KA101 self-assigned this May 13, 2014

@KA101 KA101 merged commit f307b6b into CleverRaven:master May 13, 2014

1 check passed

default This has been rescheduled for testing as the 'master' branch has been updated.

@VlasovVitaly VlasovVitaly deleted the VlasovVitaly:fix-gettext-msgs branch May 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.