Make WordPress Core

Opened 8 years ago

Last modified 8 months ago

#37624 assigned enhancement

Strings should not have different translators comments?

Reported by: pavelevap's profile pavelevap Owned by: swissspidy's profile swissspidy
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Focuses: Cc:

Description

See for example here: https://translate.wordpress.org/projects/wp/dev/admin/cs/default?filters[status]=either&filters[original_id]=3731&filters[translation_id]=139896

String Install %s have 3 different comments, but there should be only one? If special context is not needed (I am not sure, especially for importer), there should be one comment translators: %s: Importer, plugin or theme name?

Or maybe any general solution for GlotPress to unite these comments and display it better for translators? Or any special tool to automatically check for these differences?

Change History (6)

#1 @ocean90
8 years ago

  • Type changed from defect (bug) to enhancement
  • Version trunk deleted

I've noticed that a while ago too, see https://wordpress.slack.com/archives/core-i18n/p1456785619000098.

Not sure how we can enhance that. @SergeyBiryukov has proposed to assign each comment to the file.

Version 0, edited 8 years ago by ocean90 (next)

#2 @SergeyBiryukov
8 years ago

It looks like this in the .pot file:

#. translators: %s: attachment title
#. translators: %s: post title
#. translators: %s: taxonomy term name
#. translators: %s: post title

We could probably check if every line starts with translators: and parse it as a list in that case, removing duplicates in the process and displaying with proper formatting in GlotPress. This would be a custom plugin for translate.w.org.

P.S. I think questions in ticket summaries are perfectly fine :) Slack or not, they help brainstorming.

#3 @pavelevap
8 years ago

Ahh, I see, it was discussed before, but I searched only Trac and not Slack.

Is there any script to check all strings from .pot file which have more different translators comment?

There are two reasons for this ticket:

1) GlotPress UI - Yes, it would be fine to display better formatted translators comments.

2) In some cases different comments can be used as reminders of some context related problems, so we should check them regurarly and merge what is possible (sometimes only typo), I guess. For example linked string from summary is probably missing context. It can be Install Tumblr Importer (for plugin name), but also only Install Tumblr (for importer name). For importer would be maybe helpful some other string Install %s Importer?

#4 @swissspidy
8 years ago

For importer would be maybe helpful some other string Install %s Importer?

What about adding context to these Install %s strings?

#5 @swissspidy
2 years ago

FWIW, the wp i18n command detects strings with multiple different translator comments. It's possible to use that as part of the CI pipeline to flag these.

#6 @swissspidy
8 months ago

  • Milestone set to Future Release
  • Owner set to swissspidy
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.