~unity-team/unity-lens-files/browse-in-nautilus

« back to all changes in this revision

Viewing changes to src/daemon.vala

  • Committer: Mikkel Kamstrup Erlandsen
  • Date: 2010-08-23 14:48:46 UTC
  • mfrom: (73.1.3 i18n)
  • Revision ID: mikkel.kamstrup@gmail.com-20100823144846-u18j9ojqylquk2i8
Merge Mikkel's branch lp:~unity-team/unity-place-files/i18n:

 * Add i18n support

 * Mark all user visible strings for translation

 * Make distcheck pass

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
          sections.clear ();
274
274
        }
275
275
 
276
 
      sections.append (SectionsColumn.DISPLAY_NAME, "All Files",
277
 
                       SectionsColumn.ICON_HINT, "", -1);
278
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Documents",
279
 
                       SectionsColumn.ICON_HINT, "", -1);
280
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Folders",
281
 
                       SectionsColumn.ICON_HINT, "", -1);
282
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Images",
283
 
                       SectionsColumn.ICON_HINT, "", -1);
284
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Audio",
285
 
                       SectionsColumn.ICON_HINT, "", -1);
286
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Videos",
287
 
                       SectionsColumn.ICON_HINT, "", -1);
288
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Presentations",
289
 
                       SectionsColumn.ICON_HINT, "", -1);
290
 
      sections.append (SectionsColumn.DISPLAY_NAME, "Other",
 
276
      sections.append (SectionsColumn.DISPLAY_NAME, _("All Files"),
 
277
                       SectionsColumn.ICON_HINT, "", -1);
 
278
      sections.append (SectionsColumn.DISPLAY_NAME, _("Documents"),
 
279
                       SectionsColumn.ICON_HINT, "", -1);
 
280
      sections.append (SectionsColumn.DISPLAY_NAME, _("Folders"),
 
281
                       SectionsColumn.ICON_HINT, "", -1);
 
282
      sections.append (SectionsColumn.DISPLAY_NAME, _("Images"),
 
283
                       SectionsColumn.ICON_HINT, "", -1);
 
284
      sections.append (SectionsColumn.DISPLAY_NAME, _("Audio"),
 
285
                       SectionsColumn.ICON_HINT, "", -1);
 
286
      sections.append (SectionsColumn.DISPLAY_NAME, _("Videos"),
 
287
                       SectionsColumn.ICON_HINT, "", -1);
 
288
      sections.append (SectionsColumn.DISPLAY_NAME, _("Presentations"),
 
289
                       SectionsColumn.ICON_HINT, "", -1);
 
290
      sections.append (SectionsColumn.DISPLAY_NAME, _("Other"),
291
291
                       SectionsColumn.ICON_HINT, "", -1);
292
292
    }
293
293
 
306
306
                                          @"$((uint)Group.FAVORITE_FOLDERS)");
307
307
 
308
308
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
309
 
                     GroupsColumn.DISPLAY_NAME, "Top Results",
310
 
                     GroupsColumn.ICON_HINT, "", -1);
311
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
312
 
                     GroupsColumn.DISPLAY_NAME, "Recent",
313
 
                     GroupsColumn.ICON_HINT, "", -1);
314
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
315
 
                     GroupsColumn.DISPLAY_NAME, "Downloads",
316
 
                     GroupsColumn.ICON_HINT, "", -1);
317
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
318
 
                     GroupsColumn.DISPLAY_NAME, "Favorite Folders",
319
 
                     GroupsColumn.ICON_HINT, "", -1);
320
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
321
 
                     GroupsColumn.DISPLAY_NAME, "Files",
 
309
                     GroupsColumn.DISPLAY_NAME, _("Top Results"),
 
310
                     GroupsColumn.ICON_HINT, "", -1);
 
311
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
312
                     GroupsColumn.DISPLAY_NAME, _("Recent"),
 
313
                     GroupsColumn.ICON_HINT, "", -1);
 
314
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
315
                     GroupsColumn.DISPLAY_NAME, _("Downloads"),
 
316
                     GroupsColumn.ICON_HINT, "", -1);
 
317
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
318
                     GroupsColumn.DISPLAY_NAME, _("Favorite Folders"),
 
319
                     GroupsColumn.ICON_HINT, "", -1);
 
320
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
321
                     GroupsColumn.DISPLAY_NAME, _("Files"),
322
322
                     GroupsColumn.ICON_HINT, "", -1);
323
323
      groups.append (GroupsColumn.RENDERER, "UnityEmptySearchRenderer",
324
 
                     GroupsColumn.DISPLAY_NAME, "No search results",
 
324
                     GroupsColumn.DISPLAY_NAME, "No search results", /* No i18n. Should never be rendered */
325
325
                     GroupsColumn.ICON_HINT, "", -1);
326
326
      groups.append (GroupsColumn.RENDERER, "UnityEmptySectionRenderer",
327
 
                     GroupsColumn.DISPLAY_NAME, "Empty section",
328
 
                     GroupsColumn.ICON_HINT, "", -1);
329
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
330
 
                     GroupsColumn.DISPLAY_NAME, "Today",
331
 
                     GroupsColumn.ICON_HINT, "", -1);
332
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
333
 
                     GroupsColumn.DISPLAY_NAME, "Yesterday",
334
 
                     GroupsColumn.ICON_HINT, "", -1);
335
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
336
 
                     GroupsColumn.DISPLAY_NAME, "This week",
337
 
                     GroupsColumn.ICON_HINT, "", -1);
338
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
339
 
                     GroupsColumn.DISPLAY_NAME, "Last Week",
340
 
                     GroupsColumn.ICON_HINT, "", -1);
341
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
342
 
                     GroupsColumn.DISPLAY_NAME, "This Month",
