projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cddec72
)
Look for locale specific names
author
Tom Hughes
<tom@compton.nu>
Fri, 7 Nov 2014 15:19:30 +0000
(15:19 +0000)
committer
Tom Hughes
<tom@compton.nu>
Fri, 7 Nov 2014 15:19:30 +0000
(15:19 +0000)
app/assets/javascripts/index/query.js
patch
|
blob
|
history
diff --git
a/app/assets/javascripts/index/query.js
b/app/assets/javascripts/index/query.js
index d5b9fb2c1bcd962f4263fc395b11e30ad10ddc65..12bb49efc97a4964ed45067918eeb42a75187228 100644
(file)
--- a/
app/assets/javascripts/index/query.js
+++ b/
app/assets/javascripts/index/query.js
@@
-112,7
+112,14
@@
OSM.Query = function(map) {
}
function featureName(feature) {
- var tags = feature.tags;
+ var tags = feature.tags,
+ locales = I18n.locales.get();
+
+ for (var i = 0; i < locales.length; i++) {
+ if (tags["name:" + locales[i]]) {
+ return tags["name:" + locales[i]];
+ }
+ }
if (tags["name"]) {
return tags["name"];