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

Localization #649

Merged
merged 68 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a58d689
add auto-width tester
rpatters1 Jan 12, 2024
4f82981
auto resize width sample
rpatters1 Jan 13, 2024
e04897a
refinements
rpatters1 Jan 14, 2024
34a00ef
add ComboBox to mixin, plus sample
rpatters1 Jan 14, 2024
8d366dc
lint fix and sample update
rpatters1 Jan 15, 2024
7525a9f
add other auto-layout features
rpatters1 Jan 16, 2024
bf6cdb3
sample auto_layout updates
rpatters1 Jan 17, 2024
2ff3ea6
auto-layout sample for 0.71
rpatters1 Jan 17, 2024
aeb97b4
revise auto-layout demo script
rpatters1 Jan 18, 2024
a2fce80
fix issue with FCMCtrlCheckBox not storing state
rpatters1 Jan 18, 2024
c21a6f6
add 3-state checkbox for testing
rpatters1 Jan 18, 2024
fca08c9
fix text
rpatters1 Jan 18, 2024
78172fd
add localization demo
rpatters1 Jan 18, 2024
25af53c
refactor localization to add the localization tables to the library i…
rpatters1 Jan 19, 2024
c77f535
localize menu options of Transpose By Steps
rpatters1 Jan 19, 2024
5051a36
docs, tranposition localization
rpatters1 Jan 19, 2024
ae478e3
localization of transpose
rpatters1 Jan 19, 2024
77faaa6
fix a few typos
rpatters1 Jan 20, 2024
478fe45
make compatible with JW Lua
rpatters1 Jan 20, 2024
ea5b041
fix typo
rpatters1 Jan 20, 2024
9ee3264
Fix typos in Spanish text.
rpatters1 Jan 20, 2024
1788e8c
localized enharmonic transposition scripts
rpatters1 Jan 20, 2024
f2a8a92
refinements to localization
rpatters1 Jan 21, 2024
779811d
add localization for chromatic transpose
rpatters1 Jan 21, 2024
3e11d5c
refinements to localizing transposition
rpatters1 Jan 21, 2024
1e60872
auto_layout changes for latest RGP Lua dev branch
rpatters1 Jan 22, 2024
a0f6c21
Add mixin version of `__FCUserWindow::CreateChildUI` for backwards co…
rpatters1 Jan 23, 2024
f568680
update finenv with latest info
rpatters1 Jan 29, 2024
f0c0383
one more lint warning
rpatters1 Jan 31, 2024
5a78f36
transpose_by_step is working
rpatters1 Feb 1, 2024
2cf8a3d
transpose_chromatic
rpatters1 Feb 1, 2024
4249224
enharmonic transposing
rpatters1 Feb 1, 2024
324f9cc
Merge branch 'RGP-automatic-localization' into RGP-localization
rpatters1 Feb 1, 2024
e13bf80
lint errors
rpatters1 Feb 1, 2024
b1d8df1
refactor folder layout for localization
rpatters1 Feb 2, 2024
d7a89c3
Merge branch 'master' into RGP-localization
rpatters1 Feb 2, 2024
a936359
clarify comments
rpatters1 Feb 2, 2024
0f9c83e
checkpoint localization tool
rpatters1 Feb 3, 2024
64d59a8
checkpoint localization tool
rpatters1 Feb 3, 2024
f8ef97b
localization tool semi-working. main things missing are plugindef sup…
rpatters1 Feb 3, 2024
12f0a65
refactor sync openai calls to async
rpatters1 Feb 3, 2024
8c85429
line ending
rpatters1 Feb 3, 2024
88953d9
plugindef localization kind of working
rpatters1 Feb 4, 2024
4704eb2
plugindef localization is working
rpatters1 Feb 4, 2024
2efafc1
localize an example with a lot of additional menu items
rpatters1 Feb 4, 2024
9311b4a
Add script group name and description
rpatters1 Feb 4, 2024
983a675
minor updates
rpatters1 Feb 5, 2024
3a92c8c
Merge branch 'master' into RGP-localization
rpatters1 Feb 5, 2024
9a46284
Added table to list of types recognized by AddStrings method. Other m…
rpatters1 Feb 5, 2024
89423a0
refactor mixins per suggestions from ThistleSifter
rpatters1 Feb 6, 2024
48d4f32
Merge branch 'master' into RGP-localization
rpatters1 Feb 6, 2024
a2e17a0
a word
rpatters1 Feb 6, 2024
0a3f419
update sample localized script with latest approaches
rpatters1 Feb 6, 2024
7a3759e
Bundle localizations
asherber Feb 6, 2024
1abb39f
Merge pull request #6 from asherber/bundle-localization
rpatters1 Feb 6, 2024
8ff3c8c
address code review issues.
rpatters1 Feb 7, 2024
3bae150
in-progress checkpoint for Base localization.
rpatters1 Feb 7, 2024
5118dcc
Base localization added to all src scripts and utilities. Still need …
rpatters1 Feb 7, 2024
b38d2eb
auto_layout.lua code complete
rpatters1 Feb 7, 2024
d12bf4f
Merge branch 'master' into RGP-localization
rpatters1 Feb 8, 2024
c4c495d
update with latest agreed changes
rpatters1 Feb 8, 2024
5a3054d
fix lint error
rpatters1 Feb 8, 2024
48d7a85
Merge branch 'master' into RGP-localization
rpatters1 Feb 9, 2024
942fa21
add table support for multi-string arguments methods.
rpatters1 Feb 9, 2024
67be045
changed `process_string_arguments` to `create_multi_string_proxy` so …
rpatters1 Feb 9, 2024
c77beac
remove mobdebug
rpatters1 Feb 9, 2024
8a87b51
fix small issues discovered
rpatters1 Feb 9, 2024
44e53dc
Changes for `*AutoLocalized` mixin functions.
rpatters1 Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
auto_layout.lua code complete
rpatters1 committed Feb 7, 2024
commit b38d2ebfe8a284c7a6c7a2c2810eadb881008723
306 changes: 156 additions & 150 deletions samples/auto_layout.lua
Original file line number Diff line number Diff line change
@@ -18,178 +18,178 @@ local localization = require('library.localization')
-- This table was auto-generated with `utilities/localization_tool.lua`
-- Then it was edited to include only the strings that need to be localized.
--
localization.en = -- this is en_GB due to spelling of "Localisation"
localization.Base = -- this is en_GB due to spelling of "Localisation"
{
["Action Button"] = "Action Button",
["Choices"] = "Choices",
["Close"] = "Close",
["First Option"] = "First Option",
["Fourth Option"] = "Fourth Option",
["Left Checkbox Option 1"] = "Left Checkbox Option 1",
["Left Checkbox Option 2"] = "Left Checkbox Option 2",
["Menu"] = "Menu",
["Right Three-State Option"] = "Right Three-State Option",
["Second Option"] = "Second Option",
["Short "] = "Short ",
["Test Autolayout With Localisation"] = "Test Autolayout With Localisation",
["Third Option"] = "Third Option",
["This is long menu text "] = "This is long menu text ",
["This is long text choice "] = "This is long text choice ",
["This is longer option text "] = "This is longer option text ",
action_button = "Action Button",
choices = "Choices",
close = "Close",
first_option = "First Option",
fourth_option = "Fourth Option",
left_checkbox1 = "Left Checkbox Option 1",
left_checkbox2 = "Left Checkbox Option 2",
menu = "Menu",
right_three_state = "Right Three-State Option",
second_option = "Second Option",
short = "Short %d",
test_autolayout = "Test Autolayout With Localisation",
third_option = "Third Option",
long_menu_text = "This is long menu text %d",
long_text_choice = "This is long text choice %d",
longer_option_text = "This is longer option text %d",
}

