Skip to content

Commit

Permalink
[rtl] fix bug 67392
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkadushkin committed May 13, 2024
1 parent cd0b376 commit 3ee272e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/common/main/lib/controller/ReviewChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ define([

var lang = (this.appConfig ? this.appConfig.lang || 'en' : 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
return date.toLocaleString(lang, {dateStyle: 'short', timeStyle: 'short'});
} catch (e) {
lang = 'en';
Expand Down
4 changes: 4 additions & 0 deletions apps/documenteditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down Expand Up @@ -1677,6 +1678,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblModifyDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down Expand Up @@ -1727,6 +1729,7 @@ define([
value = new Date(value);
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand All @@ -1741,6 +1744,7 @@ define([
value = new Date(value);
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblModifyDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down
4 changes: 4 additions & 0 deletions apps/pdfeditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down Expand Up @@ -1397,6 +1398,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblModifyDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down Expand Up @@ -1447,6 +1449,7 @@ define([
value = new Date(value);
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand All @@ -1461,6 +1464,7 @@ define([
value = new Date(value);
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblModifyDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down
2 changes: 2 additions & 0 deletions apps/presentationeditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down Expand Up @@ -1356,6 +1357,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblModifyDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down
2 changes: 2 additions & 0 deletions apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down Expand Up @@ -1731,6 +1732,7 @@ define([
if (value) {
var lang = (this.mode.lang || 'en').replace('_', '-').toLowerCase();
try {
if ( lang == 'ar-SA'.toLowerCase() ) lang = lang + '-u-nu-latn-ca-gregory';
this.lblModifyDate.text(value.toLocaleString(lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(lang, {timeStyle: 'short'}));
} catch (e) {
lang = 'en';
Expand Down

0 comments on commit 3ee272e

Please sign in to comment.