343
 
                     GroupsColumn.ICON_HINT, "", -1);
344
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
345
 
                     GroupsColumn.DISPLAY_NAME, "Past Six Months",
346
 
                     GroupsColumn.ICON_HINT, "", -1);
347
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
348
 
                     GroupsColumn.DISPLAY_NAME, "This Year",
349
 
                     GroupsColumn.ICON_HINT, "", -1);
350
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
351
 
                     GroupsColumn.DISPLAY_NAME, "Last Year",
352
 
                     GroupsColumn.ICON_HINT, "", -1);
353
 
      groups.append (GroupsColumn.RENDERER, "Specific Year", // FIXME: Use actual year, eg "2009"
354
 
                     GroupsColumn.DISPLAY_NAME, "Today",
355
 
                     GroupsColumn.ICON_HINT, "", -1);
356
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
357
 
                     GroupsColumn.DISPLAY_NAME, "Today",
358
 
                     GroupsColumn.ICON_HINT, "", -1);
 
327
                     GroupsColumn.DISPLAY_NAME, "Empty section", /* No i18n. Should never be rendered */
 
328
                     GroupsColumn.ICON_HINT, "", -1);
 
329
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
330
                     GroupsColumn.DISPLAY_NAME, _("Today"),
 
331
                     GroupsColumn.ICON_HINT, "", -1);
 
332
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
333
                     GroupsColumn.DISPLAY_NAME, _("Yesterday"),
 
334
                     GroupsColumn.ICON_HINT, "", -1);
 
335
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
336
                     GroupsColumn.DISPLAY_NAME, _("This week"),
 
337
                     GroupsColumn.ICON_HINT, "", -1);
 
338
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
339
                     GroupsColumn.DISPLAY_NAME, _("Last Week"),
 
340
                     GroupsColumn.ICON_HINT, "", -1);
 
341
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
342
                     GroupsColumn.DISPLAY_NAME, _("This Month"),
 
343
                     GroupsColumn.ICON_HINT, "", -1);
 
344
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
345
                     GroupsColumn.DISPLAY_NAME, _("Past Six Months"),
 
346
                     GroupsColumn.ICON_HINT, "", -1);
 
347
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
348
                     GroupsColumn.DISPLAY_NAME, _("This Year"),
 
349
                     GroupsColumn.ICON_HINT, "", -1);
 
350
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
 
351
                     GroupsColumn.DISPLAY_NAME, _("Last Year"),
 
352
                     GroupsColumn.ICON_HINT, "", -1);
 
353
      // FIXME: For prehistoric items use actual year, eg "2009"
 
354
 
359
355
 
360
356
      months = new Gee.ArrayList<unowned Dee.ModelIter?>();
361
357
      months.add(null);
984
980
                            ResultsColumn.ICON_HINT, "",
985
981
                            ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,
986
982
                            ResultsColumn.MIMETYPE, "",
987
 
                            ResultsColumn.DISPLAY_NAME, "You search did not match any files",
 
983
                            ResultsColumn.DISPLAY_NAME, _("You search did not match any files"),
988
984
                            ResultsColumn.COMMENT, "",
989
985
                            -1);      
990
986
      
994
990
                            ResultsColumn.ICON_HINT, "",
995
991
                            ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,
996
992
                            ResultsColumn.MIMETYPE, "",
997
 
                            ResultsColumn.DISPLAY_NAME, "Search the web",
 
993
                            ResultsColumn.DISPLAY_NAME, _("Search the web"),
998
994
                            ResultsColumn.COMMENT, "",
999
995
                            -1);
1000
996
    }
1010
1006
      switch (section)
1011
1007
      {
1012
1008
        case Section.ALL_FILES:
1013
 
          section_name = "files";
 
1009
          section_name = _("files");
1014
1010
          break;
1015
1011
        case Section.DOCUMENTS:
1016
 
          section_name = "documents";
 
1012
          section_name = _("documents");
1017
1013
          break;
1018
1014
        case Section.FOLDERS:
1019
 
          section_name = "folders";
 
1015
          section_name = _("folders");
1020
1016
          break;
1021
1017
        case Section.IMAGES:
1022
 
          section_name = "images";
 
1018
          section_name = _("images");
1023
1019
          break;
1024
1020
        case Section.AUDIO:
1025
 
          section_name = "audio files";
 
1021
          section_name = _("audio files");
1026
1022
          break;
1027
1023
        case Section.VIDEOS:
1028
 
          section_name = "videos";
 
1024
          section_name = _("videos");
1029
1025
          break;
1030
1026
        case Section.PRESENTATIONS:
1031
 
          section_name = "presentations";
 
1027
          section_name = _("presentations");
1032
1028
          break;
1033
1029
        case Section.OTHER:
1034
 
            section_name = "other files";
 
1030
            section_name = _("other files");
1035
1031
          break;
1036
1032
        default:
1037
 
          section_name = "files";
 
1033
          warning ("Unknown section number: %u", section);
 
1034
          section_name = _("files");
1038
1035
          break;
1039
1036
      }
1040
1037
      
1042
1039
                            ResultsColumn.ICON_HINT, "",
1043
1040
                            ResultsColumn.GROUP_ID, Group.EMPTY_SECTION,
1044
1041
                            ResultsColumn.MIMETYPE, "",
1045
 
                            ResultsColumn.DISPLAY_NAME, @"There are no $section_name in your Home folder",
 
1042
                            ResultsColumn.DISPLAY_NAME, _(@"There are no $section_name in your Home folder"), /* TRANSLATORS: section_name is plural */
1046
1043
                            ResultsColumn.COMMENT, "",
1047
1044
                            -1);
1048
1045
    }