Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#5767 closed enhancement (fixed)

Translation

Reported by: sgr33n's profile SGr33n Owned by: djpaul's profile djpaul
Milestone: 2.2 Priority: lowest
Severity: normal Version:
Component: I18N Keywords: has-patch
Cc:

Description

Hi!

I'm translating in italian and found two spaces in this:
"Activation email resent! Please check your inbox or spam folder."

Then, I cannot understand this:

"<strong>Link</strong> - Activity generated by posts and comments, forum topics and replies, and some plugins, uses the link field for a permalink back to the content item. Some types of activity may not use this field, even if it has been set."

Then in cases like this (singular)
"Viewing post %1$s to %2$s (%3$s post)"

Could be better say:
"Viewing 1 post" ?

Attachments (2)

5767.patch (10.8 KB) - added by danbp 10 years ago.
5767.02.patch (9.6 KB) - added by DJPaul 10 years ago.

Download all attachments as: .zip

Change History (22)

#1 @SGr33n
10 years ago

  • Component changed from Core to i18n
  • Priority changed from normal to lowest

#2 @SGr33n
10 years ago

Also:
"You have %d new private messages" doesn't have a singular form.

#3 @DJPaul
10 years ago

  • Milestone changed from Awaiting Review to 2.1
  • Type changed from task to enhancement

#4 follow-up: @DJPaul
10 years ago

Then in cases like this (singular)
"Viewing post %1$s to %2$s (%3$s post)"
Could be better say:
"Viewing 1 post" ?

I agree. If you can give us a list of all of these since I guess you can see them pretty quickly in GlotPress, we're happy to change them.

#5 @djpaul
10 years ago

In 8654:

i18n improvements

Simplified a sentence, removed a double space.

See #5767, props SGr33n

#6 @djpaul
10 years ago

In 8655:

i18n improvements in Message notifications

Add singular form of “you have x new private messages”, and use
bp_core_number_format to format the number correctly for the locale.

See #5767, props SGr33n

#7 in reply to: ↑ 4 @SGr33n
10 years ago

Replying to DJPaul:

I agree. If you can give us a list of all of these since I guess you can see them pretty quickly in GlotPress, we're happy to change them.

Sure! Here they are:

Viewing requests %1$s to %2$s (of %3$s request) bp-groups/bp-groups-template.php:3236
Viewing invitation %1$s to %2$s (of %3$s invitation) bp-groups/bp-groups-template.php:3531
Viewing member %1$s to %2$s (of %3$s member) bp-groups/bp-groups-template.php:2363 bp-members/bp-members-template.php:353
Viewing message %1$s to %2$s (of %3$s message) bp-messages/bp-messages-template.php:456
Viewing %1$s to %2$s (of %3$s notification) bp-notifications/bp-notifications-template.php:895
Viewing group %1$s to %2$s (of %3$s group) bp-groups/bp-groups-template.php:976
Viewing member %1$s to %2$s (of %3$s active member) bp-members/bp-members-template.php:347
Viewing member %1$s to %2$s (of %3$s member with friends) bp-members/bp-members-template.php:349
Viewing member %1$s to %2$s (of %3$s member online) bp-members/bp-members-template.php:351
Viewing topic %s to %s (of %d topic%s) bp-forums/bp-forums-template.php:1527
Viewing post %1$s to %2$s (%3$s post) bp-forums/bp-forums-template.php:2166
Viewing item %1$s to %2$s (of %3$s item) bp-activity/bp-activity-template.php:737
Viewing site %1$s to %2$s (of %3$s site) bp-blogs/bp-blogs-template.php:439
Viewing %1$s - %2$s of %3$s bp-groups/bp-groups-admin.php:942 - doesn't have a singular form

About plurals, what do you think about semplificate in this way "%1$s - %2$s of %3$s Messages"?

#8 @DJPaul
10 years ago

Thanks. I think I like the proposed simplification, too.

#9 @SGr33n
10 years ago

Well! :)

@danbp
10 years ago

#10 @DJPaul
10 years ago

danbp - thanks for the patch, but in this case, we need to use the _nx function if you think adding a context to these strings is what needs to happen. I'm pretty sure you know of the function, but just in case you don't or someone else is following along with this ticket who doesn't, see: https://codex.wordpress.org/Function_Reference/_nx

@DJPaul
10 years ago

#11 @DJPaul
10 years ago

  • Keywords has-patch 2nd-opinion added

I've just added 5767.02.patch which changes the singular and plural pagination strings as suggested by SGr33n. It doesn't add any contexts.

For the plural pagination strings, I have left the word "Viewing" in. For example, "Viewing 1 - 10 of 20 groups". Another one of SGr33n's suggestions was that we remove the word "Viewing" here, but keep "Viewing" in for the singular string. e.g. "1 - 10 of 20 groups".

From my English POV, I think we could probably remove "Viewing" here, but I would like more opinions, and also whether "Viewing" should be kept in if it would help the string be translated (or appear better in the translated language).

Last edited 10 years ago by DJPaul (previous) (diff)

#12 @danbp
10 years ago

Yes Paul i know about _nx function, sorry for this error.

IMO viewving is a secondary information near a counter. Not all sites/projects need this. Not every template has the place for that...
So adding context lets each translator add what he want, under the condition to use the variables order (%1$s - %2$s to %3$s).
If extended phrasing is needed above this simple output, it's under the responsability of the translator. (Hey folks, discover group %1$s to %2$s. And it's just the begin: we have a total of %3$s awaiting you !) Very long extreme usage. :-) But who knows ?

Why is the singular form ( viewing 1 item) more important as a plural (21 to 41 of 68) ?
If there is only one page, or member, or post, i already see it ! This doesn't even need a count.

Maybe showing the singular form as 1 post or 1 member or 1 something ( 1 + context) is more clear.
But if i go indepth with that logic, i would also remove any filter, because there is nothing to filter when the result is one.

I would use the most simple and minimalist option in the source (%1$s - %2$s of %3$s) and let each translator add his own wording accordingly to his project.

It's just an opinion.

#13 @DJPaul
10 years ago

If there is only one page, or member, or post, i already see it ! This doesn't even need a count.

It does because there's a difference in expecting to view one item (say, a single blog post) and expecting to view > 1 item (but only showing 1 because that's just how many things there are at the moment).

let each translator add his own wording accordingly to his project.

I agree with the gist of what you're saying but I think you're mixing up sites that use translations to customise the site, vs sites that use a translation just to get a translation. :)

#14 @djpaul
10 years ago

In 8780:

Groups: fix singular string translation in wp-admin members list pagination

See #5767

#15 @djpaul
10 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 8781:

Improve pagination label strings for all components

“Viewing 1 site” reads better than “Viewing site 1 to 1 (of 1 site)”,
regardless of the language you’re using.

Fixes #5767

#16 @djpaul
10 years ago

In 8782:

Legacy forums: correctly use an integer for _n calls when building the pagination labels

Previously, the number used was the (string) return value from
bp_core_number_format. That function uses number_format_i8n
internally, which can return values such as “1,000” — which would cause
_n to pick the wrong singular/plural string at runtime.

See #5767

#17 @SGr33n
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi djpaul.

Maybe there is an error on bp-groups-template.php, ine 1545

                return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1', 'Viewing %1$s - %2$s of %3$s groups', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );

Should be

                return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1 group', 'Viewing %1$s - %2$s of %3$s groups', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );

#18 @boonebgorges
10 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from 2.1 to 2.2

Yes, it looks like that was a slip of the finger in r8781.

#19 @boonebgorges
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 9036:

Pagination text for a groups loop with a single group should read "Viewing 1 group"

Fixes typo in r8781

Fixes #5767

Props SGr33n

#20 @DJPaul
8 years ago

  • Component changed from Locale - i18n to I18N
Note: See TracTickets for help on using tickets.