Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2009 at 16:42 UTC
Updated:
13 Feb 2010 at 00:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunThat's why there is an "edit" link to alter the auto-generated machine-readable name.
And. For multilingual sites, the best practice is to use English labels/titles anyway, so you can properly localize/translate them -- which means that the machine-readable name can be properly generated via the existing JS.
Comment #2
snufkin commentedYou assume that a site is used as multilingual by default and I don't think this is true.
With the current setup any non-latin language (russian, chinese, arabic etc) will be forced to correct the machine suggestion (which will be a single underscore). This is a faulty behaviour, and so it should be removed entirely until proper transliteration can be brought into core.
Comment #3
xslim commentedHi!
I posted the same issue - #646466: Machine name generating not correctly for languages other than English
maybe we can make a check in JS file - if transliteration module is present - make AJAX call to it?
Comment #4
damien tournoud commented@xslim: that's an excellent idea.
Comment #5
sunerrrr. We're talking JavaScript here. Transliteration module can replace the entire behavior or even the entire .js file.
Comment #6
xslim commentedso we need to make a patch to transliteration ?
Comment #7
sunYes.
Comment #8
damien tournoud commentedErm. No! It's not because it's javascript that we should promote sloppy programming practices. We need to abstract the crappy regexp that is currently in *two places* of
Drupal.behaviors.machineReadableValueto a separate function that Transliteration will be able to replace.And yes, we need to do it before releasing D7.
Comment #9
damien tournoud commentedComment #10
xslim commentedWe can add additional function like transliterate() which can be overridden by transliteration module?
Comment #11
damien tournoud commentedHere.
Comment #12
mfer commentedI like this idea but should the translate function live at Drupal.behaviors.machineReadableValue.attach.transliterate? Or, is another location more appropriate?
Comment #13
sun1) Custom methods should have JSDoc to explain them.
2) Missing space after function.
Powered by Dreditor.
Comment #14
damien tournoud commentedFixed the issues raised by sun.
Comment #15
damien tournoud commented@mfer: the function is at
Drupal.behaviors.machineReadableValue.transliterate(), which makes sense to me.Comment #16
sunThanks!
Comment #17
webchickSeems like a reasonable improvement. It does not cause Drupal to cease to function, and therefore is not critical.
Committed to HEAD.