diff --git a/locale/translators/index.php b/locale/translators/index.php index ba69d736c9..dc50980094 100644 --- a/locale/translators/index.php +++ b/locale/translators/index.php @@ -279,7 +279,6 @@ function main_form() echo date("F d Y H:i:s", $po_file->last_modified); echo ""; echo ""; - // TRANSLATORS: This shows the number of strings translated with a percentage $total_strings = $po_file->messages_count; $translated_strings = $po_file->messages_translated_count; if ($total_strings) { @@ -288,6 +287,7 @@ function main_form() $percent_translated = 0; } echo sprintf( + // TRANSLATORS: This shows the number of strings translated with a percentage _('%1$s of %2$s translated (%3$d%%)'), $translated_strings, $total_strings, @@ -326,7 +326,6 @@ function main_form() . " | " . _("Download") . " "; echo " (" . _("Last modified") . ": " - // TRANSLATORS: This is a date-formatted string . date("F d Y H:i:s", $pot_file->last_modified) . ")"; $total_strings = $pot_file->messages_count; $translated_strings = $pot_file->messages_translated_count; @@ -380,7 +379,6 @@ function manage_form($locale) echo "" . _("View") . " | " . _("Download") . " (" . _("Last modified") . ": " - // TRANSLATORS: this is a date-formatted string . date("F d Y H:i:s", $po_file->last_modified) . ")"; echo " - "; diff --git a/pastnews.php b/pastnews.php index 24661772b7..87d797783b 100644 --- a/pastnews.php +++ b/pastnews.php @@ -26,9 +26,9 @@ $limit_clause = ""; } else { $limit_clause = "LIMIT $num"; - echo "" + echo "" . // TRANSLATORS: %s is the news subject. - . sprintf(_("Show All %s News"), $news_subject) . ""; + sprintf(_("Show All %s News"), $news_subject) . ""; } $sql = sprintf( diff --git a/pinc/LPage.inc b/pinc/LPage.inc index 1432cf1b4e..995a2d50b3 100644 --- a/pinc/LPage.inc +++ b/pinc/LPage.inc @@ -434,8 +434,8 @@ class LPage // Advise PM that the page has been marked bad. configure_gettext_for_user($this->project->username); $body_blurb_messages[] = sprintf(_('Page %1$s of this project has been marked bad due to %2$s.'), $this->imagefile, $PAGE_BADNESS_REASONS[$reason]); - // TRANSLATORS: %s is a url $body_blurb_messages[] = sprintf( + // TRANSLATORS: %s is a url _("Please visit %s to make any needed changes and make the page available for proofreading again."), "$code_url/tools/project_manager/handle_bad_page.php?projectid={$this->projectid}&image={$this->imagefile}" ); diff --git a/pinc/ProjectSearchResults.inc b/pinc/ProjectSearchResults.inc index 903abf6767..6cabb11013 100644 --- a/pinc/ProjectSearchResults.inc +++ b/pinc/ProjectSearchResults.inc @@ -405,17 +405,42 @@ class ColumnData new GenreColumn("genre", _("Genre"), '', 'left-align', true, true, 'trans_genre'), new LinkColumn("project_manager", pgettext("project manager", "PM"), _('Project Manager'), 'left-align', true, true, 'username'), new LinkColumn("checkedoutby", _('Checked Out By'), '', 'left-align', false, true, 'checkedoutby'), - // TRANSLATORS: Abbreviation for Post Processor - new LinkColumn("pp_er", _('PP'), _('Post-processor'), 'left-align', false, true, 'postproofer'), - // TRANSLATORS: Abbreviation for Post-processing Verifier - new LinkColumn("ppv_er", _('PPV'), _('Post-processing Verifier'), 'left-align', false, true, 'ppverifier'), + new LinkColumn( + "pp_er", + // TRANSLATORS: Abbreviation for Post Processor + _('PP'), + _('Post-processor'), + 'left-align', + false, + true, + 'postproofer' + ), + new LinkColumn( + "ppv_er", + // TRANSLATORS: Abbreviation for Post-processing Verifier + _('PPV'), + _('Post-processing Verifier'), + 'left-align', + false, + true, + 'ppverifier' + ), new TimeColumn("last_proof", _('Last proofed'), '', 'right-align', true, true, 't_last_page_done', $time_format), new PGColumn("postednum", _('PG etext number'), '', 'right-align', false, true, 'postednum'), new Column('p_avail', _('Available pages'), '', 'right-align', false, true, 'n_available_pages'), new Column('p_total', _('Total pages'), '', 'right-align', false, false, 'n_pages'), new StateChangeColumn("days_avail", _('Last State Change'), '', 'right-align', true, true, 'modifieddate', $time_format), new StateColumn('state', pgettext('project state', 'State'), '', 'left-align', true, true, 'state'), - new HoldColumn('hold', _('Hold'), _('On hold'), 'center-align', false, false, 'hold'), + new HoldColumn( + 'hold', + _('Hold'), + // TRANSLATORS: string indicates that the project is "on hold" + _('On hold'), + 'center-align', + false, + false, + 'hold' + ), ]; if (user_can_work_in_stage($pguser, 'PP') || user_is_PM()) { $this->columns[] = new OptionsColumn('options', _('Actions'), '', 'left-align nowrap', true, false, ''); diff --git a/pinc/list_projects.inc b/pinc/list_projects.inc index 3c621ea827..0da88d894e 100644 --- a/pinc/list_projects.inc +++ b/pinc/list_projects.inc @@ -78,8 +78,8 @@ function list_projects($where_condition, $order_clause, $group_clause, $url_base $last = $offset + $numrows; // Display where we are now - // TRANSLATORS: This string is of the form: Projects to of echo "

