I18n: translate missing geometry node attribute tooltips #109384

Merged
Bastien Montagne merged 1 commits from pioverfour/blender:dp_gn_attribute_tooltips into main 2023-07-04 09:53:31 +02:00
1 changed files with 2 additions and 2 deletions

View File

@ -927,7 +927,7 @@ static void create_inspection_string_for_field_info(const bNodeSocket &socket,
for (const int i : input_tooltips.index_range()) {
const blender::StringRef tooltip = input_tooltips[i];
ss << "\u2022 " << TIP_(tooltip.data());
ss << fmt::format(TIP_("\u2022 {}"), TIP_(tooltip.data()));
if (i < input_tooltips.size() - 1) {
ss << ".\n";
pioverfour marked this conversation as resolved Outdated

Any reasons not to use fmt::format here?

ss << fmt::format(TIP_("\u2022 {}"), TIP_(tooltip.data()));
Any reasons not to use `fmt::format` here? ``` ss << fmt::format(TIP_("\u2022 {}"), TIP_(tooltip.data())); ```

No particular reason except consistency, since the other similar messages use this construction, and I didn’t want to change existing messages and make translators update them. But I could do either if you think it’s better.

No particular reason except consistency, since the other similar messages use this construction, and I didn’t want to change existing messages and make translators update them. But I could do either if you think it’s better.

Fair enough... But since this is a c++ file now, I'd rather see new code using c++ 'way of doing things'. ;)

No need to change existing ones though, this should be part of cleanup/maintenance work from the module owning this file.

Fair enough... But since this is a c++ file now, I'd rather see new code using c++ 'way of doing things'. ;) No need to change existing ones though, this should be part of cleanup/maintenance work from the module owning this file.
}
@ -1920,7 +1920,7 @@ static char *named_attribute_tooltip(bContext * /*C*/, void *argN, const char *
for (const NameWithUsage &attribute : sorted_used_attribute) {
const StringRefNull name = attribute.name;
const geo_log::NamedAttributeUsage usage = attribute.usage;
ss << " \u2022 \"" << name << "\": ";
ss << fmt::format(TIP_(" \u2022 \"{}\": "), std::string_view(name));
Vector<std::string> usages;
if ((usage & geo_log::NamedAttributeUsage::Read) != geo_log::NamedAttributeUsage::None) {
usages.append(TIP_("read"));