Template Development guideline for localization consideration
Avoid using concatenation string
Issue:
The full sentence will be tagged into the separated terms in the DGW glossary if it contains the concatenation strings. As a result, template engineers need to know the which and which strings will be contatenated together and provide comments for translation vendors for reference.
Sometimes the concatenation strings have different combination, the verb use in this string may not use in another strings due to different language culture. The sentence order needs to be adjusted after translation.
There are several patterns that we can use to fix these.
1) First pattern is to create a string that simply includes other string defines.
Here is an example from the Current Design: Mail8.ntf->form->(Out Of Office Profile) | OutOfOfficeProfile ->Postrecalc
Current Code
FIELD DaysOutDisplay:=@If(FirstDayOut = "" | FirstDayBack = ""; ""; "I will be out of the office starting " + @Text(@Date(FirstDayOut)) + " and will not return until " + @Text(@Date(FirstDayBack)) + ".");
Could be changed to
dispFirstDayOut := @Text(@Date(FirstDayOut));
dispFirstDayBack := @text(@Date(FirstDayBack));
{REM TSC The Next 3 strings are for concatentation }
{REM TSC The following string is the variable %disOOOString1 }
dispOOOstring1 := "I will be out of the office";
{REM TSC The following string is the variable %disOOOString2 }
dispOOOstring2 := " and will not return until";
{REM TSC The following string is used in the Out Of Office feature.
The %dispFirstDayOut is the time when a person starts their OOO,
dispFirstDayBack is the first day they are back}
FullString := "%disOOOString1 %dispFirstDayOut %dispOOOString2 %dispFirstDayBack";
FIELD DaysOutDisplay:=@If(FirstDayOut = "" | FirstDayBack = "";""; FullString);
DGW will produce property file values that will look like this.
# The Next 3 strings are for concatentation
# The following string is the variable %disOOOString1
Form.OutOfOfficeProfile.PostRecalc.I_will_be_out_of_the_office=I will be out of the office
# The following string is the variable %disOOOString2
Form.OutOfOfficeProfile.PostRecalc.and_will_not_return_until=and will not return until
# The following string is used in the Out Of Office feature.
# The %dispFirstDayOut is the time when a person starts their Out of Office,
# dispFirstDayBack is the first day they are back
Form.OutOfOfficeProfile.PostRecalc=%disOOOString1 %dispFirstDayOut %dispOOOString2 %dispFirstDayBack
2) Use a variable that can be translated so that the code can check the value to display the correct order
{ REM TSC The text of the next string determines the order of desplay of the following strings "Hello" and "World" }
OrderOfStings := "HelloFirst";
Field1 := "Hello";
Field2 := "World";
{ REM Begin DNT }
FIELD Display:=@If(OrderOfStrings = "HelloFirst" ;Field1+Field2; Field2+Field1)
{ REM End DNT }
DGW will produce property file values that will look like this.
# The text of the next string determines the order of display of the following strings "Hello" and "World"
Form.Memo.Action_Label_Formula.HelloFirst=HelloFirst
Form.Memo.Action_Label_Formula.Hello=Hello
Form.Memo.Action_Label_Formula.Hello=World
Add Comments for DNT terms and Hidden terms
1. DNT Terms in the LotusScript
'Begin Do Not Translate or
'Begin DNT
'End Do Not Translate
2. DNT terms in the Formula
REM {Begin Do Not Translate};
or
REM {Begin DNT};
REM {End Do Not Translate};
3. Always hidden terms
'Begin Always Hidden terms
'End Always Hidden terms
At least assign an alias for the forms and views. And the alias doesn't include space.
The form name and view name should be translated because they can be displayed on UI. So the design alias is necessary for programming consideration.
One more, we suggest the alias doesn't include space since it may be used on web.
Here is an example below,
In design: Mail8.ntf->Folder-> (Group Calendars)
Found NT title:
This folder's name "(Group Calendars)" should be translated because they will be displayed on UI, but it will cause function bug after translation.
Avoid using translatable string as programming condition
Example:
Current Design: Mail7ex.ntf->Form->CalendarProfile->"Change Access" button
Set item = note.getfirstitem("dspIndividualAccess")
strIndividualAccess = item.Text
lposition = Instr( strIndividualAccess, "Calendar notices are automatically forwarded to this person")
Field "dspIndividualAccess"
Issue:
Above code identity whether "Calendar notices are automatically forwarded to this person" is included into the field "dspIndividualAccess". 2 separated terms will be created into the DGW glossary. Template engineers need to add comments on them for translation vendors. This is an effort for Localization team.
The first sentence can not be translated as a sub-sentence of the second sentence on some international languages
Increase the default length of hotpot picture, or use the Notes button instead of it
Example:
Truncation:
Issue: If you want to use hotpot picture, please increase the default length of it to let the picture accommodate full international translation. Perhaps we should use the Notes button instead of the hotpot picture.
Use table column rather than the "tab" key to separate the static text from the field
Example:
Issue: this is an alignment problem. You can use table column rather than "tab" key to separate the static text from the field.
Define translatable strings as variables; put all translatable variables into one section.
Example:
mail7ex: CSCalendarEntry_zh-TW(Script Library): (Declarations)
If ( DurNDTend.TimeDifference( tmpNDT ) / 60) > 0 Then
Msgbox "Your start and end times result in a duration that is greater than 24 hours." + Chr(13) _
+ "Please check end date and time or Time Zone information." , MB_OK + MB_ICONSTOP, "Duration error"
CheckDuration = False
Exit Function
End If
If lDuration <= 0 Then ' I am not sure if this should be done here - within this function
Msgbox "Your start and end times result in a duration that is less than 1 minute." + Chr(13) _
+ "Please check end date and time or Time Zone information." + Chr(13) + "(Duration result is: " + Cstr(lDuration) + " )", MB_ICONSTOP ,"Duration error"
CheckDuration = False
Issue:
The translatable strings appear near the end of file, pls define them as some varialbles in the front of code and put them into one paragraph. Below is a good example:
Const ACCEPT_ERR_TITLE = "Calendar Conflict"
Const ACCEPT_ERR_DECLINE = "Part or all of this meeting is already on your calendar. You must decline those entries first before processing this notice."
Const ACCEPT_ERR_DELETE = "Part or all of this meeting is already in your mailfile. Would you like Notes to delete those entries and accept this instead?"
Example of strings in a column formula
Bad practice
@If(TargetObjectSubTypeProperty="1""Keywords";TargetObjectSubTypeProperty="2""Formula""");
@If(TargetObjectName="" & TargetObjectType = "1";" [Shared Actions]";TargetObjectType = "7";"[Database]";TargetObjectSubName !="" & TargetObjectSubTypeProperty != ""; TargetObjectName + "."+TargetObjectSubName+"."+Property;TargetObjectName+"."+TargetObjectSubNameTargetObjectSubName !="";TargetObjectName+"."+TargetObjectSubName;TargetObjectName)
The translator in this example will see the text strings "1" and think they have to translate it. The modified formula below shows a good practice.
Good practice
SharedActions :=" [Shared Actions]";
Database := "[Database]";
Keywords := "Keywords";
Formula := "Formula";
"REM Begin DNT";
@If(TargetObjectSubTypeProperty="1";Keywords;TargetObjectSubTypeProperty="2";Formula;"");
@If(TargetObjectName="" & TargetObjectType = "1";SharedActions;TargetObjectType = "7";Database;TargetObjectSubName !="" & TargetObjectSubTypeProperty != ""; TargetObjectName + "."+TargetObjectSubName+"."+Property;TargetObjectName+"."+TargetObjectSubNameTargetObjectSubName !="";TargetObjectName+"."+TargetObjectSubName;TargetObjectName)
Avoid showing filed name or form name on UI console directly
Example:
Issue: you should avoid showing field name and form name on UI console directly. now Localization team has below workround, it is a manual work.
Mail7ex.ntf->Form->Notice
1.In "(Declarations)" of "(Globals) Notice" Objects, 10th line add 2 lines code and translate marked by RED:
SUBJECT_TITLE = "Subject"
LOCATION_TITLE = "Location"
2.In "RaiseConflictDialog" of "(Globals) Notice" Objects, 29th line add 2 lines code:
cLst(x) = Replace (cLst(x),"Subject",SUBJECT_TITLE)
cLst(x) = Replace (cLst(x),"Location",LOCATION_TITLE)
Uncheck "No Wrap" option for the Notes button
Example:
Issue: It is a wrap up problem, you need to uncheck "no wrap" option for the Notes button.
URLDecode the strings that are displayed on web UI
Example:
Issue: The window title is HTML encode. Please don't forget to decode it.
Workround: PartialName := Right(@URLDecode("Domino";Query_String);"&Title=")
Create alias for the keyword of option field(e.g. Listbox, Checkbox, etc)
It is necessary to create an alias for every keyword for programing consideration.
2) Use prefixed aliases when calling design elements.
Instead of: @command([Compose];"Memo")
Try to use: @command([Compose];"fa-Memo")
Instead of: @command([Compose];"Memo")
Try to use: @command([Compose];"fa-Memo")
Do not use normal legible words when using internal variables (for instance stored in always hidden fields).
Instead of: @if(xxdocname = "Interest Profile";"Interest Profile";"Standard Document")
Try to use: @if(xxdocname = "InterestProfile";"Interest Profile";"Standard Document")
Put some of the information between parentheses
Instead of: "Created by " & doc.username(0) & " on " & doc.date(0) & " at " & doc.time(0)
Try to use: "Created by " & doc.username(0) & "("doc.date(0) & " - " & doc.time(0)")
"Instead of: "Retrieved " & RetrievedDocs & " documents. Updated " & UpdatedDocs & " documents. Saved " & SavedDocs & " documents."
Try to use: "Retrieved documents: " & RetrievedDocs & " Updated documents:" & UpdatedDocs & " Saved documents: " & SavedDocs
To avoid concatenation problem with bitmap in the strings, put link and bitmaps in the end of the sentence
Avoid given the same alias for the same kind of design elements
Avoid using the same alias name for the same type design elements whose main names are translatable, here is an example below,
in Design:
Mail8.ntf->Form-> Reply with History & Attachments
Mail8.ntf->Form-> Reply
These two forms have the same alias, but their main names are translatable. After two form names are translated in our localized language templates, if the "Reply with History & Attachments" form is in front of the "Reply" form in the designer(the sequence of the forms are opposite with the US template after DGW update sometimes), it will cause the functional bugs.
Before translate these form's main names
After translate form's main names
Suppose other programs will call the form'alias name directly, but it will confused which form will be called if they have the same alias. Here are some NLV SPRs about this issue.
| | | | | | SPR# | Tot | QA | Dev | Description |
| | | | | | JLWN74HBTV | | Jian Lin Wan | Xue Feng Jia | Mail8.ntf -> unexcepted dialog appears when open replay mail |
| | | | | | JTSG744FY5 | | Eason YH Lin | Eric HY Chang | Mail8.ntf: Error message while open a reply message. |
| | | | | | PDCW73FFMQ | | Peter DC Wang | Xiao Feng Ji | [0502_Pseudo] Pop up an error message while opening a replied mail. |
Avoid using @uppercase and @lowercase in formula to uppercase or lowercase translatable strings
Avoid using @uppercase and @lowercase formual to uppercase or lowercase translatable strings.
Here is an example:
Current design: Mail8.ntf -> form ->appointment -> tmpRepeatsText field