![JAR search and dependency download from the Maven repository](/logo.png)
org.freedesktop.dbus.Gettext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbus-java Show documentation
Show all versions of dbus-java Show documentation
Slightly improved version of the Java DBus library
provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/).
Changes:
- Fixed lot's of Java warnings
- Fixed broken 'Gettext' feature (Exceptions on unsupported languages, usage of "_" as method name).
- Renamed some classes/methods/variables to comply with Java naming scheme.
- Removed usage of proprietary logger and replaced it with sl4fj.
- Renamed/refactored some parts to be more 'Java' like (e.g. naming, shadowing)
- Fixed problems with DbusConnection.getConnection(SESSION) when using display export (e.g. SSH X11 forward)
/*
* Pescetti Pseudo-Duplimate Generator
*
* Copyright (C) 2007 Matthew Johnson
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License Version 2 as published by
* the Free Software Foundation. This program is distributed in the hope that
* it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License along with this program; if not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* To Contact me, please email [email protected]
*
*/
package org.freedesktop.dbus;
import java.util.ResourceBundle;
public final class Gettext {
private static ResourceBundle myResources;
private Gettext() {
}
static {
try {
myResources = ResourceBundle.getBundle("dbusjava_localized");
} catch (Exception _ex) {
// suppress exception if language could not be found
}
}
public static String t(String s) {
if (myResources == null) {
return s;
}
return myResources.getString(s);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy