Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode not accepted in menu alias translation #142

Open
kochinc opened this issue May 3, 2013 · 3 comments
Open

Unicode not accepted in menu alias translation #142

kochinc opened this issue May 3, 2013 · 3 comments

Comments

@kochinc
Copy link
Contributor

kochinc commented May 3, 2013

I turned on Unicode Aliases in the Global Configuration. Tried it out in the Menu Manger and had no problem entering Unicode text into the Alias field.

When I used Joom!Fish to do the translation of a menu item and put a Unicode string into the Translation field in the Label: Menu Alias section, after saving it I got a transliterate string back. For example, "樣品網站" becomes "2013-05-03-16-30-35".

@kochinc
Copy link
Contributor Author

kochinc commented May 6, 2013

Similar problem was experienced when translating Alias field for a Content. However, the Unicode Alias was not transliterated but simply ignored.

@kochinc
Copy link
Contributor Author

kochinc commented May 6, 2013

It appears both contentelement XML files, menu.xml and content.xml, specify filterTitle as the posthandler for the alias field. That causes filterTitle() in translationobject/menu.php and translationobject/content.php to be called when saving the translation for menu and content, respectively.

Now, filterTitle() calls JFilterOutput::stringURLSafe() to clean up the string. Unfortunately JFilterOutput::stringURLSafe() doesn't respect the Unicode Aliases setting in the Global Configuration.

Modifying filterTitle() so that it calls JApplication::stringURLSafe() instead seems to fix the problem.

@kochinc kochinc closed this as completed May 6, 2013
@kochinc kochinc reopened this May 6, 2013
@kochinc
Copy link
Contributor Author

kochinc commented May 6, 2013

I wonder whether filterName() also has to be modified.

By the way, I tried to make the modifications on GitHub and submit a pull request, but it didn't seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant