From f4c1fb441e056118dfc64ab8505f973788eab7b9 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 12 Mar 2012 23:35:37 +0000 Subject: [PATCH] Mark the names and descriptions of included lua macros as translatable Originally committed to SVN as r6584. --- aegisub/automation/autoload/cleantags-autoload.lua | 6 ++++-- aegisub/automation/autoload/kara-templater.lua | 10 ++++++---- aegisub/automation/autoload/karaoke-auto-leadin.lua | 6 ++++-- aegisub/automation/autoload/macro-1-edgeblur.lua | 10 ++++++---- aegisub/automation/autoload/macro-2-mkfullwitdh.lua | 10 ++++++---- aegisub/automation/autoload/select-overlaps.lua | 6 ++++-- aegisub/automation/autoload/strip-tags.lua | 8 +++++--- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/aegisub/automation/autoload/cleantags-autoload.lua b/aegisub/automation/autoload/cleantags-autoload.lua index 5f3c3a2f8..3d739dd55 100644 --- a/aegisub/automation/autoload/cleantags-autoload.lua +++ b/aegisub/automation/autoload/cleantags-autoload.lua @@ -26,8 +26,10 @@ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -script_name = "Clean Tags" -script_description = "Clean subtitle lines by re-arranging ASS tags and override blocks within the lines" +local tr = aegisub.gettext + +script_name = tr"Clean Tags" +script_description = tr"Clean subtitle lines by re-arranging ASS tags and override blocks within the lines" script_author = "Muhammad Lukman Nasaruddin (ai-chan)" script_version = "1.20" script_modified = "25 February 2009" diff --git a/aegisub/automation/autoload/kara-templater.lua b/aegisub/automation/autoload/kara-templater.lua index 6fb1e336a..6178dfa65 100644 --- a/aegisub/automation/autoload/kara-templater.lua +++ b/aegisub/automation/autoload/kara-templater.lua @@ -31,8 +31,10 @@ -- Parse and apply a karaoke effect written in ASS karaoke template language -- See help file and wiki for more information on this -script_name = "Karaoke Templater" -script_description = "Macro and export filter to apply karaoke effects using the template language" +local tr = aegisub.gettext + +script_name = tr"Karaoke Templater" +script_description = tr"Macro and export filter to apply karaoke effects using the template language" script_author = "Niels Martin Hansen" script_version = "2.1.7" @@ -853,5 +855,5 @@ function macro_can_template(subs) return false end -aegisub.register_macro("Apply karaoke template", "Applies karaoke effects from templates", macro_apply_templates, macro_can_template) -aegisub.register_filter("Karaoke template", "Apply karaoke effect templates to the subtitles.\n\nSee the help file for information on how to use this.", 2000, filter_apply_templates) +aegisub.register_macro(tr"Apply karaoke template", tr"Applies karaoke effects from templates", macro_apply_templates, macro_can_template) +aegisub.register_filter(tr"Karaoke template", tr"Apply karaoke effect templates to the subtitles.\n\nSee the help file for information on how to use this.", 2000, filter_apply_templates) diff --git a/aegisub/automation/autoload/karaoke-auto-leadin.lua b/aegisub/automation/autoload/karaoke-auto-leadin.lua index 324aac82b..a8e8f03fa 100644 --- a/aegisub/automation/autoload/karaoke-auto-leadin.lua +++ b/aegisub/automation/autoload/karaoke-auto-leadin.lua @@ -27,8 +27,10 @@ POSSIBILITY OF SUCH DAMAGE. ]] -script_name = "Automatic karaoke lead-in" -script_description = "Join up the ends of selected lines and add \k tags to shift karaoke" +local tr = aegisub.gettext + +script_name = tr"Automatic karaoke lead-in" +script_description = tr"Join up the ends of selected lines and add \k tags to shift karaoke" script_author = "Niels Martin Hansen" script_version = "1.0" diff --git a/aegisub/automation/autoload/macro-1-edgeblur.lua b/aegisub/automation/autoload/macro-1-edgeblur.lua index 9ded001e4..9c316c695 100644 --- a/aegisub/automation/autoload/macro-1-edgeblur.lua +++ b/aegisub/automation/autoload/macro-1-edgeblur.lua @@ -1,8 +1,10 @@ -- Automation 4 demo script -- Macro that adds \be1 tags in front of every selected line -script_name = "Add edgeblur macro" -script_description = "A demo macro showing how to do simple line modification in Automation 4" +local tr = aegisub.gettext + +script_name = tr"Add edgeblur" +script_description = tr"A demo macro showing how to do simple line modification in Automation 4" script_author = "Niels Martin Hansen" script_version = "1" @@ -13,7 +15,7 @@ function add_edgeblur(subtitles, selected_lines, active_line) l.text = "{\\be1}" .. l.text subtitles[i] = l end - aegisub.set_undo_point("Add edgeblur") + aegisub.set_undo_point(script_name) end -aegisub.register_macro("Add edgeblur", "Adds \\be1 tags to all selected lines", add_edgeblur) +aegisub.register_macro(script_name, tr"Adds \\be1 tags to all selected lines", add_edgeblur) diff --git a/aegisub/automation/autoload/macro-2-mkfullwitdh.lua b/aegisub/automation/autoload/macro-2-mkfullwitdh.lua index d1fd6a941..3a01cbb9f 100644 --- a/aegisub/automation/autoload/macro-2-mkfullwitdh.lua +++ b/aegisub/automation/autoload/macro-2-mkfullwitdh.lua @@ -1,8 +1,10 @@ -- Automation 4 demo script -- Converts halfwidth (ASCII) Latin letters to fullwidth JIS Latin letters -script_name = "Make text fullwidth" -script_description = "Shows how to use the unicode include to iterate over characters and a lookup table to convert those characters to something else." +local tr = aegisub.gettext + +script_name = tr("Make text fullwidth") +script_description = tr("Shows how to use the unicode include to iterate over characters and a lookup table to convert those characters to something else.") script_author = "Niels Martin Hansen" script_version = "1" @@ -72,7 +74,7 @@ function make_fullwidth(subtitles, selected_lines, active_line) l.text = newtext subtitles[i] = l end - aegisub.set_undo_point("Make fullwidth") + aegisub.set_undo_point(tr"Make fullwidth") end -aegisub.register_macro("Make fullwidth", "Convert Latin letters to SJIS fullwidth letters", make_fullwidth) +aegisub.register_macro(tr"Make fullwidth", tr"Convert Latin letters to SJIS fullwidth letters", make_fullwidth) diff --git a/aegisub/automation/autoload/select-overlaps.lua b/aegisub/automation/autoload/select-overlaps.lua index c328aaee4..63c78069e 100644 --- a/aegisub/automation/autoload/select-overlaps.lua +++ b/aegisub/automation/autoload/select-overlaps.lua @@ -14,8 +14,10 @@ -- -- $Id$ -script_name = "Select overlaps" -script_description = "Select lines which begin while another non-comment line is active" +local tr = aegisub.gettext + +script_name = tr"Select overlaps" +script_description = tr"Select lines which begin while another non-comment line is active" script_author = "Thomas Goyne" script_version = "1" diff --git a/aegisub/automation/autoload/strip-tags.lua b/aegisub/automation/autoload/strip-tags.lua index 594953221..c17fcb654 100644 --- a/aegisub/automation/autoload/strip-tags.lua +++ b/aegisub/automation/autoload/strip-tags.lua @@ -14,8 +14,10 @@ -- -- $Id$ -script_name = "Strip tags" -script_description = "Remove all override tags from selected lines" +local tr = aegisub.gettext + +script_name = tr"Strip tags" +script_description = tr"Remove all override tags from selected lines" script_author = "Thomas Goyne" script_version = "1" @@ -25,7 +27,7 @@ function strip_tags(subs, sel) line.text = line.text:gsub("{[^}]+}", "") subs[i] = line end - aegisub.set_undo_point("Strip tags") + aegisub.set_undo_point(tr"strip tags") end aegisub.register_macro(script_name, script_description, strip_tags)