Allow to set phrase initial translation from template

4 views
Skip to first unread message

Alexander Obuhovich

unread,
May 28, 2010, 10:35:02 AM5/28/10
to In-Portal Development
I propose we add ability to set phrase initial translation from inside template. For example, when you already know phrase translation, when you are placing it into template.

This could be done like this: <inp2:m_Phrase name="la_fld_TestField" default="Test Field"/>

This should speed up development stage of project, since user should not re-visit template to click on each phrase to translate it.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry Andrejev

unread,
May 28, 2010, 10:59:52 AM5/28/10
to in-por...@googlegroups.com
Yes, I think it's going to be useful too.

Let file the task for it if no one against this.


DA.

Phil -- wbtc.fr --

unread,
May 28, 2010, 5:09:29 PM5/28/10
to in-por...@googlegroups.com
yes, good idea. The default text will need to be clickable when we want to translate it, maybe you allredy thought about that :)

2010/5/28 Alexander Obuhovich <aik....@gmail.com>

Dmitry Andrejev

unread,
May 28, 2010, 5:47:06 PM5/28/10
to in-por...@googlegroups.com
Hi Phil,


It's a bit different. Default translation will be automatically added to the database (for corresponding label) ONLY if there is NO translation exists at the moment, after that translation process will work as before.


DA.

Phil -- wbtc.fr --

unread,
May 28, 2010, 5:55:42 PM5/28/10
to in-por...@googlegroups.com
Hi Dmitry,

if this is something which is added to DB, it means it'll be added when theme is activated? What if we setup another language as primary? Does missing labels will add themselves into the new primary lang? I'd thought inportal would display the default field if there's no label in DB, not to replace it, this is an agressive method for lang pack, as most of the time coders are not the end marketer, this would not speed the process, having to replace a label instead of creating it.

Phil.

2010/5/28 Dmitry Andrejev <dand...@gmail.com>

Dmitry Andrejev

unread,
May 28, 2010, 6:45:12 PM5/28/10
to in-por...@googlegroups.com
Again it will NOT replace anything. It will INSERT a new translation from "default" parameter on the first time you are loading your page if there is NO current translation for the label.

It will do this for the Primary language. Please note that in In-Portal 5.1.0 we have changed the Translation system so it shows you the Translation from Primary Language if non-primary is missing one.

There is a simple rule which we always follow:

"Always put language Phrases (using tags) and NEVER put plain text". The purpose of the feature is to allow Developer to add a basic translation (most likely NOT final version) so it will be auto-inserted into the system. Later Webmaster or whatever can adjust things through the translation system. The advantage is that Developer does need to go through the 2 step process - add a tag with Phrase, then come back and add translation. Now it will be 1 step process.


Hope it explains.


Thanks.

Alexander Obuhovich

unread,
May 29, 2010, 3:03:48 AM5/29/10
to in-por...@googlegroups.com

We don't show primary translation, when it's missing on current language in 5.1.0.

On May 29, 2010 1:45 AM, "Dmitry Andrejev" <dand...@gmail.com> wrote:

Again it will NOT replace anything. It will INSERT a new translation from "default" parameter on the first time you are loading your page if there is NO current translation for the label.

It will do this for the Primary language. Please note that in In-Portal 5.1.0 we have changed the Translation system so it shows you the Translation from Primary Language if non-primary is missing one.

There is a simple rule which we always follow:

"Always put language Phrases (using tags) and NEVER put plain text". The purpose of the feature is to allow Developer to add a basic translation (most likely NOT final version) so it will be auto-inserted into the system. Later Webmaster or whatever can adjust things through the translation system. The advantage is that Developer does need to go through the 2 step process - add a tag with Phrase, then come back and add translation. Now it will be 1 step process.


Hope it explains.


Thanks.




On Fri, May 28, 2010 at 4:55 PM, Phil -- wbtc.fr -- <ph...@wbtc.fr> wrote:
>
> Hi Dmitry,
>

> if t...

Phil -- wbtc.fr --

unread,
May 29, 2010, 5:12:14 AM5/29/10
to in-por...@googlegroups.com
Hi Dmitry,

thanks for detailed explanation, my thought was about having a different display for language label vs. default label (for example, in our own small apps we use a different color to display non-translated labels (which are displaying our primary lang in the meantime).

Anyway I like the idea of having a default field, developpers can give a quick meaning of the field, this is very usefull and time saving :)

Phil.

2010/5/29 Dmitry Andrejev <dand...@gmail.com>way

Alexander Obuhovich

unread,
May 29, 2010, 5:19:41 AM5/29/10
to in-por...@googlegroups.com

Dmitry Andrejev

unread,
May 30, 2010, 3:51:58 AM5/30/10
to in-por...@googlegroups.com

Hi Alex,

Was there any particular reason why we did not want to load Primary translation in current one is missing?

What if we do this when site in production mode and show not translated when debug is on?

DA

On May 29, 2010 4:19 AM, "Alexander Obuhovich" <aik....@gmail.com> wrote:

Task: http://tracker.in-portal.org/view.php?id=751



On Sat, May 29, 2010 at 12:12 PM, Phil -- wbtc.fr -- <ph...@wbtc.fr> wrote:
>
> Hi Dmitry,
>

> than...

Alexander Obuhovich

unread,
May 30, 2010, 5:04:10 AM5/30/10
to in-por...@googlegroups.com

We can't show translation from primary and missing phrase translation link at the same time.

On May 30, 2010 10:52 AM, "Dmitry Andrejev" <dand...@gmail.com> wrote:

Hi Alex,

Was there any particular reason why we did not want to load Primary translation in current one is missing?

What if we do this when site in production mode and show not translated when debug is on?

DA


>
> On May 29, 2010 4:19 AM, "Alexander Obuhovich" <aik....@gmail.com> wrote:
>

> Task: http://tra...


>
>
>
> On Sat, May 29, 2010 at 12:12 PM, Phil -- wbtc.fr -- <ph...@wbtc.fr> wrote:
> >

> > Hi Dmitr...

> than...

Dmitry Andrejev

unread,
May 30, 2010, 8:48:19 PM5/30/10
to in-por...@googlegroups.com
Hi Alex,

We don't need to! What we want is to:

1. show Primary trans. if current missing and we are NOT in Debug mode (which means production mode) and NOT in Content mode in Admin

2. show Label with ability to translate when we in Debug mode and on Front, or Content mode and in Admin.


What you think?


DA

Phil -- wbtc.fr --

unread,
May 31, 2010, 5:36:54 AM5/31/10
to in-por...@googlegroups.com
I think it's perfect this way :)

2010/5/31 Dmitry Andrejev <dand...@gmail.com>
Reply all
Reply to author
Forward
0 new messages