<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[12583] sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates: Add a new tab with the TM to the right sidebar</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/12583">12583</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/12583","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>amieiro</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-05-12 08:05:07 +0000 (Fri, 12 May 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Add a new tab with the TM to the right sidebar
- Add a new tab with the TM to the right sidebar.
- Remember the las tab opened.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatesjseditorjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/js/editor.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatesstylecss">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatestranslationroweditorphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/translation-row-editor.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatesjseditorjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/js/editor.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/js/editor.js 2023-05-11 06:23:35 UTC (rev 12582)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/js/editor.js 2023-05-12 08:05:07 UTC (rev 12583)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,3 +1,4 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/* global $gp */
</ins><span class="cx" style="display: block; padding: 0 10px"> ( function( $ ){
</span><span class="cx" style="display: block; padding: 0 10px"> var $html = $( 'html' );
</span><span class="cx" style="display: block; padding: 0 10px"> var $document = $( document );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -299,8 +300,53 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $gp.editor.current.find( '.' + type ).removeAttr( 'open' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Click on the last tab opened in the previous row, to show the same tab in the current row.
+ $gp.editor.current.find( '.' + states['last-tab-type-open'] ).first().click();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function changeRightTab( event ) {
+ var tab = $( this );
+ var tabType = tab.attr( 'class' ).split(' ')[0];
+ var tabId = tab.attr( 'data-tab' );
+ var divId = tabId.replace( 'tab', 'div' );
+ var originalId = tabId.replace( /[^\d-]/g, '' ).replace( /^-+/g, '' );
+ changeVisibleTab( tab );
+ changeVisibleDiv( divId, originalId );
+ updateDetailsState( 'last-tab-type-open', tabType );
+ // Avoid to execute the code from the gp-translation-helpers plugin.
+ event.stopImmediatePropagation();
+ }
+
+ /**
+ * Hides all tabs and show one of them, the last clicked.
+ *
+ * @param {Object} tab The selected tab.
+ */
+ function changeVisibleTab( tab ) {
+ var tabId = tab.attr( 'data-tab' );
+ tab.siblings().removeClass( 'current' );
+ tab.parents( '.sidebar-tabs ' ).find( '.helper' ).removeClass( 'current' );
+ tab.addClass( 'current' );
+
+ $( '#' + tabId ).addClass( 'current' );
+ }
+
+
+ /**
+ * Hides all divs and show one of them, the last clicked.
+ *
+ * @param {string} tabId The select tab id.
+ * @param {number} originalId The id of the original string to translate.
+ */
+ function changeVisibleDiv( tabId, originalId ) {
+ $( '#sidebar-div-meta-' + originalId ).hide();
+ $( '#sidebar-div-discussion-' + originalId ).hide();
+ $( '#sidebar-div-history-' + originalId ).hide();
+ $( '#sidebar-div-other-locales-' + originalId ).hide();
+ $( '#sidebar-div-translation-memory-' + originalId ).hide();
+ $( '#' + tabId ).show();
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $gp.editor.show = ( function( original ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return function() {
</span><span class="cx" style="display: block; padding: 0 10px"> original.apply( $gp.editor, arguments );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -329,7 +375,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .on( 'click', 'summary', toggleDetails )
</span><span class="cx" style="display: block; padding: 0 10px"> .on( 'click', 'button.button-menu__toggle', toggleLinkMenu )
</span><span class="cx" style="display: block; padding: 0 10px"> .on( 'click', '.translation-suggestion.with-tooltip.openai', addSuggestion )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- .on( 'click', '.translation-suggestion.with-tooltip.deepl', addSuggestion );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .on( 'click', '.translation-suggestion.with-tooltip.deepl', addSuggestion )
+ .on( 'click', '.sidebar-tabs li', changeRightTab );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> })( $gp.editor.install_hooks );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatesstylecss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css 2023-05-11 06:23:35 UTC (rev 12582)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css 2023-05-12 08:05:07 UTC (rev 12583)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3147,7 +3147,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .meta,
</span><span class="cx" style="display: block; padding: 0 10px"> .meta.discussion,
</span><span class="cx" style="display: block; padding: 0 10px"> .meta.history,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.meta.other-locales {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.meta.other-locales,
+.meta.translation-memory {
</ins><span class="cx" style="display: block; padding: 0 10px"> padding: 12px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3189,11 +3190,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> vertical-align: middle;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.meta.other-locales ul {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.meta.other-locales ul, .meta.transation-memory ul {
</ins><span class="cx" style="display: block; padding: 0 10px"> margin: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.meta.translation-memory ul.suggestions-list {
+ list-style: none;
+ margin-left: 0;
+}
+
+.meta.translation-memory div.translation-suggestion {
+ margin: 1rem 0;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .meta.other-locales .locale.unique, .meta.other-locales .other-locales .locale {
</span><span class="cx" style="display: block; padding: 0 10px"> width: 6rem;
</span><span class="cx" style="display: block; padding: 0 10px"> background: #0073aa;
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatestranslationroweditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/translation-row-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/translation-row-editor.php 2023-05-11 06:23:35 UTC (rev 12582)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/translation-row-editor.php 2023-05-12 08:05:07 UTC (rev 12583)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,14 +6,33 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $more_links = array();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $translation->translation_status ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $translation_permalink = gp_url_project_locale( $project, $locale->slug, $translation_set->slug, array( 'filters[status]' => 'either', 'filters[original_id]' => $translation->original_id, 'filters[translation_id]' => $translation->id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $translation_permalink = gp_url_project_locale(
+ $project,
+ $locale->slug,
+ $translation_set->slug,
+ array(
+ 'filters[status]' => 'either',
+ 'filters[original_id]' => $translation->original_id,
+ 'filters[translation_id]' => $translation->id,
+ )
+ );
</ins><span class="cx" style="display: block; padding: 0 10px"> $more_links['translation-permalink'] = '<a href="' . esc_url( $translation_permalink ) . '">Permalink to translation</a>';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $original_permalink = gp_url_project_locale( $project, $locale->slug, $translation_set->slug, array( 'filters[original_id]' => $translation->original_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $original_permalink = gp_url_project_locale( $project, $locale->slug, $translation_set->slug, array( 'filters[original_id]' => $translation->original_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> $more_links['original-permalink'] = '<a href="' . esc_url( $original_permalink ) . '">Permalink to original</a>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$original_history = gp_url_project_locale( $project, $locale->slug, $translation_set->slug, array( 'filters[status]' => 'either', 'filters[original_id]' => $translation->original_id, 'sort[by]' => 'translation_date_added', 'sort[how]' => 'asc' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$original_history = gp_url_project_locale(
+ $project,
+ $locale->slug,
+ $translation_set->slug,
+ array(
+ 'filters[status]' => 'either',
+ 'filters[original_id]' => $translation->original_id,
+ 'sort[by]' => 'translation_date_added',
+ 'sort[how]' => 'asc',
+ )
+);
</ins><span class="cx" style="display: block; padding: 0 10px"> $more_links['history'] = '<a href="' . esc_url( $original_history ) . '">Translation History</a>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,7 +49,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $more_links = apply_filters( 'gp_translation_row_template_more_links', $more_links, $project, $locale, $translation_set, $translation );
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr class="editor <?php echo gp_translation_row_classes( $translation ); ?>" id="editor-<?php echo esc_attr( $translation->row_id ); ?>" row="<?php echo esc_attr( $translation->row_id ); ?>">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <td colspan="<?php echo $can_approve ? 5 : 4 ?>">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <td colspan="<?php echo $can_approve ? 5 : 4; ?>">
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="editor-panel">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="editor-panel__left">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="panel-header">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,12 +98,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $singular = $translation->singular_glossary_markup ?? esc_translation( $translation->singular );
</span><span class="cx" style="display: block; padding: 0 10px"> $plural = $translation->plural_glossary_markup ?? esc_translation( $translation->plural );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $translation->plural ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $translation->plural ) :
+ ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="source-string__singular">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="original"><?php echo prepare_original( $singular ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span aria-hidden="true" class="original-raw"><?php echo esc_translation( $translation->singular ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php else: ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php else : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="source-string__singular">
</span><span class="cx" style="display: block; padding: 0 10px"> <small>Singular:</small>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="original"><?php echo prepare_original( $singular ); ?></span>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,13 +119,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="source-details">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( wporg_gp_should_display_original_context( $translation ) ): ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( wporg_gp_should_display_original_context( $translation ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <details open class="source-details__context">
</span><span class="cx" style="display: block; padding: 0 10px"> <summary>Context</summary>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="context bubble"><?php echo esc_translation( $translation->context ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> </details>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( $translation->extracted_comments ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+ if ( $translation->extracted_comments ) :
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <details open class="source-details__comment">
</span><span class="cx" style="display: block; padding: 0 10px"> <summary><?php _e( 'Comment', 'glotpress' ); ?></summary>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,14 +175,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </button>
</span><span class="cx" style="display: block; padding: 0 10px"> </li>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php foreach( range( 0, $locale->nplurals - 1 ) as $plural_index ):
- $plural_string = implode(', ', $locale->numbers_for_index( $plural_index ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+ foreach ( range( 0, $locale->nplurals - 1 ) as $plural_index ) :
+ $plural_string = implode( ', ', $locale->numbers_for_index( $plural_index ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <li>
</span><span class="cx" style="display: block; padding: 0 10px"> <button
</span><span class="cx" style="display: block; padding: 0 10px"> class="translation-form-list__tab with-tooltip<?php echo ( 0 === $plural_index ) ? ' translation-form-list__tab--active' : ''; ?>"
</span><span class="cx" style="display: block; padding: 0 10px"> data-plural-index="<?php echo $plural_index; ?>"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- aria-label="<?php printf('This plural form is used for numbers like: %s', $plural_string ); ?>"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ aria-label="<?php printf( 'This plural form is used for numbers like: %s', $plural_string ); ?>"
</ins><span class="cx" style="display: block; padding: 0 10px"> type="button">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php echo $plural_string; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </button>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -173,10 +195,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( ! $translation->plural ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php wporg_gp_translate_textarea( $translation, [ $can_edit, $can_approve_translation ] ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php wporg_gp_translate_textarea( $translation, array( $can_edit, $can_approve_translation ) ); ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php foreach( range( 0, $locale->nplurals - 1 ) as $plural_index ): ?>
- <?php wporg_gp_translate_textarea( $translation, [ $can_edit, $can_approve ], $plural_index ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php foreach ( range( 0, $locale->nplurals - 1 ) as $plural_index ) : ?>
+ <?php wporg_gp_translate_textarea( $translation, array( $can_edit, $can_approve ), $plural_index ); ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php endforeach; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -239,13 +261,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="editor-panel__right">
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- <div class="panel-header">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <h3><?php /*_e( 'Meta', 'glotpress' ); */?></h3>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <h3><?php /*_e( 'Meta', 'glotpress' ); */ ?></h3>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>-->
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="panel-content">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php ob_start(); ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div class="meta" id="sidebar-div-meta-<?php echo $translation->row_id ?>">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="meta" id="sidebar-div-meta-<?php echo $translation->row_id; ?>">
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php gp_tmpl_load( 'translation-row-editor-meta-feedback', get_defined_vars() ); ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( $translation->translation_status && ( $can_approve_translation || $can_reject_self ) ): ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( $translation->translation_status && ( $can_approve_translation || $can_reject_self ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="status-actions">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $can_approve_translation ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( 'current' !== $translation->translation_status ) : ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,7 +282,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( 'fuzzy' !== $translation->translation_status ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <button class="button fuzzy" tabindex="-1" data-nonce="<?php echo esc_attr( wp_create_nonce( 'update-translation-status-fuzzy_' . $translation->id ) ); ?>"><strong>~</strong> <?php _e( 'Fuzzy', 'glotpress' ); ?></button>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php elseif ( $can_reject_self ): ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php elseif ( $can_reject_self ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <button class="button reject" tabindex="-1" data-nonce="<?php echo esc_attr( wp_create_nonce( 'update-translation-status-rejected_' . $translation->id ) ); ?>"><strong>−</strong> <?php _e( 'Reject Suggestion', 'glotpress' ); ?></button>
</span><span class="cx" style="display: block; padding: 0 10px"> <button class="button fuzzy" tabindex="-1" data-nonce="<?php echo esc_attr( wp_create_nonce( 'update-translation-status-fuzzy_' . $translation->id ) ); ?>"><strong>~</strong> <?php _e( 'Fuzzy', 'glotpress' ); ?></button>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -274,13 +296,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </dd>
</span><span class="cx" style="display: block; padding: 0 10px"> </dl>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( $translation->translation_added && $translation->translation_added !== '0000-00-00 00:00:00' ): ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( $translation->translation_added && $translation->translation_added !== '0000-00-00 00:00:00' ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <dl>
</span><span class="cx" style="display: block; padding: 0 10px"> <dt><?php _e( 'Added:', 'glotpress' ); ?></dt>
</span><span class="cx" style="display: block; padding: 0 10px"> <dd><?php echo $translation->translation_added; ?> UTC</dd>
</span><span class="cx" style="display: block; padding: 0 10px"> </dl>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( $translation->date_modified && $translation->date_modified !== '0000-00-00 00:00:00' && $translation->date_modified !== $translation->translation_added ): ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( $translation->date_modified && $translation->date_modified !== '0000-00-00 00:00:00' && $translation->date_modified !== $translation->translation_added ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <dl>
</span><span class="cx" style="display: block; padding: 0 10px"> <dt><?php _e( 'Last modified:', 'glotpress' ); ?></dt>
</span><span class="cx" style="display: block; padding: 0 10px"> <dd><?php echo $translation->date_modified; ?> UTC</dd>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -294,15 +316,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $translation->user_last_modified && ( ! $translation->user || $translation->user->ID !== $translation->user_last_modified->ID ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <dl>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <dt><?php
- if ( 'current' === $translation->translation_status ) {
- _e( 'Approved by:', 'glotpress' );
- } elseif ( 'rejected' === $translation->translation_status ) {
- _e( 'Rejected by:', 'glotpress' );
- } else {
- _e( 'Last updated by:', 'glotpress' );
- }
- ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <dt>
+ <?php
+ if ( 'current' === $translation->translation_status ) {
+ _e( 'Approved by:', 'glotpress' );
+ } elseif ( 'rejected' === $translation->translation_status ) {
+ _e( 'Rejected by:', 'glotpress' );
+ } else {
+ _e( 'Last updated by:', 'glotpress' );
+ }
+ ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </dt>
</span><span class="cx" style="display: block; padding: 0 10px"> <dd><?php gp_link_user( $translation->user_last_modified ); ?></dd>
</span><span class="cx" style="display: block; padding: 0 10px"> </dl>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -310,8 +333,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <dl>
</span><span class="cx" style="display: block; padding: 0 10px"> <dt><?php _e( 'Priority of the original:', 'glotpress' ); ?></dt>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( $can_write ): ?>
- <dd><?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( $can_write ) : ?>
+ <dd>
+ <?php
</ins><span class="cx" style="display: block; padding: 0 10px"> echo gp_select(
</span><span class="cx" style="display: block; padding: 0 10px"> 'priority-' . $translation->original_id,
</span><span class="cx" style="display: block; padding: 0 10px"> GP::$original->get_static( 'priorities' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -322,7 +346,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-nonce' => wp_create_nonce( 'set-priority_' . $translation->original_id ),
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ?></dd>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ?>
+ </dd>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <dd><?php echo gp_array_get( GP::$original->get_static( 'priorities' ), $translation->priority, 'unknown' ); ?></dd>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -337,11 +362,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= ' <li class="tab-discussion" data-tab="sidebar-tab-discussion-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '">Discussion <span class="count"></span></li>';
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= ' <li class="tab-history" data-tab="sidebar-tab-history-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '">History <span class="count"></span></li>';
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= ' <li class="tab-other-locales" data-tab="sidebar-tab-other-locales-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '">Other locales <span class="count"></span></li>';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $sidebar_tabs .= ' <li class="tab-translation-memory" data-tab="sidebar-tab-translation-memory-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '">TM <span class="count"></span></li>';
</ins><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= '</ul>';
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= $meta_sidebar;
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= '<div class="meta discussion" id="sidebar-div-discussion-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '" style="display: none;"></div>';
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= '<div class="meta history" id="sidebar-div-history-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '" style="display: none;"></div>';
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= '<div class="meta other-locales" id="sidebar-div-other-locales-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '" style="display: none;"></div>';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $sidebar_tabs .= '<div class="meta translation-memory" id="sidebar-div-translation-memory-' . $translation->row_id . '" data-row-id="' . $translation->row_id . '" style="display: none;"></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> $sidebar_tabs .= '</nav>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
</span></span></pre>
</div>
</div>
</body>
</html>