mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Modify railways arabic/persian names
This commit is contained in:
@@ -349,7 +349,7 @@ export default {
|
||||
putChangeset: function(changes, version, comment, imageryUsed, callback) {
|
||||
if(changes.modified && changes.modified.length > 0){
|
||||
for(var i = 0, l = changes.modified.length; i < l; i++){
|
||||
if(changes.modified[i].tags.highway && changes.modified[i].tags.real_name){
|
||||
if((changes.modified[i].tags.highway || changes.modified[i].tags.railway) && changes.modified[i].tags.real_name){
|
||||
changes.modified[i].tags.name = changes.modified[i].tags.real_name;
|
||||
delete changes.modified[i].tags.real_name;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ export default {
|
||||
}
|
||||
if(changes.created && changes.created.length > 0){
|
||||
for(var i = 0, l = changes.created.length; i < l; i++){
|
||||
if(changes.created[i].tags.highway && changes.created[i].tags.real_name){
|
||||
if((changes.modified[i].tags.highway || changes.modified[i].tags.railway) && changes.created[i].tags.real_name){
|
||||
changes.created[i].tags.name = changes.created[i].tags.real_name;
|
||||
delete changes.created[i].tags.real_name;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ export default {
|
||||
}
|
||||
if(changes.deleted && changes.deleted.length > 0){
|
||||
for(var i = 0, l = changes.deleted.length; i < l; i++){
|
||||
if(changes.deleted[i].tags.highway && changes.deleted[i].tags.real_name){
|
||||
if((changes.modified[i].tags.highway || changes.modified[i].tags.railway) && changes.deleted[i].tags.real_name){
|
||||
changes.deleted[i].tags.name = changes.deleted[i].tags.real_name;
|
||||
delete changes.deleted[i].tags.real_name;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export function utilDisplayName(entity) {
|
||||
|
||||
var isFirefox = utilDetect().browser.toLowerCase().indexOf('firefox') > -1
|
||||
var arabicRegex = /[\u0600-\u06FF]/g
|
||||
if(!isFirefox && name && entity.tags.highway && arabicRegex.test(name)){
|
||||
if(!isFirefox && name && (entity.tags.highway || entity.tags.railway) && arabicRegex.test(name)){
|
||||
name = fixArabicScriptTextForSvg(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user