[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: [kate] [Bug 313809] pate plugin: i18n calls for a lot of strings from python files are missing
From:       Shaheed Haque <srhaque () theiet ! org>
Date:       2013-11-25 20:00:26
Message-ID: CAHAc2jd7EYi8wZuHhB7Gr2hgOh7e2vnNDHx=nMizj-bc21R6iQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Dear Pate plugin developers,

We need to get into the habit of ensuring the KDE i18n() rules are followed
to allow the translators to do their job! Please see the attached note from
Burkhard and take cae of the stuff you own in master (4.12 is done and
dusted).

This was always a bit tricky with the old way of doing things, but AFAIK,
the work that Alex has done in terms of using .ui files and .desktop files
should greatly simplify and clarify what is needed. If you are unclear as
to what is needed, please feel free to ask (I'm not an expert, but I'm sure
that won't be a barrier :-)).

(BTW, Burkhard, the last 3 items which you mentioned are pending
review/removal in master, that's why I have not applied the fixes form 4.12
to them).

Thanks, Shaheed


On 25 November 2013 12:48, Burkhard Lueck <lueck@hube-lueck.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=313809
>
> Burkhard Lueck <lueck@hube-lueck.de> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|RESOLVED                    |REOPENED
>          Resolution|FIXED                       |---
>
> --- Comment #37 from Burkhard Lueck <lueck@hube-lueck.de> ---
> No this is NOT resolved, these strings are translatable in 4.12, but not
> extracted and untranslatable in master now:
>
> ./plugins/block_ui.rc:13:                <Action
> name="insertCharFromLineAbove"
> text="Insert Char From Line Above" shortcut="Meta+E" />
> ./plugins/block_ui.rc:14:                <Action
> name="insertCharFromLineBelow"
> text="Insert Char From Line Below" shortcut="Meta+W" />
> ./plugins/block_ui.rc:16:                <Action name="killRestOfLine"
> text="Kill Text After Cursor" shortcut="Meta+K" />
> ./plugins/block_ui.rc:17:                <Action name="killLeadOfLine"
> text="Kill Text Before Cursor" shortcut="Meta+U" />
> ./plugins/block_ui.rc:19:                <Action
> name="wrapBlockWithRoundBrackets" text="Wrap into Round Brackets"
> shortcut="Ctrl+(" />
> ./plugins/block_ui.rc:20:                <Action
> name="wrapBlockWithSquareBrackets" text="Wrap into Square Brackets"
> shortcut="Ctrl+{" />
> ./plugins/block_ui.rc:21:                <Action
> name="wrapBlockWithCurveBrackets" text="Wrap into Curve Brackets"
> shortcut="Meta+{" />
> ./plugins/block_ui.rc:22:                <Action
> name="wrapBlockWithAngleBrackets" text="Wrap into Angle Brackets"
> shortcut="Ctrl+&lt;" />
> ./plugins/block_ui.rc:23:                <Action
> name="wrapBlockWithDblQuotes"
> text="Wrap into Double Quotes" shortcut="Ctrl+'" />
> ./plugins/block_ui.rc:24:                <Action name="wrapBlockWithQuotes"
> text="Wrap into Quotes" shortcut="Meta+'" />
> ./plugins/js_utils/js_utils_ui.rc:11:            <Action
> name="lint_js_action"
> text="Lint JavaScript" shortcut="Alt+9" />
> ./plugins/js_utils/js_utils_ui.rc:12:            <Action
> name="insert_jquery_ready_action" text="jQuery Ready"
> shortcut="Ctrl+Shift+J"
> />
> ./plugins/js_utils/js_utils_ui.rc:13:            <Action
> name="prettify_JSON_action" text="Prettify JSON" shortcut="Ctrl+Alt+J" />
> ./plugins/commentar_ui.rc:14:                <Action name="inline_comment"
> text="Inline Comment" shortcut="Alt+D" />
> ./plugins/commentar_ui.rc:15:                <Action name="move_above"
> text="Move Comment Above" shortcut="Meta+Left" />
> ./plugins/commentar_ui.rc:16:                <Action name="move_inline"
> text="Move Comment Inline" shortcut="Meta+Right" />
> ./plugins/commentar_ui.rc:18:                <Action name="comment_block"
> text="Comment Block with #if0" shortcut="Meta+D" />
> ./plugins/commentar_ui.rc:19:                <Action name="toggle_block"
> text="Toggle #if0/#if1 Block" shortcut="Meta+Shift+D" />
> ./plugins/commentar_ui.rc:20:                <Action name="remove_block"
> text="Remove #if0/#if1 Block" shortcut="Meta+R" />
> ./plugins/commentar_ui.rc:21:                <Action name="select_block"
> text="Select Current #if0/#if1 Block" shortcut="Meta+S" />
> ./plugins/commentar_ui.rc:23:                <Action
> name="toggle_doxy_comment"
> text="Transform Doxygen Comments" shortcut="Meta+X" />
> ./plugins/commentar_ui.rc:25:                <Action
> name="shrink_paragraph"
> text="Shrink Comment Paragraph" shortcut="Meta+[" />
> ./plugins/commentar_ui.rc:26:                <Action
> name="extend_paragraph"
> text="Extend Comment Paragraph" shortcut="Meta+]" />
> ./plugins/gid/gid_ui.rc:12:            <Action name="show" text="Browse
> Tokens"
> shortcut="Alt+1" icon="edit-find" />
> ./plugins/gid/gid_ui.rc:13:            <Action name="lookup" text="Lookup
> Current Token" shortcut="Alt+2" icon="edit-find" />
> ./plugins/gid/gid_ui.rc:14:            <Action name="gotoDefinition"
> text="Go
> to Definition" shortcut="Alt+3" icon="go-jump-definition" />
> ./plugins/expand_ui.rc:12:            <Action name="expandAtCursor"
> text="Expand" shortcut="Ctrl+E" group="bottom_tools_operations" />
> ./plugins/expand_ui.rc:13:            <Action
> name="getHelpOnExpandAtCursor"
> text="Expand Usage" shortcut="Shift+Ctrl+E"
> group="bottom_tools_operations" />
> ./plugins/xml_pretty_ui.rc:11:            <Action name="prettyXMLFormat"
> text="Pretty XML" shortcut="Ctrl+Alt+X" />
> ./ui.rc:16:            <Action name="about_pate" text="About Pate"
> icon="python" />
>
>
> And some more missing i18n() calls in master:
>
> $ git diff plugins/
> diff --git a/addons/kate/pate/src/plugins/python_utils/python_settings.py
> b/addons/kate/pate/src/plugins/python_utils/python_settings.py
> index e0b2e40..aae6c4c 100644
> --- a/addons/kate/pate/src/plugins/python_utils/python_settings.py
> +++ b/addons/kate/pate/src/plugins/python_utils/python_settings.py
> @@ -23,7 +23,7 @@ PY_MENU = "Python"
>  PY_CHECKERS = i18n("Checkers")
>
>  KATE_ACTIONS = {
> -    'insertIPDB': {'text': 'ipdb', 'shortcut': 'Ctrl+I',
> +    'insertIPDB': {'text': i18n('ipdb'), 'shortcut': 'Ctrl+I',
>                     'menu': PY_MENU, 'icon': 'tools-report-bug'},
>      'insertInit': {'text': i18n('__init__ method'), 'shortcut': 'Ctrl+,',
>                     'menu': PY_MENU, 'icon': None},
> @@ -33,11 +33,11 @@ KATE_ACTIONS = {
>                        'menu': PY_MENU, 'icon': None},
>      'checkAll': {'text': i18n('Check all'), 'shortcut': 'Alt+5',
>                   'menu': PY_CHECKERS, 'icon': None},
> -    'checkPyflakes': {'text': 'Pyflakes', 'shortcut': 'Alt+7',
> +    'checkPyflakes': {'text': i18n('Pyflakes'), 'shortcut': 'Alt+7',
>                        'menu': PY_CHECKERS, 'icon': None},
>      'parseCode': {'text': i18n('Syntax Errors'), 'shortcut': 'Alt+6',
>                    'menu': PY_CHECKERS, 'icon': None},
> -    'checkPep8': {'text': 'Pep8', 'shortcut': 'Alt+8',
> +    'checkPep8': {'text': i18n('Pep8'), 'shortcut': 'Alt+8',
>                    'menu': PY_CHECKERS, 'icon': None},
>  }
>
> diff --git a/addons/kate/pate/src/plugins/xml_pretty.py
> b/addons/kate/pate/src/plugins/xml_pretty.py
> index 5ef2180..99f5be6 100644
> --- a/addons/kate/pate/src/plugins/xml_pretty.py
> +++ b/addons/kate/pate/src/plugins/xml_pretty.py
> @@ -38,7 +38,7 @@ from libkatepate.decorators import *
>
>
>  KATE_CONFIG = {'name': 'XML Pretty',
> -               'fullName': 'XML Pretty',
> +               'fullName': i18n('XML Pretty'),
>                 'icon': 'text-xml'}
>
>  _CONFIG_UI = 'xml_pretty.ui'
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>

[Attachment #5 (text/html)]

<div dir="ltr">Dear Pate plugin developers,<div><br></div><div>We need to get into \
the habit of ensuring the KDE i18n() rules are followed to allow the translators to \
do their job! Please see the attached note from Burkhard and take cae of the stuff \
you own in master (4.12 is done and dusted).</div> <div><br></div><div>This was \
always a bit tricky with the old way of doing things, but AFAIK, the work that Alex \
has done in terms of using .ui files and .desktop files should greatly simplify and \
clarify what is needed. If you are unclear as to what is needed, please feel free to \
ask (I&#39;m not an expert, but I&#39;m sure that won&#39;t be a barrier :-)).</div> \
<div><br></div><div>(BTW, Burkhard, the last 3 items which you mentioned are pending \
review/removal in master, that&#39;s why I have not applied the fixes form 4.12 to \
them).</div><div><br></div><div>Thanks, Shaheed</div> <div \
class="gmail_extra"><br><br><div class="gmail_quote">On 25 November 2013 12:48, \
Burkhard Lueck <span dir="ltr">&lt;<a href="mailto:lueck@hube-lueck.de" \
target="_blank">lueck@hube-lueck.de</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <a href="https://bugs.kde.org/show_bug.cgi?id=313809" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=313809</a><br> <br>
Burkhard Lueck &lt;<a href="mailto:lueck@hube-lueck.de">lueck@hube-lueck.de</a>&gt; \
changed:<br> <br>
                 What      |Removed                               |Added<br>
----------------------------------------------------------------------------<br>
                    Status|RESOLVED                              |REOPENED<br>
              Resolution|FIXED                                  |---<br>
<br>
--- Comment #37 from Burkhard Lueck &lt;<a \
href="mailto:lueck@hube-lueck.de">lueck@hube-lueck.de</a>&gt; ---<br> No this is NOT \
resolved, these strings are translatable in 4.12, but not<br> extracted and \
untranslatable in master now:<br> <br>
./plugins/block_ui.rc:13:                        &lt;Action \
name=&quot;insertCharFromLineAbove&quot;<br> text=&quot;Insert Char From Line \
                Above&quot; shortcut=&quot;Meta+E&quot; /&gt;<br>
./plugins/block_ui.rc:14:                        &lt;Action \
name=&quot;insertCharFromLineBelow&quot;<br> text=&quot;Insert Char From Line \
                Below&quot; shortcut=&quot;Meta+W&quot; /&gt;<br>
./plugins/block_ui.rc:16:                        &lt;Action \
name=&quot;killRestOfLine&quot;<br> text=&quot;Kill Text After Cursor&quot; \
                shortcut=&quot;Meta+K&quot; /&gt;<br>
./plugins/block_ui.rc:17:                        &lt;Action \
name=&quot;killLeadOfLine&quot;<br> text=&quot;Kill Text Before Cursor&quot; \
                shortcut=&quot;Meta+U&quot; /&gt;<br>
./plugins/block_ui.rc:19:                        &lt;Action<br>
name=&quot;wrapBlockWithRoundBrackets&quot; text=&quot;Wrap into Round \
Brackets&quot;<br> shortcut=&quot;Ctrl+(&quot; /&gt;<br>
./plugins/block_ui.rc:20:                        &lt;Action<br>
name=&quot;wrapBlockWithSquareBrackets&quot; text=&quot;Wrap into Square \
Brackets&quot;<br> shortcut=&quot;Ctrl+{&quot; /&gt;<br>
./plugins/block_ui.rc:21:                        &lt;Action<br>
name=&quot;wrapBlockWithCurveBrackets&quot; text=&quot;Wrap into Curve \
Brackets&quot;<br> shortcut=&quot;Meta+{&quot; /&gt;<br>
./plugins/block_ui.rc:22:                        &lt;Action<br>
name=&quot;wrapBlockWithAngleBrackets&quot; text=&quot;Wrap into Angle \
Brackets&quot;<br> shortcut=&quot;Ctrl+&amp;lt;&quot; /&gt;<br>
./plugins/block_ui.rc:23:                        &lt;Action \
name=&quot;wrapBlockWithDblQuotes&quot;<br> text=&quot;Wrap into Double Quotes&quot; \
                shortcut=&quot;Ctrl+&#39;&quot; /&gt;<br>
./plugins/block_ui.rc:24:                        &lt;Action \
name=&quot;wrapBlockWithQuotes&quot;<br> text=&quot;Wrap into Quotes&quot; \
                shortcut=&quot;Meta+&#39;&quot; /&gt;<br>
./plugins/js_utils/js_utils_ui.rc:11:                  &lt;Action \
name=&quot;lint_js_action&quot;<br> text=&quot;Lint JavaScript&quot; \
                shortcut=&quot;Alt+9&quot; /&gt;<br>
./plugins/js_utils/js_utils_ui.rc:12:                  &lt;Action<br>
name=&quot;insert_jquery_ready_action&quot; text=&quot;jQuery Ready&quot; \
shortcut=&quot;Ctrl+Shift+J&quot;<br> /&gt;<br>
./plugins/js_utils/js_utils_ui.rc:13:                  &lt;Action<br>
name=&quot;prettify_JSON_action&quot; text=&quot;Prettify JSON&quot; \
                shortcut=&quot;Ctrl+Alt+J&quot; /&gt;<br>
./plugins/commentar_ui.rc:14:                        &lt;Action \
name=&quot;inline_comment&quot;<br> text=&quot;Inline Comment&quot; \
                shortcut=&quot;Alt+D&quot; /&gt;<br>
./plugins/commentar_ui.rc:15:                        &lt;Action \
name=&quot;move_above&quot;<br> text=&quot;Move Comment Above&quot; \
                shortcut=&quot;Meta+Left&quot; /&gt;<br>
./plugins/commentar_ui.rc:16:                        &lt;Action \
name=&quot;move_inline&quot;<br> text=&quot;Move Comment Inline&quot; \
                shortcut=&quot;Meta+Right&quot; /&gt;<br>
./plugins/commentar_ui.rc:18:                        &lt;Action \
name=&quot;comment_block&quot;<br> text=&quot;Comment Block with #if0&quot; \
                shortcut=&quot;Meta+D&quot; /&gt;<br>
./plugins/commentar_ui.rc:19:                        &lt;Action \
name=&quot;toggle_block&quot;<br> text=&quot;Toggle #if0/#if1 Block&quot; \
                shortcut=&quot;Meta+Shift+D&quot; /&gt;<br>
./plugins/commentar_ui.rc:20:                        &lt;Action \
name=&quot;remove_block&quot;<br> text=&quot;Remove #if0/#if1 Block&quot; \
                shortcut=&quot;Meta+R&quot; /&gt;<br>
./plugins/commentar_ui.rc:21:                        &lt;Action \
name=&quot;select_block&quot;<br> text=&quot;Select Current #if0/#if1 Block&quot; \
                shortcut=&quot;Meta+S&quot; /&gt;<br>
./plugins/commentar_ui.rc:23:                        &lt;Action \
name=&quot;toggle_doxy_comment&quot;<br> text=&quot;Transform Doxygen Comments&quot; \
                shortcut=&quot;Meta+X&quot; /&gt;<br>
./plugins/commentar_ui.rc:25:                        &lt;Action \
name=&quot;shrink_paragraph&quot;<br> text=&quot;Shrink Comment Paragraph&quot; \
                shortcut=&quot;Meta+[&quot; /&gt;<br>
./plugins/commentar_ui.rc:26:                        &lt;Action \
name=&quot;extend_paragraph&quot;<br> text=&quot;Extend Comment Paragraph&quot; \
                shortcut=&quot;Meta+]&quot; /&gt;<br>
./plugins/gid/gid_ui.rc:12:                  &lt;Action name=&quot;show&quot; \
text=&quot;Browse Tokens&quot;<br> shortcut=&quot;Alt+1&quot; \
                icon=&quot;edit-find&quot; /&gt;<br>
./plugins/gid/gid_ui.rc:13:                  &lt;Action name=&quot;lookup&quot; \
text=&quot;Lookup<br> Current Token&quot; shortcut=&quot;Alt+2&quot; \
                icon=&quot;edit-find&quot; /&gt;<br>
./plugins/gid/gid_ui.rc:14:                  &lt;Action \
name=&quot;gotoDefinition&quot; text=&quot;Go<br> to Definition&quot; \
                shortcut=&quot;Alt+3&quot; icon=&quot;go-jump-definition&quot; \
                /&gt;<br>
./plugins/expand_ui.rc:12:                  &lt;Action \
name=&quot;expandAtCursor&quot;<br> text=&quot;Expand&quot; \
                shortcut=&quot;Ctrl+E&quot; group=&quot;bottom_tools_operations&quot; \
                /&gt;<br>
./plugins/expand_ui.rc:13:                  &lt;Action \
name=&quot;getHelpOnExpandAtCursor&quot;<br> text=&quot;Expand Usage&quot; \
                shortcut=&quot;Shift+Ctrl+E&quot; \
                group=&quot;bottom_tools_operations&quot; /&gt;<br>
./plugins/xml_pretty_ui.rc:11:                  &lt;Action \
name=&quot;prettyXMLFormat&quot;<br> text=&quot;Pretty XML&quot; \
                shortcut=&quot;Ctrl+Alt+X&quot; /&gt;<br>
./ui.rc:16:                  &lt;Action name=&quot;about_pate&quot; text=&quot;About \
Pate&quot;<br> icon=&quot;python&quot; /&gt;<br>
<br>
<br>
And some more missing i18n() calls in master:<br>
<br>
$ git diff plugins/<br>
diff --git a/addons/kate/pate/src/plugins/python_utils/python_settings.py<br>
b/addons/kate/pate/src/plugins/python_utils/python_settings.py<br>
index e0b2e40..aae6c4c 100644<br>
--- a/addons/kate/pate/src/plugins/python_utils/python_settings.py<br>
+++ b/addons/kate/pate/src/plugins/python_utils/python_settings.py<br>
@@ -23,7 +23,7 @@ PY_MENU = &quot;Python&quot;<br>
  PY_CHECKERS = i18n(&quot;Checkers&quot;)<br>
<br>
  KATE_ACTIONS = {<br>
-      &#39;insertIPDB&#39;: {&#39;text&#39;: &#39;ipdb&#39;, &#39;shortcut&#39;: \
&#39;Ctrl+I&#39;,<br> +      &#39;insertIPDB&#39;: {&#39;text&#39;: \
                i18n(&#39;ipdb&#39;), &#39;shortcut&#39;: &#39;Ctrl+I&#39;,<br>
                              &#39;menu&#39;: PY_MENU, &#39;icon&#39;: \
                &#39;tools-report-bug&#39;},<br>
        &#39;insertInit&#39;: {&#39;text&#39;: i18n(&#39;__init__ method&#39;), \
                &#39;shortcut&#39;: &#39;Ctrl+,&#39;,<br>
                              &#39;menu&#39;: PY_MENU, &#39;icon&#39;: None},<br>
@@ -33,11 +33,11 @@ KATE_ACTIONS = {<br>
                                   &#39;menu&#39;: PY_MENU, &#39;icon&#39;: \
                None},<br>
        &#39;checkAll&#39;: {&#39;text&#39;: i18n(&#39;Check all&#39;), \
                &#39;shortcut&#39;: &#39;Alt+5&#39;,<br>
                           &#39;menu&#39;: PY_CHECKERS, &#39;icon&#39;: None},<br>
-      &#39;checkPyflakes&#39;: {&#39;text&#39;: &#39;Pyflakes&#39;, \
&#39;shortcut&#39;: &#39;Alt+7&#39;,<br> +      &#39;checkPyflakes&#39;: \
                {&#39;text&#39;: i18n(&#39;Pyflakes&#39;), &#39;shortcut&#39;: \
                &#39;Alt+7&#39;,<br>
                                   &#39;menu&#39;: PY_CHECKERS, &#39;icon&#39;: \
                None},<br>
        &#39;parseCode&#39;: {&#39;text&#39;: i18n(&#39;Syntax Errors&#39;), \
                &#39;shortcut&#39;: &#39;Alt+6&#39;,<br>
                             &#39;menu&#39;: PY_CHECKERS, &#39;icon&#39;: None},<br>
-      &#39;checkPep8&#39;: {&#39;text&#39;: &#39;Pep8&#39;, &#39;shortcut&#39;: \
&#39;Alt+8&#39;,<br> +      &#39;checkPep8&#39;: {&#39;text&#39;: \
                i18n(&#39;Pep8&#39;), &#39;shortcut&#39;: &#39;Alt+8&#39;,<br>
                             &#39;menu&#39;: PY_CHECKERS, &#39;icon&#39;: None},<br>
  }<br>
<br>
diff --git a/addons/kate/pate/src/plugins/xml_pretty.py<br>
b/addons/kate/pate/src/plugins/xml_pretty.py<br>
index 5ef2180..99f5be6 100644<br>
--- a/addons/kate/pate/src/plugins/xml_pretty.py<br>
+++ b/addons/kate/pate/src/plugins/xml_pretty.py<br>
@@ -38,7 +38,7 @@ from libkatepate.decorators import *<br>
<br>
<br>
  KATE_CONFIG = {&#39;name&#39;: &#39;XML Pretty&#39;,<br>
-                      &#39;fullName&#39;: &#39;XML Pretty&#39;,<br>
+                      &#39;fullName&#39;: i18n(&#39;XML Pretty&#39;),<br>
                        &#39;icon&#39;: &#39;text-xml&#39;}<br>
<br>
  _CONFIG_UI = &#39;xml_pretty.ui&#39;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
You are receiving this mail because:<br>
You are on the CC list for the bug.<br>
</font></span></blockquote></div><br></div></div>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic