13 | | I am attaching a patch which adds a new argument to |
14 | | fg_input_dialog_help() - the history section name. I've adjusted |
15 | | all callers (hopefully) to pass the new argument. Please, test the |
16 | | patch. The patch should be applied against latest CVS. |
| 16 | Localizing these entries may cause troubles: |
| 17 | - entries in the history are not available if for some reason you |
| 18 | temporarily start mc with another locale |
| 19 | - entries get lost if mc is upgraded and the translators happened |
| 20 | to modify the translation |
28 | | 1) Currently fg_input_dialog_help() assumes that it is passed |
29 | | translated strings. I won't change that because some of the callers |
30 | | pass as an argument a string which is the result of sprintf() on |
31 | | translated template string. However, I'll change |
32 | | fg_input_dialog_help() to prevent the translation of the already |
33 | | translated strings. Additionally I'll add comments to indicate that |
34 | | fg_input_dialog_help() and any wrappers must take translated |
35 | | strings. |
| 31 | Comment 2 by Egmont Koblinger <egmont> at Wed 02 Aug 2006 02:09:08 PM UTC: |
| 32 | {{{ |
| 33 | Maybe once... not now, I don't have time for this nowadays. |
| 34 | }}} |
| 51 | So as you can see nice_cd() is passed a translated string - this is |
| 52 | why a translated section name is written to the history file. |
| 53 | However this is unnecessary since later the title string is |
| 54 | translated one more time when quick_dialog() is invoked to show the |
| 55 | dialog. So, one way to solve the problem is to change nice_cd() |
| 56 | invocations like this: |
| 57 | |
| 58 | nice_cd (N_("Title string"), ...) |
| 59 | |
| 60 | However, this may not be the best solution since the programmer |
| 61 | must know that it should call nice_cd () with N_() instead of _(). |
| 62 | So, maybe a better way to solve the problem would be to add |
| 63 | |
| 64 | a new argument to nice_cd() which will hold the history section name. |
| 65 | |
| 66 | Any thoughts ? |
| 67 | }}} |
| 68 | |
| 69 | Comment 4 by Egmont Koblinger <egmont> at Wed 13 Sep 2006 10:00:24 AM UTC: |
| 70 | {{{ |
97 | | Most of the problematic entries are created by an invocation of the |
98 | | function nice_cd() located in src/cmd.c . Its first argument is a |
99 | | string to be used as the heading of the dialog. The same string is |
100 | | also used to form the name of the section in the history file where |
101 | | entries fed to the input field of the dialog will be stored. A |
102 | | typical call to nice_cd() looks like this: |
| 115 | nice_cd() and others use fg_input_dialog_help() which takes |
| 116 | care of displaying the input dialog and derives history file |
| 117 | section names from the input dialog heading. |
| 118 | }}} |
106 | | So as you can see nice_cd() is passed a translated string - this is |
107 | | why a translated section name is written to the history file. |
108 | | However this is unnecessary since later the title string is |
109 | | translated one more time when quick_dialog() is invoked to show the |
110 | | dialog. So, one way to solve the problem is to change nice_cd() |
111 | | invocations like this: |
| 124 | 1) Currently fg_input_dialog_help() assumes that it is passed |
| 125 | translated strings. I won't change that because some of the callers |
| 126 | pass as an argument a string which is the result of sprintf() on |
| 127 | translated template string. However, I'll change |
| 128 | fg_input_dialog_help() to prevent the translation of the already |
| 129 | translated strings. Additionally I'll add comments to indicate that |
| 130 | fg_input_dialog_help() and any wrappers must take translated |
| 131 | strings. |
115 | | However, this may not be the best solution since the programmer |
116 | | must know that it should call nice_cd () with N_() instead of _(). |
117 | | So, maybe a better way to solve the problem would be to add |
| 137 | Comment 7 by Pavel Tsekov <ptsekov> at Tue 19 Sep 2006 08:24:44 AM UTC: |
| 138 | {{{ |
| 139 | I am attaching a patch which adds a new argument to |
| 140 | fg_input_dialog_help() - the history section name. I've adjusted |
| 141 | all callers (hopefully) to pass the new argument. Please, test the |
| 142 | patch. The patch should be applied against latest CVS. |
119 | | a new argument to nice_cd() which will hold the history section name. |
120 | | |
121 | | Any thoughts ? |
122 | | Pavel Tsekov <ptsekov> |
123 | | Project Administrator |
124 | | Wed 02 Aug 2006 02:09:08 PM UTC, comment #2: |
125 | | |
126 | | Maybe once... not now, I don't have time for this nowadays. |
127 | | Egmont Koblinger <egmont> |
128 | | Wed 02 Aug 2006 01:18:32 PM UTC, comment #1: |
129 | | |
130 | | I agree with this. Can you come up with a patch? |
131 | | Leonard den Ottolander <leonardjo> |
132 | | Project Member |
133 | | Wed 02 Aug 2006 12:48:15 PM UTC, original submission: |
134 | | |
135 | | .mc/history contains headers like this: |
136 | | [inp Kijelölés ] |
137 | | [inpÚj könyvtár létrehozása] |
138 | | and so on... |
139 | | |
140 | | Localizing these entries may cause troubles: |
141 | | - entries in the history are not available if for some reason you |
142 | | temporarily start mc with another locale |
143 | | - entries get lost if mc is upgraded and the translators happened |
144 | | to modify the translation |
145 | | |
146 | | Headers in the history file should be fixed (non-translateable) |
147 | | English strings. |
| 144 | This patch doesn't attemt to change the section names. However, the |
| 145 | current choice for section names is really bad, IMHO. Maybe now is |
| 146 | the time to rename those names for good. I'd like to hear your |
| 147 | opinion on that matter too. |