Changes between Version 11 and Version 14 of Ticket #50


Ignore:
Timestamp:
01/11/14 16:49:20 (10 years ago)
Author:
ossi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50

    • Property Status changed from testing to closed
    • Property Keywords commited-mc-4.6 commited-master added
    • Property Branch state changed from to no branch
    • Property Reporter changed from slavazanko to egmont
  • Ticket #50 – Description

    v11 v14  
    77||Release:||current (CVS or snapshot)||Operating System:||GNU/Linux|| 
    88 
    9 Discussion: 
     9Original submission: 
    1010{{{ 
    11 Tue 19 Sep 2006 08:24:44 AM UTC, comment #7: 
     11.mc/history contains headers like this: 
     12[inp Kijelölés ] 
     13[inpÚj könyvtár létrehozása] 
     14and so on... 
    1215 
    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. 
     16Localizing these entries may cause troubles: 
     17- entries in the history are not available if for some reason you  
     18temporarily start mc with another locale 
     19- entries get lost if mc is upgraded and the translators happened  
     20to modify the translation 
    1721 
    18 This patch doesn't attemt to change the section names. However, the  
    19 current choice for section names is really bad, IMHO. Maybe now is  
    20 the time to rename those names for good. I'd like to hear your  
    21 opinion on that matter too. 
    22         Pavel Tsekov <ptsekov> 
    23 Project Administrator 
    24 Wed 13 Sep 2006 01:55:14 PM UTC, comment #6: 
     22Headers in the history file should be fixed (non-translateable)  
     23English strings.  
     24}}} 
    2525 
    26 I think I'll proceed as following: 
     26Comment 1 by Leonard den Ottolander <leonardjo> at Wed 02 Aug 2006 01:18:32 PM UTC: 
     27{{{ 
     28I agree with this. Can you come up with a patch? 
     29}}} 
    2730 
    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. 
     31Comment 2 by Egmont Koblinger <egmont> at Wed 02 Aug 2006 02:09:08 PM UTC: 
     32{{{ 
     33Maybe once... not now, I don't have time for this nowadays. 
     34}}} 
    3635 
    37 2) Next I'll change fg_input_dialog_help() to take a new argument 
    38 - the history section name. Then I will adjust all callers. 
    39         Pavel Tsekov <ptsekov> 
    40 Project Administrator 
    41 Wed 13 Sep 2006 12:38:16 PM UTC, comment #5: 
     36Comment 3 by Pavel Tsekov <ptsekov> at Wed 13 Sep 2006 09:28:22 AM UTC: 
     37{{{ 
     38I looked at that problem and the solution is pretty easy. Still I'd  
     39like to discuss the issue with anyone interested so we can find the  
     40best way to solve the problem. 
    4241 
    43 My last comment may be slightly misleading. To clarify: 
     42Most of the problematic entries are created by an invocation of the  
     43function nice_cd() located in src/cmd.c . Its first argument is a  
     44string to be used as the heading of the dialog. The same string is  
     45also used to form the name of the section in the history file where  
     46entries fed to the input field of the dialog will be stored. A  
     47typical call to nice_cd() looks like this: 
    4448 
    45 nice_cd() and others use fg_input_dialog_help() which takes 
    46 care of displaying the input dialog and derives history file 
    47 section names from the input dialog heading. 
    48         Pavel Tsekov <ptsekov> 
    49 Project Administrator 
    50 Wed 13 Sep 2006 10:00:24 AM UTC, comment #4: 
     49nice_cd (_("Title string"), ...) 
    5150 
     51So as you can see nice_cd() is passed a translated string - this is  
     52why a translated section name is written to the history file.  
     53However this is unnecessary since later the title string is  
     54translated one more time when quick_dialog() is invoked to show the  
     55dialog. So, one way to solve the problem is to change nice_cd()  
     56invocations like this: 
     57 
     58nice_cd (N_("Title string"), ...) 
     59 
     60However, this may not be the best solution since the programmer  
     61must know that it should call nice_cd () with N_() instead of _().  
     62So, maybe a better way to solve the problem would be to add 
     63 
     64a new argument to nice_cd() which will hold the history section name. 
     65 
     66Any thoughts ? 
     67}}} 
     68 
     69Comment 4 by Egmont Koblinger <egmont> at Wed 13 Sep 2006 10:00:24 AM UTC: 
     70{{{ 
    5271Localizing an already localized string definitely shows wrong  
    5372design. Theoretically it can lead to false strings appearing on the  
     
    88107 
    89108So, I recommend making both changes :-) 
    90         Egmont Koblinger <egmont> 
    91 Wed 13 Sep 2006 09:28:22 AM UTC, comment #3: 
     109}}} 
    92110 
    93 I looked at that problem and the solution is pretty easy. Still I'd  
    94 like to discuss the issue with anyone interested so we can find the  
    95 best way to solve the problem. 
     111Comment 5 by Pavel Tsekov <ptsekov> at Wed 13 Sep 2006 12:38:16 PM UTC: 
     112{{{ 
     113My last comment may be slightly misleading. To clarify: 
    96114 
    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: 
     115nice_cd() and others use fg_input_dialog_help() which takes 
     116care of displaying the input dialog and derives history file 
     117section names from the input dialog heading. 
     118}}} 
    103119 
    104 nice_cd (_("Title string"), ...) 
     120Comment 6 by Pavel Tsekov <ptsekov> at Wed 13 Sep 2006 01:55:14 PM UTC: 
     121{{{ 
     122I think I'll proceed as following: 
    105123 
    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: 
     1241) Currently fg_input_dialog_help() assumes that it is passed  
     125translated strings. I won't change that because some of the callers  
     126pass as an argument a string which is the result of sprintf() on  
     127translated template string. However, I'll change 
     128fg_input_dialog_help() to prevent the translation of the already  
     129translated strings. Additionally I'll add comments to indicate that  
     130fg_input_dialog_help() and any wrappers must take translated  
     131strings. 
    112132 
    113 nice_cd (N_("Title string"), ...) 
     1332) Next I'll change fg_input_dialog_help() to take a new argument 
     134- the history section name. Then I will adjust all callers. 
     135}}} 
    114136 
    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 
     137Comment 7 by Pavel Tsekov <ptsekov> at Tue 19 Sep 2006 08:24:44 AM UTC: 
     138{{{ 
     139I am attaching a patch which adds a new argument to  
     140fg_input_dialog_help() - the history section name. I've adjusted  
     141all callers (hopefully) to pass the new argument. Please, test the  
     142patch. The patch should be applied against latest CVS. 
    118143 
    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.  
     144This patch doesn't attemt to change the section names. However, the  
     145current choice for section names is really bad, IMHO. Maybe now is  
     146the time to rename those names for good. I'd like to hear your  
     147opinion on that matter too. 
    148148}}} 
    149149