"; + // TRANSLATORS: This string is of the form: Projects to of echo sprintf(_('Projects %1$d to %2$d of %3$d'), $first, $last, $num_found_rows); echo "

\n"; diff --git a/pinc/showavailablebooks.inc b/pinc/showavailablebooks.inc index 386d5013b1..ec4c12f39a 100644 --- a/pinc/showavailablebooks.inc +++ b/pinc/showavailablebooks.inc @@ -125,8 +125,8 @@ function show_projects_for_smooth_reading() [RSS] "; - // TRANSLATORS: %s are image links to the XML and RSS feeds echo "

"; + // TRANSLATORS: %s are image links to the XML and RSS feeds echo sprintf(_("Feeds of projects currently available for Smooth Reading: %s"), $xml_rss_images); echo "

"; diff --git a/tools/authors/authors.inc b/tools/authors/authors.inc index bab66f0316..532d8edb60 100644 --- a/tools/authors/authors.inc +++ b/tools/authors/authors.inc @@ -117,10 +117,10 @@ function format_ymd($y, $m, $d) $year = $y; } elseif ($y > 0) { // TRANSLATORS: Abbreviation for 'anno Domini' (years > 0) - $year = $y . ' ' . _('A. D.'); + $year = sprintf("%d %s", $y, _('A. D.')); } elseif ($y < 0) { // TRANSLATORS: Abbreviation for 'before Christ' (years < 0) - $year = -$y . ' ' . _('B. C.'); + $year = sprintf("%d %s", -$y, _('B. C.')); } else { // Year unknown = Everything unknown return null; diff --git a/tools/changestate.php b/tools/changestate.php index 4cc5f3003b..5e23ad2cda 100644 --- a/tools/changestate.php +++ b/tools/changestate.php @@ -78,8 +78,8 @@ function fatal_error($msg) " - // TRANSLATORS: %1$s is a button labeled "confirm transition change". . sprintf( + // TRANSLATORS: %1$s is a button labeled "confirm transition change". _("If so, %1\$s, otherwise go back to where you were"), "", $return_uri diff --git a/tools/project_manager/handle_bad_page.php b/tools/project_manager/handle_bad_page.php index 3aab5e7213..3d411e83fa 100644 --- a/tools/project_manager/handle_bad_page.php +++ b/tools/project_manager/handle_bad_page.php @@ -267,7 +267,7 @@ function show_text_update_form($projectid, $image, $prev_text, $text_column, $mo echo sprintf(_("The text area below contains the text from the previous round (%1\$s) for %2\$s."), $round_id, $image) . "
"; echo _("You may use it as-is, or insert other replacement text for this page:") . "
"; } else { - // TRANSLATORS: %1$s is the round ID; %2$ss is the image name. + // TRANSLATORS: %1$s is the round ID; %2$s is the image name. echo sprintf(_("The text area below contains the text from round %1\$s for %2\$s."), $round_id, $image) . "
"; } diff --git a/tools/project_manager/show_good_word_suggestions_detail.php b/tools/project_manager/show_good_word_suggestions_detail.php index 26c14e5c0b..9c331f79d2 100644 --- a/tools/project_manager/show_good_word_suggestions_detail.php +++ b/tools/project_manager/show_good_word_suggestions_detail.php @@ -68,8 +68,8 @@ $project_name = get_project_name($projectid); echo "