localization.en_US =
{
["Test Autolayout With Localisation"] = "Test Autolayout With Localization",
test_autolayout = "Test Autolayout With Localization"
}

--
-- The rest of the localization tables were created one-at-a-time with the `utilities/localization_tool.lua` script.
--
localization.es = {
["Action Button"] = "Botón de Acción",
["Choices"] = "Opciones",
["Close"] = "Cerrar",
["First Option"] = "Primera Opción",
["Fourth Option"] = "Cuarta Opción",
["Left Checkbox Option 1"] = "Opción de Casilla de Verificación Izquierda 1",
["Left Checkbox Option 2"] = "Opción de Casilla de Verificación Izquierda 2",
["Menu"] = "Menú",
["Right Three-State Option"] = "Opción de Tres Estados a la Derecha",
["Second Option"] = "Segunda Opción",
["Short "] = "Corto ",
["Test Autolayout With Localisation"] = "Prueba de Autodiseño con Localización",
["Third Option"] = "Tercera Opción",
["This is long menu text "] = "Este es un texto de menú largo ",
["This is long text choice "] = "Esta es una elección de texto largo ",
["This is longer option text "] = "Este es un texto de opción más largo ",
action_button = "Botón de Acción",
choices = "Opciones",
close = "Cerrar",
first_option = "Primera Opción",
fourth_option = "Cuarta Opción",
left_checkbox1 = "Opción de Casilla de Verificación Izquierda 1",
left_checkbox2 = "Opción de Casilla de Verificación Izquierda 2",
menu = "Menú",
right_three_state = "Opción de Tres Estados a la Derecha",
second_option = "Segunda Opción",
short = "Corto %d",
test_autolayout = "Prueba de Autodiseño con Localización",
third_option = "Tercera Opción",
long_menu_text = "Este es un texto de menú largo %d",
long_text_choice = "Esta es una elección de texto largo %d",
longer_option_text = "Este es un texto de opción más largo %d",
}

