Ticket #397: Q_.diff

File Q_.diff, 3.3 KB (added by dmartina, 10 years ago)

Use context for indicator translations.

  • src/screen.c

    old new panel_field_t panel_fields [] = { 
    435435    { 
    436436        "unsorted", 12, 1, J_LEFT_FIT, 
    437437        /* TRANSLATORS: one single character to represent 'unsorted' sort mode  */ 
    438         N_("u"), 
     438        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     439        N_("sort|u"), 
    439440        N_("Unsorted"), N_("&Unsorted"), FALSE, 
    440441        string_file_name, 
    441442        (sortfn *) unsorted 
    panel_field_t panel_fields [] = { 
    443444    { 
    444445        "name", 12, 1, J_LEFT_FIT, 
    445446        /* TRANSLATORS: one single character to represent 'name' sort mode  */ 
    446         N_("n"), 
     447        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     448        N_("sort|n"), 
    447449        N_("Name"), N_("&Name"), TRUE, 
    448450        string_file_name, 
    449451        (sortfn *) sort_name 
    panel_field_t panel_fields [] = { 
    451453    { 
    452454        "extension", 12, 1, J_LEFT_FIT, 
    453455        /* TRANSLATORS: one single character to represent 'extension' sort mode  */ 
    454         N_("e"), 
     456        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     457        N_("sort|e"), 
    455458        N_("Extension"), N_("&Extension"), FALSE, 
    456459        string_file_name, /* TODO: string_file_ext*/ 
    457460        (sortfn *) sort_ext 
    panel_field_t panel_fields [] = { 
    459462    { 
    460463        "size", 7,  0, J_RIGHT, 
    461464        /* TRANSLATORS: one single character to represent 'size' sort mode  */ 
    462         N_("s"), 
     465        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     466        N_("sort|s"), 
    463467        N_("Size"), N_("&Size"), TRUE, 
    464468        string_file_size, 
    465469        (sortfn *) sort_size 
    panel_field_t panel_fields [] = { 
    481485    { 
    482486        "mtime", 12, 0, J_RIGHT, 
    483487        /* TRANSLATORS: one single character to represent 'Modify time' sort mode  */ 
    484         N_("m"), 
     488        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     489        N_("sort|m"), 
    485490        N_("MTime"), N_("&Modify time"), TRUE, 
    486491        string_file_mtime, 
    487492        (sortfn *) sort_time 
    panel_field_t panel_fields [] = { 
    489494    { 
    490495        "atime", 12, 0, J_RIGHT, 
    491496        /* TRANSLATORS: one single character to represent 'Access time' sort mode  */ 
    492         N_("a"), 
     497        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     498        N_("sort|a"), 
    493499        N_("ATime"), N_("&Access time"), TRUE, 
    494500        string_file_atime, 
    495501        (sortfn *) sort_atime 
    panel_field_t panel_fields [] = { 
    497503    { 
    498504        "ctime", 12, 0, J_RIGHT, 
    499505        /* TRANSLATORS: one single character to represent 'Change time' sort mode  */ 
    500         N_("h"), 
     506        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     507        N_("sort|h"), 
    501508        N_("CTime"), N_("C&Hange time"), TRUE, 
    502509        string_file_ctime, 
    503510        (sortfn *) sort_ctime 
    panel_field_t panel_fields [] = { 
    525532    { 
    526533        "inode", 5,  0, J_RIGHT, 
    527534        /* TRANSLATORS: one single character to represent 'inode' sort mode  */ 
    528         N_("i"), 
     535        /* TRANSLATORS: no need to translate 'sort', it's just a context prefix  */ 
     536        N_("sort|i"), 
    529537        N_("Inode"), N_("&Inode"), TRUE, 
    530538        string_inode, 
    531539        (sortfn *) sort_inode 
    panel_paint_sort_info(WPanel *panel) 
    13491357    if (*panel->current_sort_field->hotkey == '\0') 
    13501358        return; 
    13511359 
    1352     str = g_strdup_printf("%s%s",sort_sign, _(panel->current_sort_field->hotkey)); 
     1360    str = g_strdup_printf("%s%s",sort_sign, Q_(panel->current_sort_field->hotkey)); 
    13531361 
    13541362    widget_move (&panel->widget, 1, 1); 
    13551363    tty_print_string (str);