Субъективный Си / Говнокод #11694 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
- (void)awakeFromNib
{ 
    // ...
    [[_contextMenu itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem1Caption", nil)];
    [[_contextMenu itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem2Caption", nil)];
    [[_contextMenu itemAtIndex:2] setTitle:NSLocalizedString(@"ContextMenuItem3Caption", nil)];
    [[_contextMenu itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem4Caption", nil)];
    [[_contextMenu itemAtIndex:4] setTitle:NSLocalizedString(@"ContextMenuItem5Caption", nil)];
    [[_contextMenu itemAtIndex:5] setTitle:NSLocalizedString(@"ContextMenuItem6Caption", nil)];
    [[_contextMenu itemAtIndex:6] setTitle:NSLocalizedString(@"ContextMenuItem7Caption", nil)];
    [[_contextMenu itemAtIndex:8] setTitle:NSLocalizedString(@"ContextMenuItem8Caption", nil)];
    [[_contextMenu itemAtIndex:10] setTitle:NSLocalizedString(@"ContextMenuItem9Caption", nil)];
    [[_contextMenu itemAtIndex:11] setTitle:NSLocalizedString(@"ContextMenuItem10Caption", nil)];
    [[_contextMenu itemAtIndex:13] setTitle:NSLocalizedString(@"ContextMenuItem11Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem11-1Caption", nil)];         // submenu notices
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem11-2Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:2] setTitle:NSLocalizedString(@"ContextMenuItem11-3Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem11-4Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:4] setTitle:NSLocalizedString(@"ContextMenuItem11-5Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:5] setTitle:NSLocalizedString(@"ContextMenuItem11-6Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:6] setTitle:NSLocalizedString(@"ContextMenuItem11-7Caption", nil)];
    [[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:7] setTitle:NSLocalizedString(@"ContextMenuItem11-8Caption", nil)];
    [[_contextMenu itemAtIndex:14] setTitle:NSLocalizedString(@"ContextMenuItem12Caption", nil)];
    [[[[_contextMenu itemAtIndex:14] submenu] itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem12-1Caption", nil)];
    [[[[_contextMenu itemAtIndex:14] submenu] itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem12-2Caption", nil)];
    [[[[_contextMenu itemAtIndex:14] submenu] itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem12-3Caption", nil)];
    [[_contextMenu itemAtIndex:16] setTitle:NSLocalizedString(@"ContextMenuItem13Caption", nil)];
    [[_contextMenu itemAtIndex:17] setTitle:NSLocalizedString(@"ContextMenuItem14Caption", nil)];
    [[_contextMenu itemAtIndex:18] setTitle:NSLocalizedString(@"ContextMenuItem15Caption", nil)];
    [[_contextMenu itemAtIndex:19] setTitle:NSLocalizedString(@"ContextMenuItem16Caption", nil)];
    [[_contextMenu itemAtIndex:20] setTitle:NSLocalizedString(@"ContextMenuItem17Caption", nil)];
    [[_contextMenu itemAtIndex:21] setTitle:NSLocalizedString(@"ContextMenuItem18Caption", nil)];
    
    [[_contextMenu2 itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem1", nil)];
    [[_contextMenu2 itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem2", nil)];
    [[_contextMenu2 itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem3", nil)];
    [[_contextMenu2 itemAtIndex:4] setTitle:NSLocalizedString(@"ContextMenuItem4", nil)];
    [[_contextMenu2 itemAtIndex:5] setTitle:NSLocalizedString(@"ContextMenuItem5", nil)];
    [[_contextMenu2 itemAtIndex:7] setTitle:NSLocalizedString(@"ContextMenuItem6", nil)];
    [[_contextMenu2 itemAtIndex:8] setTitle:NSLocalizedString(@"ContextMenuItem7", nil)];
    // ...
}

Метод локализации пунктов меню.
Весьма оригинальный.

Запостил: glook glook, (Updated )

Комментарии (1) RSS

  • - Сидим, пьём, а Артур Атарбекович в Лондоне важные переговоры ведёт. Если у него всё получиться, то для нас будет очень хорошо.
    Ответить

Добавить комментарий

Я, guest, находясь в здравом уме и твердой памяти, торжественно заявляю:

    А не использовать ли нам bbcode?


    8