-
-
Notifications
You must be signed in to change notification settings - Fork 992
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
Fixed translation markup in unit::describe_builtin_effect() #932
Conversation
Replaced hard-coded word order and N_ for all strings in unit::describe_builtin_effect() with vgettext/vngettext using placeholders.
The diff is hard to read here, I found that git-cola did a better job on that. |
Split diff view is easier. |
hmm it seems like the code previousl used |
Not only previously - |
Hmm. Not really happy with the increased indentation level, though I can see why it was done... the Well, I guess I have no real objections to this. I could see a way to decrease the indentation a little, but dunno if it's worth it. (It's |
ok didn't see it at first |
I added the extra indentation level to get rid of lots of code duplication. The extra level is caused by hitpoints having a different effect than the rest. We could get rid of the extra indentation though if I did this:
I'll be happy to change it if you prefer that. |
Or you can also do |
I don't see how Gunchleoc's suggestion would reduce the indentation level, given that attack also has a different effect... unless you're proposing calculating it redundantly even if the method is attack, in which case it would reduce the indentation level. Vultraz's suggestion would definitely work. |
... for less indentation.
I implemented the early return now, which gains us 1 indentation level for the bottom part. Attack has completely separate handling, so that indentation level has to stay like it was before. I also added a comment to the diff. |
t_string(N_("XP to advance"), "wesnoth"); | ||
} | ||
} else if (apply_to == "max_attacks") { | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can gain an indentation level here if we lose the "else" - IMO that would make the code structure a bit weird though.
Well, I don't have any objections to merging this. |
Thanks for the review :) |
Replaced hard-coded word order and N_ for all strings in
unit::describe_builtin_effect() with vgettext/vngettext using
placeholders.