Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sampsa Sohlman
Messageboard categorization and categories translation
September 26, 2013 2:46 AM
Answer

Sampsa Sohlman

LIFERAY STAFF

Rank: Regular Member

Posts: 218

Join Date: September 27, 2007

Recent Posts

We are have translation key "category", "categories".

These are used in 2 contexts? Message boards and categories, but messageboard is using the "catogory" keys also and in Finnish with my translation it just does not fit to the context very well.

1Category               = Luokitus
2(Messageboard)Category = Aihealue


Any other languages where this might be a problem?
Corné Aussems
RE: Messageboard categorization and categories translation
September 26, 2013 5:08 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1270

Join Date: October 3, 2006

Recent Posts

Sampsa Sohlman:
We are have translation key "category", "categories".

These are used in 2 contexts? Message boards and categories, but messageboard is using the "catogory" keys also and in Finnish with my translation it just does not fit to the context very well.

1Category               = Luokitus
2(Messageboard)Category = Aihealue


Any other languages where this might be a problem?


Disambiguation can be solved as this
1
2title=Title
3title\[person\]=Title

https://www.liferay.com/community/forums/-/message_boards/message/5019846
You can ask ( or do it yourselve) to add it to the code.
Like Olaf https://issues.liferay.com/browse/LPS-34251?
Sampsa Sohlman
RE: Messageboard categorization and categories translation
September 26, 2013 5:03 AM
Answer

Sampsa Sohlman

LIFERAY STAFF

Rank: Regular Member

Posts: 218

Join Date: September 27, 2007

Recent Posts

Thanks Corné, that was helpful.

The code which does this at here.
Corné Aussems
RE: Messageboard categorization and categories translation
September 26, 2013 6:23 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1270

Join Date: October 3, 2006

Recent Posts

So we for example we have a
1
2<aui:select label="title[person]" .....


1
2###########
3title=Titel
4title\[person\]=Titel persoon
5#############


1
2'Title' = LanguageResources.getMessage(locale, *title[person]* );
3when: no result but ambiguation sign ']' found
4  'Titel' = LanguageResources.getMessage(locale, *title* );


When caught in debugger i find the immediate value on line 377
1
2key    "title[person]" (id=29615)   
3defaultValue    "title[person]" (id=29615)   
4value    "Titel Person" (id=29616)   

.
So lines 379-395 are an escape; As in if the whole key (title\[person\]) is not found try for the base key (title) else default.

So if you need one, some developer has to code the use of the ambiguation-key and also add this to the Language.properties file so it gets propagated to all other Language files.
Sampsa Sohlman
RE: Messageboard categorization and categories translation
September 26, 2013 7:03 AM
Answer

Sampsa Sohlman

LIFERAY STAFF

Rank: Regular Member

Posts: 218

Join Date: September 27, 2007

Recent Posts

Some reason search container does not apply to the rule. I'm investigating.

EDIT: I'm going to write bug report of those places that I require specific rule.
Sampsa Sohlman
RE: Messageboard categorization and categories translation
September 26, 2013 10:55 AM
Answer

Sampsa Sohlman

LIFERAY STAFF

Rank: Regular Member

Posts: 218

Join Date: September 27, 2007

Recent Posts

Bug relating to this LPS-40662
Sampsa Sohlman
RE: Messageboard categorization and categories translation
October 2, 2013 1:16 PM
Answer

Sampsa Sohlman

LIFERAY STAFF

Rank: Regular Member

Posts: 218

Join Date: September 27, 2007

Recent Posts

Now some issues has been fixed.

You are able to see https://github.com/liferay/liferay-portal/commit/6386b043435dba02d0ac6d6d52ab253007989d88.

That there word category for message board and categories ;)