Skip to content

Commit

Permalink
Coding standard updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolstack committed Aug 31, 2017
1 parent 653d167 commit 83da488
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gp-includes/template.php
Expand Up @@ -600,7 +600,7 @@ function gp_get_translation_row_classes( $translation ) {
$classes[] = $translation->translation_status ? 'status-' . $translation->translation_status : 'untranslated';
$classes[] = 'priority-' . gp_array_get( GP::$original->get_static( 'priorities' ), $translation->priority );
$classes[] = $translation->warnings ? 'has-warnings' : 'no-warnings';

if ( property_exists( $translation, 'root_translation_set_id' ) ) {
$classes[] = $translation->translation_set_id === $translation->root_translation_set_id ? 'root-translation' : '';
}
Expand Down
6 changes: 3 additions & 3 deletions gp-templates/translation-row.php
Expand Up @@ -171,13 +171,13 @@
</dl>
-->

<?php if ( property_exists( $t, 'root_translation_set_id' ) ): ?>
<?php if ( property_exists( $t, 'root_translation_set_id' ) ) : ?>
<dl>
<dt><?php _e( 'Root Translaton:', 'glotpress' ); ?></dt>
<?php if ( $t->translation_set_id === $t->root_translation_set_id ): ?>
<?php if ( $t->translation_set_id === $t->root_translation_set_id ) : ?>
<dd><?php gp_link( gp_url_project_locale( $project, $root_locale->slug, $root_translation_set->slug, array( 'filters[status]' => 'either', 'filters[original_id]' => $t->original_id, 'filters[translation_id]' => $t->id ) ), $root_translation_set->name_with_locale() );
?></dd>
<?php else: ?>
<?php else : ?>
<dd><?php _e( 'False', 'glotpress' ); ?></dd>
<?php endif; ?>
</dl>
Expand Down
6 changes: 3 additions & 3 deletions gp-templates/translations.php
Expand Up @@ -266,11 +266,11 @@
$glossary_entries = $glossary->get_entries();
$glossary_entries_terms = gp_sort_glossary_entries_terms( $glossary_entries );
}

$root_locale = null;
$root_translation_set = null;
$has_root = null;

if ( null !== $locale->variant_root ) {
$root_locale = GP_Locales::by_slug( $locale->variant_root );
$root_translation_set = GP::$translation_set->by_project_id_slug_and_locale( $project->id, $translation_set->slug, $locale->variant_root );
Expand All @@ -285,7 +285,7 @@
if ( ! $t->translation_set_id ) {
$t->translation_set_id = $translation_set->id;
}

$can_approve_translation = GP::$permission->current_user_can( 'approve', 'translation', $t->id, array( 'translation' => $t ) );
gp_tmpl_load( 'translation-row', get_defined_vars() );
?>
Expand Down

0 comments on commit 83da488

Please sign in to comment.