<!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>[GlotPress][1066] trunk: Use text_direction for LTR/RTL languages with fallback for $locale->rtl.</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 { 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="https://glotpress.trac.wordpress.org/changeset/1066">1066</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://glotpress.trac.wordpress.org/changeset/1066","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>markoheijnen</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-07-15 12:11:51 +0000 (Wed, 15 Jul 2015)</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'>Use text_direction for LTR/RTL languages with fallback for $locale->rtl.
Fixes <a href="http://glotpress.trac.wordpress.org/ticket/297">#297</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkgptemplatestranslationsphp">trunk/gp-templates/translations.php</a></li>
<li><a href="#trunklocaleslocalesphp">trunk/locales/locales.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunktteststest_localephp">trunk/t/tests/test_locale.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkgptemplatestranslationsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/gp-templates/translations.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/gp-templates/translations.php 2015-07-15 04:58:15 UTC (rev 1065)
+++ trunk/gp-templates/translations.php 2015-07-15 12:11:51 UTC (rev 1066)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -151,7 +151,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <dd><input type="submit" value="<?php echo esc_attr(__('Sort')); ?>" name="sorts" /></dd>
</span><span class="cx" style="display: block; padding: 0 10px"> </dl>
</span><span class="cx" style="display: block; padding: 0 10px"> </form>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<table id="translations" class="translations clear<?php if( isset( $locale->rtl ) && $locale->rtl ) { echo ' translation-sets-rtl'; } ?>">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<table id="translations" class="translations clear<?php if ( 'rtl' == $locale->text_direction ) { echo ' translation-sets-rtl'; } ?>">
</ins><span class="cx" style="display: block; padding: 0 10px"> <thead>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $can_approve ) : ?><th class="checkbox"><input type="checkbox" /></th><?php endif; ?>
</span></span></pre></div>
<a id="trunklocaleslocalesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/locales/locales.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/locales/locales.php 2015-07-15 04:58:15 UTC (rev 1065)
+++ trunk/locales/locales.php 2015-07-15 12:11:51 UTC (rev 1066)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,19 +1,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> class GP_Locale {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var $english_name;
- var $native_name;
- var $text_direction = 'ltr';
- var $lang_code_iso_639_1 = null;
- var $lang_code_iso_639_2 = null;
- var $lang_code_iso_639_3 = null;
- var $country_code;
- var $wp_locale;
- var $slug;
- var $nplurals = 2;
- var $plural_expression = 'n != 1';
- var $google_code = null;
- var $preferred_sans_serif_font_family = null;
- var $facebook_locale = null;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public $english_name;
+ public $native_name;
+ public $text_direction = 'ltr';
+ public $lang_code_iso_639_1 = null;
+ public $lang_code_iso_639_2 = null;
+ public $lang_code_iso_639_3 = null;
+ public $country_code;
+ public $wp_locale;
+ public $slug;
+ public $nplurals = 2;
+ public $plural_expression = 'n != 1';
+ public $google_code = null;
+ public $preferred_sans_serif_font_family = null;
+ public $facebook_locale = null;
</ins><span class="cx" style="display: block; padding: 0 10px"> // TODO: days, months, decimals, quotes
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function GP_Locale( $args = array() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,6 +26,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return new GP_Locale( $state );
</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">+
+ /**
+ * __isset() magic method for rtl that has been deprecated
+ */
+ public function __isset( $name ) {
+ return ( 'rtl' === $this->text_direction );
+ }
+
+ /**
+ * __get() magic method for rtl that has been deprecated
+ */
+ public function __get( $name ) {
+ if ( 'rtl' == $name ) {
+ return ( 'rtl' === $this->text_direction );
+ }
+ }
+
+
</ins><span class="cx" style="display: block; padding: 0 10px"> public function combined_name() {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: combined name for locales: 1: name in English, 2: native name */
</span><span class="cx" style="display: block; padding: 0 10px"> return sprintf( _x( '%1$s/%2$s', 'locales' ), $this->english_name, $this->native_name );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,29 +51,37 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function numbers_for_index( $index, $how_many = 3, $test_up_to = 1000 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $numbers = array();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> for( $number = 0; $number < $test_up_to; ++$number ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->index_for_number( $number ) == $index ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $numbers[] = $number;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( count( $numbers ) >= $how_many ) break;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( count( $numbers ) >= $how_many ) {
+ break;
+ }
</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">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $numbers;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function index_for_number( $number ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !isset( $this->_index_for_number ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! isset( $this->_index_for_number ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $gettext = new Gettext_Translations;
</span><span class="cx" style="display: block; padding: 0 10px"> $expression = $gettext->parenthesize_plural_exression( $this->plural_expression );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_index_for_number = $gettext->make_plural_form_function( $this->nplurals, $expression );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> $f = $this->_index_for_number;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $f( $number );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> class GP_Locales {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var $locales = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public $locales = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function GP_Locales() {
</span><span class="cx" style="display: block; padding: 0 10px"> $aa = new GP_Locale();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,7 +145,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $ar->facebook_locale = 'ar_AR';
</span><span class="cx" style="display: block; padding: 0 10px"> $ar->nplurals = 6;
</span><span class="cx" style="display: block; padding: 0 10px"> $ar->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ar->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ar->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px"> $ar->preferred_sans_serif_font_family = 'Tahoma';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $arq = new GP_Locale();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,7 +157,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $arq->slug = 'arq';
</span><span class="cx" style="display: block; padding: 0 10px"> $arq->nplurals = 6;
</span><span class="cx" style="display: block; padding: 0 10px"> $arq->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $arq->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $arq->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $as = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $as->english_name = 'Assamese';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -186,7 +212,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $azb->country_code = 'az';
</span><span class="cx" style="display: block; padding: 0 10px"> $azb->wp_locale = 'azb';
</span><span class="cx" style="display: block; padding: 0 10px"> $azb->slug = 'azb';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $azb->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $azb->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $az_tr = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $az_tr->english_name = 'Azerbaijani (Turkey)';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,7 +222,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $az_tr->country_code = 'tr';
</span><span class="cx" style="display: block; padding: 0 10px"> $az_tr->wp_locale = 'az_TR';
</span><span class="cx" style="display: block; padding: 0 10px"> $az_tr->slug = 'az-tr';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $az_tr->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $az_tr->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ba = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $ba->english_name = 'Bashkir';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,7 +250,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $bcc->slug = 'bcc';
</span><span class="cx" style="display: block; padding: 0 10px"> $bcc->nplurals = 1;
</span><span class="cx" style="display: block; padding: 0 10px"> $bcc->plural_expression = 0;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $bcc->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $bcc->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $be = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $be->english_name = 'Belarusian';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -452,7 +478,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $dv->country_code = 'mv';
</span><span class="cx" style="display: block; padding: 0 10px"> $dv->wp_locale = 'dv';
</span><span class="cx" style="display: block; padding: 0 10px"> $dv->slug = 'dv';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $dv->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $dv->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $dzo = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $dzo->english_name = 'Dzongkha';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -663,7 +689,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fa->facebook_locale = 'fa_IR';
</span><span class="cx" style="display: block; padding: 0 10px"> $fa->nplurals = 1;
</span><span class="cx" style="display: block; padding: 0 10px"> $fa->plural_expression = '0';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $fa->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $fa->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $fa_af = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $fa_af->english_name = 'Persian (Afghanistan)';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -675,7 +701,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fa_af->google_code = 'fa';
</span><span class="cx" style="display: block; padding: 0 10px"> $fa_af->nplurals = 1;
</span><span class="cx" style="display: block; padding: 0 10px"> $fa_af->plural_expression = '0';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $fa_af->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $fa_af->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ff_sn = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $ff_sn->english_name = 'Fulah';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -845,7 +871,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $ha->lang_code_iso_639_1 = 'he';
</span><span class="cx" style="display: block; padding: 0 10px"> $ha->lang_code_iso_639_2 = 'hau';
</span><span class="cx" style="display: block; padding: 0 10px"> $ha->slug = 'ha';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ha->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ha->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px"> $ha->google_code = 'ha';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $haw = new GP_Locale();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -863,7 +889,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $haz->country_code = 'af';
</span><span class="cx" style="display: block; padding: 0 10px"> $haz->wp_locale = 'haz';
</span><span class="cx" style="display: block; padding: 0 10px"> $haz->slug = 'haz';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $haz->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $haz->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $he = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $he->english_name = 'Hebrew';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -874,7 +900,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $he->slug = 'he';
</span><span class="cx" style="display: block; padding: 0 10px"> $he->google_code = 'iw';
</span><span class="cx" style="display: block; padding: 0 10px"> $he->facebook_locale = 'he_IL';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $he->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $he->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $hi = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $hi->english_name = 'Hindi';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1455,7 +1481,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $ps->wp_locale = 'ps';
</span><span class="cx" style="display: block; padding: 0 10px"> $ps->slug = 'ps';
</span><span class="cx" style="display: block; padding: 0 10px"> $ps->facebook_locale = 'ps_AF';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ps->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ps->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $rhg = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $rhg->english_name = 'Rohingya';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1904,7 +1930,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $yi->lang_code_iso_639_2 = 'yid';
</span><span class="cx" style="display: block; padding: 0 10px"> $yi->slug = 'yi';
</span><span class="cx" style="display: block; padding: 0 10px"> $yi->google_code = 'yi';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $yi->rtl = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $yi->text_direction = 'rtl';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $yo = new GP_Locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $yo->english_name = 'Yorùbá';
</span></span></pre></div>
<a id="trunktteststest_localephp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/t/tests/test_locale.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/t/tests/test_locale.php (rev 0)
+++ trunk/t/tests/test_locale.php 2015-07-15 12:11:51 UTC (rev 1066)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,15 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+class GP_Test_Locale extends GP_UnitTestCase {
+
+ // Test if old property can be read when someone tries to read it.
+ function test_rtl_old() {
+ $locale = $this->factory->locale->create();
+ $locale->text_direction = 'rtl';
+
+ $this->assertTrue( isset( $locale->rtl ) );
+ $this->assertTrue( $locale->rtl );
+ }
+
+
+}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>