--
-- This table was auto-generated with `utilities/localization_tool.lua`
--
localization.jp = {
["Action Button"] = "アクションボタン",
["Choices"] = "選択肢",
["Close"] = "閉じる",
["First Option"] = "最初のオプション",
["Fourth Option"] = "第四のオプション",
["Left Checkbox Option 1"] = "左チェックボックスオプション1",
["Left Checkbox Option 2"] = "左チェックボックスオプション2",
["Menu"] = "メニュー",
["Right Three-State Option"] = "右三状態オプション",
["Second Option"] = "第二のオプション",
["Short "] = "短い ",
["Test Autolayout With Localisation"] = "ローカリゼーションでのオートレイアウトのテスト",
["Third Option"] = "第三のオプション",
["This is long menu text "] = "これは長いメニューテキストです ",
["This is long text choice "] = "これは長いテキスト選択です ",
["This is longer option text "] = "これはより長いオプションテキストです ",
localization.ja = {
action_button = "アクションボタン",
choices = "選択肢",
close = "閉じる",
first_option = "最初のオプション",
fourth_option = "第四のオプション",
left_checkbox1 = "左チェックボックスオプション1",
left_checkbox2 = "左チェックボックスオプション2",
menu = "メニュー",
right_three_state = "右三状態オプション",
second_option = "第二のオプション",
short = "短い %d",
test_autolayout = "ローカリゼーションでのオートレイアウトのテスト",
third_option = "第三のオプション",
long_menu_text = "これは第%d長いメニューテキストです",
long_text_choice = "これは第%d長いテキストの選択です",
longer_option_text = "これは第%dより長いオプションテキストです ",
}

--
-- This table was auto-generated with `utilities/localization_tool.lua`
--
localization.de = {
["Action Button"] = "Aktionsknopf",
["Choices"] = "Auswahlmöglichkeiten",
["Close"] = "Schließen",
["First Option"] = "Erste Option",
["Fourth Option"] = "Vierte Option",
["Left Checkbox Option 1"] = "Linke Checkbox Option 1",
["Left Checkbox Option 2"] = "Linke Checkbox Option 2",
["Menu"] = "Menü",
["Right Three-State Option"] = "Rechte Dreizustandsoption",
["Second Option"] = "Zweite Option",
["Short "] = "Kurz ",
["Test Autolayout With Localisation"] = "Test von Autolayout mit Lokalisierung",
["Third Option"] = "Dritte Option",
["This is long menu text "] = "Dies ist ein langer Menütext ",
["This is long text choice "] = "Dies ist eine lange Textauswahl ",
["This is longer option text "] = "Dies ist ein längerer Optionstext ",
action_button = "Aktionsknopf",
choices = "Auswahlmöglichkeiten",
close = "Schließen",
first_option = "Erste Option",
fourth_option = "Vierte Option",
left_checkbox1 = "Linke Checkbox Option 1",
left_checkbox2 = "Linke Checkbox Option 2",
menu = "Menü",
right_three_state = "Rechte Dreizustandsoption",
second_option = "Zweite Option",
short = "Kurz %d",
test_autolayout = "Test von Autolayout mit Lokalisierung",
third_option = "Dritte Option",
long_menu_text = "Dies ist ein langer Menütext %d",
long_text_choice = "Dies ist eine lange Textauswahl %d",
longer_option_text = "Dies ist ein längerer Optionstext %d",
}

localization.fr = {
["Action Button"] = "Bouton d'action",
["Choices"] = "Choix",
["Close"] = "Close",
["First Option"] = "Première Option",
["Fourth Option"] = "Quatrième Option",
["Left Checkbox Option 1"] = "Option de case à cocher gauche 1",
["Left Checkbox Option 2"] = "Option de case à cocher gauche 2",
["Menu"] = "Menu",
["Right Three-State Option"] = "Option à trois états à droite",
["Second Option"] = "Deuxième Option",
["Short "] = "Court ",
["Test Autolayout With Localisation"] = "Test de AutoLayout avec Localisation",
["Third Option"] = "Troisième Option",
["This is long menu text "] = "Ceci est un long texte de menu ",
["This is long text choice "] = "Ceci est un long choix de texte ",
["This is longer option text "] = "Ceci est un texte d'option plus long ",
action_button = "Bouton d'action",
choices = "Choix",
close = "Close",
first_option = "Première Option",
fourth_option = "Quatrième Option",
left_checkbox1 = "Option de case à cocher gauche 1",
left_checkbox2 = "Option de case à cocher gauche 2",
menu = "Menu",
right_three_state = "Option à trois états à droite",
second_option = "Deuxième Option",
short = "Court %d",
test_autolayout = "Test de AutoLayout avec Localisation",
third_option = "Troisième Option",
long_menu_text = "Ceci est un long texte de menu %d",
long_text_choice = "Ceci est un long choix de texte %d",
longer_option_text = "Ceci est un texte d'option plus long %d",
}

localization.zh = {
["Action Button"] = "操作按钮",
["Choices"] = "选择:",
["Close"] = "关闭",
["First Option"] = "第一选项:",
["Fourth Option"] = "第四选项:",
["Left Checkbox Option 1"] = "左侧复选框选项1",
["Left Checkbox Option 2"] = "左侧复选框选项2",
["Menu"] = "菜单:",
["Right Three-State Option"] = "右侧三态选项",
["Second Option"] = "第二选项:",
["Short "] = "",
["Test Autolayout With Localisation"] = "自动布局与本地化测试",
["Third Option"] = "第三选项:",
["This is long menu text "] = "这是长菜单文本 ",
["This is long text choice "] = "这是长文本选择 ",
["This is longer option text "] = "这是更长的选项文本 ",
action_button = "操作按钮",
choices = "选择:",
close = "关闭",
first_option = "第一选项:",
fourth_option = "第四选项:",
left_checkbox1 = "左侧复选框选项1",
left_checkbox2 = "左侧复选框选项2",
menu = "菜单:",
right_three_state = "右侧三态选项",
second_option = "第二选项:",
short = "%d",
test_autolayout = "自动布局与本地化测试",
third_option = "第三选项:",
long_menu_text = "这是长菜单文本 %d",
long_text_choice = "这是长文本选择 %d",
longer_option_text = "这是更长的选项文本 %d",
}

localization.ar = {
["Action Button"] = "زر العمل",
["Choices"] = "الخيارات",
["Close"] = "إغلاق",
["First Option"] = "الخيار الأول",
["Fourth Option"] = "الخيار الرابع",
["Left Checkbox Option 1"] = "خيار المربع الأول على اليسار",
["Left Checkbox Option 2"] = "خيار المربع الثاني على اليسار",
["Menu"] = "القائمة",
["Right Three-State Option"] = "خيار الحالة الثلاثية اليمين",
["Second Option"] = "الخيار الثاني",
["Short "] = "قصير ",
["Test Autolayout With Localisation"] = "اختبار التخطيط التلقائي مع التعريب",
["Third Option"] = "الخيار الثالث",
["This is long menu text "] = "هذا نص قائمة طويل ",
["This is long text choice "] = "هذا خيار نص طويل ",
["This is longer option text "] = "هذا نص خيار أطول ",
action_button = "زر العمل",
choices = "الخيارات",
close = "إغلاق",
first_option = "الخيار الأول",
fourth_option = "الخيار الرابع",
left_checkbox1 = "خيار المربع الأول على اليسار",
left_checkbox2 = "خيار المربع الثاني على اليسار",
menu = "القائمة",
right_three_state = "خيار الحالة الثلاثية اليمين",
second_option = "الخيار الثاني",
short = "قصير %d",
test_autolayout = "اختبار التخطيط التلقائي مع التعريب",
third_option = "الخيار الثالث",
long_menu_text = "هذا نص قائمة طويل %d",
long_text_choice = "هذا خيار نص طويل %d",
longer_option_text = "هذا نص خيار أطول %d",
}

localization.fa = {
["Action Button"] = "دکمه عملیات",
["Choices"] = "گزینه ها",
["Close"] = "بستن",
["First Option"] = "گزینه اول",
["Fourth Option"] = "گزینه چهارم",
["Left Checkbox Option 1"] = "گزینه چک باکس سمت چپ 1",
["Left Checkbox Option 2"] = "گزینه چک باکس سمت چپ 2",
["Menu"] = "منو",
["Right Three-State Option"] = "گزینه سه حالته سمت راست",
["Second Option"] = "گزینه دوم",
["Short "] = "کوتاه ",
["Test Autolayout With Localisation"] = "تست آتولایوت با بومی سازی",
["Third Option"] = "گزینه سوم",
["This is long menu text "] = "این متن منوی طولانی است ",
["This is long text choice "] = "این یک انتخاب متن طولانی است ",
["This is longer option text "] = "این متن گزینه طولانی تر است ",
action_button = "دکمه عملیات",
choices = "گزینه ها",
close = "بستن",
first_option = "گزینه اول",
fourth_option = "گزینه چهارم",
left_checkbox1 = "گزینه چک باکس سمت چپ 1",
left_checkbox2 = "گزینه چک باکس سمت چپ 2",
menu = "منو",
right_three_state = "گزینه سه حالته سمت راست",
second_option = "گزینه دوم",
short = "کوتاه %d",
test_autolayout = "تست آتولایوت با بومی سازی",
third_option = "گزینه سوم",
long_menu_text = "این متن منوی طولانی است %d",
long_text_choice = "این یک انتخاب متن طولانی است %d",
longer_option_text = "این متن گزینه طولانی تر است %d",
}

localization.set_locale("fa")
localization.set_locale("es")

function create_dialog()
local dlg = mixin.FCXCustomLuaWindow()
dlg:SetTitleLocalized("Test Autolayout With Localisation")
dlg:SetTitleLocalized("test_autolayout")

local line_no = 0
local y_increment = 22
@@ -199,20 +199,20 @@ function create_dialog()
-- left side
dlg:CreateStatic(0, line_no * y_increment, "option1-label")
:DoAutoResizeWidth(0)
:SetTextLocalized("First Option")
:SetTextLocalized("first_option")
dlg:CreateEdit(0, line_no * y_increment - utils.win_mac(2, 3), "option1")
:SetInteger(1)
:AssureNoHorizontalOverlap(dlg:GetControl("option1-label"), label_edit_separ)
line_no = line_no + 1

dlg:CreateCheckbox(0, line_no * y_increment, "left-checkbox1")
:DoAutoResizeWidth(0)
:SetTextLocalized("Left Checkbox Option 1")
:SetTextLocalized("left_checkbox1")
line_no = line_no + 1

dlg:CreateStatic(0, line_no * y_increment, "option2-label")
:DoAutoResizeWidth(0)
:SetTextLocalized("Second Option")
:SetTextLocalized("second_option")
dlg:CreateEdit(10, line_no * y_increment - utils.win_mac(2, 3), "option2")
:SetInteger(2)
:AssureNoHorizontalOverlap(dlg:GetControl("option2-label"), label_edit_separ)
@@ -221,7 +221,7 @@ function create_dialog()

dlg:CreateCheckbox(0, line_no * y_increment, "left-checkbox2")
:DoAutoResizeWidth(0)
:SetTextLocalized("Left Checkbox Option 2")
:SetTextLocalized("left_checkbox2")
line_no = line_no + 1

-- center vertical line
@@ -235,7 +235,7 @@ function create_dialog()
-- right side
dlg:CreateStatic(0, line_no * y_increment, "option3-label")
:DoAutoResizeWidth(0)
:SetTextLocalized("Third Option")
:SetTextLocalized("third_option")
:AssureNoHorizontalOverlap(vertical_line, center_padding)
dlg:CreateEdit(0, line_no * y_increment - utils.win_mac(2, 3), "option3")
:SetInteger(3)
@@ -244,14 +244,14 @@ function create_dialog()

dlg:CreateCheckbox(0, line_no * y_increment, "right-checkbox1")
:DoAutoResizeWidth(0)
:SetTextLocalized("Right Three-State Option")
:SetTextLocalized("right_three_state")
:SetThreeStatesMode(true)
:AssureNoHorizontalOverlap(vertical_line, center_padding)
line_no = line_no + 1

dlg:CreateStatic(0, line_no * y_increment, "option4-label")
:DoAutoResizeWidth(0)
:SetTextLocalized("Fourth Option")
:SetTextLocalized("fourth_option")
:AssureNoHorizontalOverlap(vertical_line, center_padding)
dlg:CreateEdit(0, line_no * y_increment - utils.win_mac(2, 3), "option4")
:SetInteger(4)
@@ -261,7 +261,7 @@ function create_dialog()

dlg:CreateButton(0, line_no * y_increment)
:DoAutoResizeWidth()
:SetTextLocalized("Action Button")
:SetTextLocalized("action_button")
:AssureNoHorizontalOverlap(vertical_line, center_padding)
:HorizontallyAlignRightWith(dlg:GetControl("option4"))
-- :HorizontallyAlignRightWithFurthest()
@@ -276,33 +276,37 @@ function create_dialog()
local start_line_no = line_no
dlg:CreateStatic(0, line_no * y_increment, "popup_label")
:DoAutoResizeWidth(0)
:SetTextLocalized("Menu")
:SetTextLocalized("menu")
local ctrl_popup = dlg:CreatePopup(0, line_no * y_increment - utils.win_mac(2, 2), "popup")
:DoAutoResizeWidth(0)
:AssureNoHorizontalOverlap(dlg:GetControl("popup_label"), label_edit_separ)
for counter = 1, 3 do
local format_string
if counter == 3 then
ctrl_popup:AddStringLocalized(localization.localize("This is long menu text ") .. counter)
format_string = localization.localize("long_menu_text")
else
ctrl_popup:AddStringLocalized(localization.localize("Short ") .. counter)
format_string = localization.localize("short")
end
ctrl_popup:AddString(string.format(format_string, counter))
end
ctrl_popup:SetSelectedItem(0)
line_no = line_no + 1

dlg:CreateStatic(0, line_no * y_increment, "cbobox_label")
:DoAutoResizeWidth(0)
:SetTextLocalized("Choices")
:SetTextLocalized("choices")
local ctrl_cbobox = dlg:CreateComboBox(0, line_no * y_increment - utils.win_mac(2, 3), "cbobox")
:DoAutoResizeWidth(40)
:AssureNoHorizontalOverlap(dlg:GetControl("cbobox_label"), label_edit_separ)
:HorizontallyAlignLeftWith(ctrl_popup)
for counter = 1, 3 do
local format_string
if counter == 3 then
ctrl_cbobox:AddString(localization.localize("This is long text choice ") .. counter)
format_string = localization.localize("long_text_choice")
else
ctrl_cbobox:AddString(localization.localize("Short ") .. counter)
format_string = localization.localize("short")
end
ctrl_cbobox:AddString(string.format(format_string, counter))
end
ctrl_cbobox:SetSelectedItem(0)
line_no = line_no + 1 -- luacheck: ignore
@@ -314,17 +318,19 @@ function create_dialog()
rbtn:DoAutoResizeWidth(0)
:AssureNoHorizontalOverlap(ctrl_popup, 10)
:AssureNoHorizontalOverlap(ctrl_cbobox, 10)
local format_string
if counter == 2 then
rbtn:SetTextLocalized(localization.localize("This is longer option text ") .. counter)
format_string = localization.localize("longer_option_text")
else
rbtn:SetTextLocalized(localization.localize("Short ") .. counter)
format_string = localization.localize("short")
end
rbtn:SetText(string.format(format_string, counter))
counter = counter + 1
end
line_no = line_no + 2

dlg:CreateCloseButton(0, line_no * y_increment + 5)
:SetTextLocalized("Close")
:SetTextLocalized("close")
:DoAutoResizeWidth()
:HorizontallyAlignRightWithFurthest()