", -// TRANSLATORS: %1$s is a word and %2$s is a project name. sprintf( + // TRANSLATORS: %1$s is a word and %2$s is a project name. _("Suggestion context for '%1\$s' in %2\$s"), $word, $project_name @@ -103,9 +103,7 @@ foreach ($context_strings as $lineNum => $context_string) { $context_string = _highlight_word(html_safe($context_string, ENT_NOQUOTES), $word); echo "" . _("Line") . ": ", - // TRANSLATORS: %1$d is the approximate line number, and - // %2$d is the total number of lines when displaying the - // context of a word. + // TRANSLATORS: %1$d is the approximate line number, %2$d is the total number of lines sprintf(_('~%1$d of %2$d'), $lineNum, $totalLines), "   |   "; echo "" . _("Context") . ":
$context_string
"; diff --git a/tools/project_manager/show_word_context.php b/tools/project_manager/show_word_context.php index 2893b820c5..f53077a642 100644 --- a/tools/project_manager/show_word_context.php +++ b/tools/project_manager/show_word_context.php @@ -51,8 +51,14 @@ echo "
"; $project_name = get_project_name($projectid); -// TRANSLATORS: %1$s is a word, %2$s is the project name. -echo "

", sprintf(_("Context for '%1\$s' in %2\$s"), $word, $project_name), "

"; +echo "

"; +echo sprintf( + // TRANSLATORS: %1$s is a word and %2$s is a project name. + _("Context for '%1\$s' in %2\$s"), + $word, + $project_name +); +echo "

"; echo "

"; echo ""; diff --git a/tools/proofers/for_mentors.php b/tools/proofers/for_mentors.php index f3355ea4ca..07e40f2c7f 100644 --- a/tools/proofers/for_mentors.php +++ b/tools/proofers/for_mentors.php @@ -130,7 +130,7 @@ echo output_project_label($proj_obj->nameofwork, $proj_obj->authorsname, $proj_obj->t_left_mentee_round); if (in_array($mentoring_round->project_waiting_state, $project->get_hold_states())) { // TRANSLATORS: string indicates that the project is "on hold" - echo " [" . _("On hold") . "]"; + echo sprintf(" [%s]", _("On hold")); } echo ""; } diff --git a/tools/proofers/greek2ascii.php b/tools/proofers/greek2ascii.php index 39de6fa3bb..ee457e245f 100644 --- a/tools/proofers/greek2ascii.php +++ b/tools/proofers/greek2ascii.php @@ -80,11 +80,13 @@ function addChar(myChar) { " . _("The Greek glyphs above are clickable.") . "

"; -// TRANSLATORS: %s is an image of a rough-breathing mark. +echo "

"; echo sprintf( - "

" . _("Diacritical marks may be ignored except for the rough-breathing mark, (%s) above the letter. For these, put 'h' before the letter unless the word begins with 'r'. For those, put 'h' after the 'r'."), + // TRANSLATORS: %s is an image of a rough-breathing mark. + _("Diacritical marks may be ignored except for the rough-breathing mark, (%s) above the letter. For these, put 'h' before the letter unless the word begins with 'r'. For those, put 'h' after the 'r'."), "" -) . "

"; +); +echo "

"; ?> diff --git a/tools/proofers/review_work.php b/tools/proofers/review_work.php index 305807b9a4..eabff8a68a 100644 --- a/tools/proofers/review_work.php +++ b/tools/proofers/review_work.php @@ -229,13 +229,13 @@ function _echo_round_select($rounds, $selected_round) } else { echo "" . _("Last saved by user in project") . ""; } -// TRANSLATORS: %s is the round ID. +// TRANSLATORS: %s is the round ID echo "" . sprintf(_("Pages saved by user in %s"), $work_round->id) . ""; -// TRANSLATORS: %s is the round ID. +// TRANSLATORS: %s is the round ID echo "" . sprintf(_("Pages saved by others in %s"), $review_round->id) . ""; echo "" . _("Pages with differences") . ""; if ($sampleLimit > 0) { - // TRANSLATORS: %s is a number of diffs. + // TRANSLATORS: %s is a number of diffs echo "" . sprintf(_("%s most recent diffs"), $sampleLimit) . ""; } echo ""; diff --git a/tools/proofers/round.php b/tools/proofers/round.php index 53a6036ee4..f570a99ab6 100644 --- a/tools/proofers/round.php +++ b/tools/proofers/round.php @@ -102,8 +102,8 @@ echo "".$rule->subject."
"; echo "

".$rule->rule."

"; - // TRANSLATORS: %1$s is the linked name of a random Guideline section. printf( + // TRANSLATORS: %1$s is the linked name of a random Guideline section. _("See the %1\$s section of the Guidelines"), "".$rule->subject."", $round_doc_url