~bratsche/ubuntu/maverick/monodevelop/disable-appmenu

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Core/GettextCatalog.cs.in

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-03-29 23:36:33 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080329233633-wq5p1rktg8ek3vxc
Tags: 1.0+dfsg-1ubuntu1
* Merge from Debian unstable. (LP: #209012) Remaining Ubuntu changes:
+ debian/control: 
  - Build-dep on xulrunner-1.9-dev instead of firefox-dev
  - Depend on xulrunner-1.9 instead of firefox
+ don't do any MOZILLA_HOME/MOZILLA_FIVE_HOME business which isn't needed
  for xulrunner-1.9 using the standalone glue anymore (gecko gil uses
  standalone by default)
  - add debian/patches/use_xulrunner_1.9.dpatch
  - update debian/patches/00list
* Remove build-dep on libxul-dev and the dep on libxul0d
  since we are using xulrunner1.9 instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2004 Jorn Baayen <jorn@nl.linux.org>
3
 
 * 
4
 
 * Modified by Todd Berman <tberman@sevenl.net> to fit with MonoDevelop.
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU General Public License as
8
 
 * published by the Free Software Foundation; either version 2 of the
9
 
 * License, or (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
 * General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public
17
 
 * License along with this program; if not, write to the
18
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 
 * Boston, MA 02111-1307, USA.
20
 
 *
21
 
 * !!! Note that this class has to have the same API as the one
22
 
 *     from GNU.Gettext.dll, because otherwise the strings won't
23
 
 *     be picked up by update-po.
24
 
 */
25
 
 
26
 
using System;
27
 
using System.Runtime.InteropServices;
28
 
 
29
 
using MonoDevelop.Core;
30
 
 
31
 
using Mono.Unix;
32
 
 
33
 
namespace MonoDevelop.Core
34
 
{
35
 
 
36
 
        public class GettextCatalog
37
 
        {
38
 
                static GettextCatalog ()
39
 
                {
40
 
                        Catalog.Init ("monodevelop", "@prefix@/share/locale");
41
 
                }
42
 
        
43
 
                private GettextCatalog ()
44
 
                {
45
 
                }
46
 
 
47
 
                public static string GetString (string str)
48
 
                {
49
 
                        return str != null ? Catalog.GetString (str) : null;
50
 
                }
51
 
        
52
 
                public static string GetString (string str, params object[] arguments)
53
 
                {
54
 
                        return string.Format (GetString (str), arguments);
55
 
                }
56
 
        
57
 
                public static string GetPluralString (string singular,
58
 
                                                      string plural,
59
 
                                                      int n)
60
 
                {
61
 
                        return Catalog.GetPluralString (singular, plural, n);
62
 
                }
63
 
 
64
 
                public static string GetPluralString (string singular,
65
 
                                                      string plural,
66
 
                                                      int n,
67
 
                                                      params object[] arguments)
68
 
                {
69
 
                        return string.Format(GetPluralString (singular, plural, n), arguments);
70
 
                }
71
 
 
72
 
        }
73
 
}