Hard coded language strings !

12 years 8 months ago #172430 by chessman
Hard coded language strings ! was created by chessman
Since i'm working on CB+Groupjive to build a closed social network I discover there is a huge amount of hard coded strings in the template.

Such trouble is really annoying and a loss of time when we build a website.
It will be fair for the different translations team to get clean template with every replacement string so that the work of translation will be easier and faster.

Can we expect to get it in few weeks ? months ?

Thanks a lot for any answer.

Please Log in to join the conversation.

12 years 8 months ago #172445 by krileon
Replied by krileon on topic Re: Hard coded language strings !
No string is hardcoded, where are you seeing this? All strings are passed through CBs language string parser. Simply install the English language plugin included with GJ and translate as necessary.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 8 months ago - 12 years 8 months ago #172703 by chessman
Replied by chessman on topic Re: Hard coded language strings !
Hello Krileon.

Thanks for your answer.

When I talk about hardcoded string, I talk about such example of code :

'<span class="gjEditContentInputIcon">'
. cbgjClass::getIcon( CBTxt::Ph( 'Input [users] message subject.', array( '[users]' => $override_user_p ) ) )
. '</span>'


The parameters in the CBTxt:Ph command are about auto substitution like [users] but the rest of the string is hard coded in the template (or I make a mistake).

this lines of code are from group_message.php file in the default groupjive template.

Thanks for your highlighting on this subject and sorry if I bother you :)

Please Log in to join the conversation.

12 years 8 months ago #172752 by krileon
Replied by krileon on topic Re: Hard coded language strings !
The string is completely translateable. Example as follows.

'Input [users] message subject.' => 'Input [users] message subject.',

Simply translate as necessary. The [users] substitution is substituting in the Override as configured in backend. So if in backend you changed this to "Members" then you need to translate that new string as follows.

'Members' => 'Members',

Currently SOME overrides were missing the CBTxt parsing, but can't recall which exactly as they're fixed for GJ 2.4.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 8 months ago #172769 by chessman
Replied by chessman on topic Re: Hard coded language strings !
ok,

lets take an sample to check I understood well.

I'm french so I will use French language for translation.
taking 'Input [users] message subject.' => 'Input [users] message subject.'

I put [users] to 'utilisateurs' in French in the backend parameters.
But the fronted will show me a 'Input utilisateurs message subject.' instead of 'Entrez le suet du message aux utilisateurs'.

So I have to change the global phrase in the php file. My opinion would be to have all the phrases in the same language file so it's easier.

Regards.

Please Log in to join the conversation.

12 years 8 months ago #172802 by krileon
Replied by krileon on topic Re: Hard coded language strings !
You don't have to use [users] at all, it's just a substitution for the override as configured in GJ backend. It's your choice if you want to support overrides or just ignore it completely. The overrides can also be translated as well. For example if you left it as "Users" then you'd translate that as follows.

'Users' => 'Users1',

The the below string.

'Input [users] message subject.' => 'Input [users] message subject.',

Would display as follows once parsed.

Input Users1 message subject.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.215 seconds

Facebook Twitter LinkedIn