# -*-shell-script-*-

# constant definitions and translation bootstraps. depends on bashlib

# WARNING ! These strings are not public API and are subject to
# change without notice. Do NOT use them in your packages! Thank you

###
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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 library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# Copyright 2002-2005 Mike Hearn (mike@plan99.net)
#
###

if [ -z "`which ngettext`" ]; then
    HAVE_NGETTEXT=0
else
    HAVE_NGETTEXT=1
fi


TEST_PASS=0
TEST_PASS_RIGHT_VERSION=1
TEST_FAIL=50
TEST_FAIL_WRONG_VERSION=51

# Internationalized strings
export TEXTDOMAIN=autopackage
export TEXTDOMAINDIR="$autopackage_prefix/share/locale"
################################################################################
## general messages for install, query, uninstall, verify, setup, unsetup

intl_ABORTED=$"Action aborted."
intl_ACCESS_DENIED=$"Access denied - installation of packages is restricted on this system."
intl_ASSERTION_NOT_REACHED=$"A theoretically unreachable section of code was executed.\nThis program is in an inconsistant state and will be terminated."
intl_BACKEND_PREPARING_CPLUSPLUS=$"Preparing executables..."
intl_BAD_CONFIG_VERSION=$"Bad config file version. Please rerun setup."
intl_CANNOT_EXECUTE_PACKAGE_DIRECTLY=$"Install the package with the command 'package install' instead."
intl_CHECKING_FOR_GLIBC_SYMBOL_VERSIONS=$"required C library versions"
intl_CLEANING=$"Cleaning up ..."
intl_CONFIGURING=$"Configuring..."
intl_DONE=$"done"
intl_DONE_WITH_WARNINGS=$"done with warnings"
intl_ERRORS=$"ERRORS:"
intl_FAILED=$"failed"
intl_FAIL=$"FAIL:"
intl_FAILSAFE=$"Failsafe section '%s' has been triggered by the following line:"
intl_FE_TERMINATED_ABNORMALLY=$"Frontend terminated abnormally."
intl_FILE_NOT_READABLE=$"File is unable to be read. File: %s"
intl_INSTALL_ERROR=$"Package %s could not be installed."
intl_INSTALLING_CONFIG=$"Installing configuration files..."
intl_INSTALLING_DATA=$"Installing data files..."
intl_INSTALLING_DESKTOP=$"Installing menu items..."
intl_INSTALLING_EXE=$"Installing executables..."
intl_INSTALLING_FILE=$"Copying files to %s"
intl_INSTALLING_GCONF_SCHEMA=$"Installing default settings..."
intl_INSTALLING_GNOME2_APP_ENTRY=$"Installing GNOME 2 application registry entries..."
intl_INSTALLING_GNOME2_MIME=$"Installing GNOME 2 file type information..."
intl_INSTALLING_KDE_MIME=$"Installing KDE 3.x file type information..."
intl_INSTALLING_ICON=$"Installing icons..."
intl_INSTALLING_ICON_THEME=$"Installing icon themes..."
intl_INSTALLING_INFO=$"Installing info pages..."
intl_INSTALLING=$"Installing to %s ..."
intl_INSTALLING_FILE_ASSOCIATIONS=$"Registering file type assocations..."
intl_INSTALLING_LIB=$"Installing libraries..."
intl_INSTALLING_LINK=$"Linking from %s to %s"
intl_INSTALLING_LOCALE=$"Installing translated dictionary files..."
intl_INSTALLING_MAN=$"Installing manual pages for section %s..."
intl_INSTALLING_MIME=$"Installing file type information (MIME)..."
intl_INSTALLING_PKGCONFIG=$"Installing compile-time configuration files..."
intl_INSTALLING_PATH_NOT_IN_LINKER_CACHE=$"Libraries are being placed in a location that isn't registered with the linker cache."
intl_INSTALLING_PATH_NOT_IN_LINKER_CACHE_SOLUTION=$"You should either place %s in /etc/ld.so.conf or install as a user."
intl_INSTALLING_SOUND=$"Installing sounds..."
intl_INSTALLING_SOUND_THEME=$"Installing sound themes..."
intl_INSTALL_SUCCESS=$"Package %s installed successfully."
intl_MAKING=$"Making ..."
intl_NO_DISK_SPACE=$"You don't have enough disk space for %s in prefix %s, you need at least %s bytes"
intl_PACKAGE_BROKEN=$"Verify failed, one or more components are broken."
intl_PACKAGE_COULD_NOT_FIND=$"Could not find '%s'. Try using the native package manager for $AUTOPACKAGE_DISTRIBUTION_DESCRIPTION ($AUTOPACKAGE_DISTRIBUTION_DEPSOLVER) to install a package with similar name to '%s'. "
intl_PACKAGE_FOUND_BUT_WRONG_VERSION=$"Package '%s' was found but was of the wrong version and the correct version could not be located.\n\n[%s %s for %s]"
intl_PACKAGE_NOT_AUTOPACKAGE=$"package is in the database but was not installed by autopackage";
intl_PACKAGE_NOT_FOUND=$"Package %s was not found."
intl_PACKAGE_SPECIFY=$"Must specify a package name for this action."
# Translators: This will be shown in situations like "checking for xyz ... passed"
intl_PASSED=$"passed"
intl_PREFIX_NOT_SPECIFIED=$"If you give the --prefix option, you need to specify a prefix as the next argument"
intl_PREP_ERROR=$"Unable to prepare package %s."
intl_PREP_ROOTINSTALLONLY=$"'%s' requires a global installation. Restart installation as super user (root)."
intl_PROGRESSBAR_EXTRACTING_FILES=$"Extracting"
intl_PROGRESSBAR_COPYING=$"Copying"
intl_PROTOCOL_MISMATCH=$"Protocol version mismatch, was asked for %s - ensure your installation of autopackage is correct"
intl_UNINSTALLING=$"Removing %s ..."
intl_UNINSTALLING_WOULD_BREAK=$"Removing this package would break: %s"
intl_UNINSTALL_DO_IT_ANYWAY=$"If you'd like to uninstall anyway, run package remove -f %s"
intl_UNINSTALL_MUST_BE_ROOT=$"Package was installed by root, so you must be root to remove the package."
intl_UNINSTALL_NO_SUDO=$"You are running as root, but this package was installed to your home directory.\nIf you're using sudo, you don't need it this time."
intl_UNKNOWN_OPTION=$"Unknown option %s"
intl_UPDATING_DB=$"Updating package database..."
# Translators: Don't translate the letters 'y' and 'n' please.
intl_YESNO=$"Please type y for yes, or n for no"
intl_OWNED_BY_PM_BUT_NOT_ROOT=$"The file '%s' must be removed because it is in the way, but the system password is needed. Please retry the installation with the system password."
intl_RPM_DID_NOT_REMOVE_PACKAGE=$"RPM failed to remove the existing package %s, which conflicts with this one"
intl_CANNOT_REMOVE_SYSTEM_PACKAGE=$"The file '%s' must be removed because it is in the way, but the systems package manager claims that would break %s."

intl_INSTALLER_HELP=$"autopackage help

  -d, --debug       Extracts but does not automatically run the installer
  -x, --extract     Extracts the package and returns
  -f, --force       Overrides fatal warnings to force the install to proceed
  -g, --gtkfe       Forces the usage of the graphical GTK based frontend
  -h, --help        Display this help screen
  -p, --prefix      Sets the prefix that the package will install to
  -t, --ttyfe       Forces the usage of the text based terminal frontend
  --local-only      Force installation locally
  --root-only       Force installation system-wide
"

intl_UNSUPPORTED_CPU_ARCH=$"Sorry, this package is incompatible with your CPU architecture.

It needs %s, you have %s. Try checking where you got this package to
see if there is a compatible version.

If not, try asking the software maintainer if they would be willing to
produce a package for your architecture, or alternatively you may be
able to compile from source."

intl_SESSION_ROLLBACK=$"Invoking session rollback and returning the computer to its
previous state before this installation procedure was started."

intl_NEED_SYMBOLS=$"Your copy of glibc, a core system library, is too old for this package.
You need at least the following symbols in glibc: %s.

This error normally means that whoever built the package did not build it correctly.
Please report the contents of this message to the provider of this package, and
ask them to rebuild it using apbuild.

Upgrading glibc is highly dangerous, so we recommend in this situation that you
compile the app you want to install from the sources if possible. Sorry :("
# I guess we could add more detail here, it's not like users would be able to understand even what this is


################################################################################
## units

intl_UNIT_BYTE=$"bytes"
intl_UNIT_KILOBYTE=$"kB"
intl_UNIT_MEGABYTE=$"MB"
intl_UNIT_GIGABYTE=$"GB"
intl_UNIT_KIBIBYTE=$"KiB"
intl_UNIT_MEBIBYTE=$"MiB"
intl_UNIT_GIBIBYTE=$"GiB"


################################################################################
## autopackage ttyfe

intl_APKG_FE_COMPLETED_FAILED=$"The operation failed to complete"
intl_APKG_FE_COMPLETED_INSTALL=$"Installation completed"
intl_APKG_FE_COMPLETED_VERIFY=$"Verification completed"
intl_APKG_FE_CONNECTING=$"Connecting, please wait"
intl_APKG_FE_DOWNLOAD_BANNER=$"Downloading %s"
intl_APKG_FE_DOWNLOAD_INITIALIZING=$"Initializing"
# Translators: Plural (as in "more than 1")
intl_APKG_FE_FAILED_INSTALL_PACKAGES_PLURAL=$"The following packages failed to install correctly:"
# Translators: Singular (1 package)
intl_APKG_FE_FAILED_INSTALL_PACKAGES_SINGULAR=$"The following package failed to install correctly:"
# Using %d notation to make this sane with ngettext() FIXME: A native english speaker should re-phrase them
function _i18n_recommends_string() {
    local count=$1
    test -z "$count" && count=0;
    ngettext "%d software package could be installed to enhance this package:" "%d software packages could be installed to enhance this package:" $count
}
# The following hare here to ensure that they get extracted to common-strings.h
#intl_APKG_FE_FAILED_RECOMMENDS_PLURAL=$"%d software packages could be installed to enhance this package:"
#intl_APKG_FE_FAILED_RECOMMENDS_SINGULAR=$"%d software package could be installed to enhance this package:"
intl_APKG_FE_FINISHED=$"Finished"
intl_APKG_FE_INSTALLING=$"Installing package"
# Translators: Plural (as in "more than 1")
intl_APKG_FE_INSTALL_SUCCESS_PLURAL=$"The following packages were successfully installed:"
# Translators: Singular (1 package)
intl_APKG_FE_INSTALL_SUCCESS_SINGULAR=$"The following package was successfully installed:"
# Translators: Plural (as in "more than 1")
intl_APKG_FE_MENU_ENTRY_PLURAL=$"The following menu entries are now available:"
# Translators: Singluar (1 menu entry)
intl_APKG_FE_MENU_ENTRY_SINGULAR=$"The following menu entry is now available:"
intl_APKG_FE_NEGOTIATING=$"Negotiating"
intl_APKG_FE_PACKAGE_PROGRESS=$"package %d of %d"
intl_APKG_FE_PREPARING=$"Preparing package"
intl_APKG_FE_PROTOCOL_MISMATCH=$"Protocol version mismatched (expected %s, but got %s).\nPlease ensure your installation of autopackage is correct."
intl_APKG_FE_RECOMMENDED=$"recommended"
intl_APKG_FE_REMOVING=$"Removing currently installed version of '%s'."
intl_APKG_FE_REMOVING_APKG=$"This may take a moment, please wait ..."
intl_APKG_FE_REMOVING_OTHER=$"%s is removing '%s'. This may take a moment, please wait ..."
# %s will become 'package remove $packaganame' in some sort of bold markup
intl_APKG_FE_REMOVE_COMMAND=$"Remove this package by running %s from the command line."
intl_APKG_FE_SEARCHING=$"searching"
intl_APKG_FE_TESTING=$"Checking for %s ..."
# Translators: '%s' will expand to something like "XX MiB" or "YY KiB"
intl_APKG_FE_TOTALSIZE=$"This installation used %s of disk space."
intl_APKG_FE_VERIFY_BAD=$"Verify failed: one or more components are broken or not present."
intl_APKG_FE_VERIFYING=$"Verifying package"
intl_APKG_FE_VERIFY_OK=$"Verify successful: all required components for this package are present."

################################################################################
## package

intl_PACKAGE_VERSION="autopackage %s, (c) 2002-2005 the autopackage developers"

# Translators: The following 6 messages is displayed as one message and is the help output from 'package --help'
intl_PACKAGE_HELP_1=$"Usage: package <action> [options] [package name]

This is the autopackage management tool."

intl_PACKAGE_HELP_2=$"Package Name can be either format:
  Short Name  : gimp
  Root Name   : @gimp.org/gimp/1.4"

intl_PACKAGE_HELP_3=$"Actions:
  info        : Print information about the named package, either from the
                 database, online or a file.
  install     : Install the named package.
  remove      : Removes the named package.
  uninstall   : Alias for remove action.

  files       : List installed files of the named package.
  list        : Show all packages installed.
  log         : Show log of the named package.
  owner       : Show package owner of absolute or relative filename.

  verify      : Checks the package to see if the installation has been broken.

  version     : Prints autopackage version information. [ -v or --version ]
  help        : Prints autopackage help information.    [ -h or --help ]"

intl_PACKAGE_HELP_4=$"Options for info:
  -p filename : Print information from the specified package file."

intl_PACKAGE_HELP_5=$"Options for remove:
  -f          : Force removal even when it would break other packages.
  -F filename : File containing single line entries of packages to use."

intl_PACKAGE_HELP_6=$"Debug mode:
  export DEBUGLEVEL=3 and log file will be generated at the location
  set in AUTOPACKAGE_DEBUG_LOGFILE which is defaulted as './autopackage.log'"

intl_PACKAGE_UNKNOWN_COMMAND=$"The action '%s' is unknown. Run 'package --help' to see a list of possible actions."


################################################################################
## package info

       intl_PACKAGE_INFO_SHORTNAME=$"Short Name    : %s"
     intl_PACKAGE_INFO_DISPLAYNAME=$"Display Name  : %s"
        intl_PACKAGE_INFO_ROOTNAME=$"Root Name     : %s"
 intl_PACKAGE_INFO_SOFTWAREVERSION=$"Version       : %s"
intl_PACKAGE_INFO_INTERFACEVERSION=$"Interface     : %s"
  intl_PACKAGE_INFO_PACKAGEVERSION=$"Revision      : %s"
      intl_PACKAGE_INFO_MAINTAINER=$"Maintainer    : %s"
         intl_PACKAGE_INFO_LICENSE=$"License       : %s"
 intl_PACKAGE_INFO_ROOTINSTALLONLY=$"Root Install  : %s"
        intl_PACKAGE_INFO_DATABASE=$"Database      : %s"
       intl_PACKAGE_INFO_BUILDHOST=$"Build Host    : %s"
  intl_PACKAGE_INFO_TIMESTAMPBUILD=$"Build Date    : %s"
intl_PACKAGE_INFO_TIMESTAMPINSTALL=$"Install Date  : %s"
            intl_PACKAGE_INFO_SIZE=$"Install Size  : %s"
        intl_PACKAGE_INFO_PACKAGER=$"Packager      : %s"
      intl_PACKAGE_INFO_REPOSITORY=$"Repository    : %s"
             intl_PACKAGE_INFO_URL=$"URL           : %s"
         intl_PACKAGE_INFO_SUMMARY=$"Summary       : %s"

#Translators: This refers to the "System" package database.
intl_PACKAGE_INFO_DATABASE_GLOBAL=$"System"
#Translators: This referes to the "User" package database.
intl_PACKAGE_INFO_DATABASE_USER=$"User"


################################################################################
## setup/unsetup

intl_APKG_BANNER=$"
--------------------------------------------------------------------------
  autopackage - the distro neutral packaging framework for Linux systems
--------------------------------------------------------------------------
"

intl_SETUP_YOU_HAVE_GTK=$"GTK2 is available on this system.

Graphical user interface support will be enabled if possible.

* If you need to download the package, it will take approximately *
* 25 seconds on a dialup modem connection                         *
"
intl_SETUP_THANKYOU=$"Thank you for your patience. Installation of your package will now proceed.
You should not have to install the autopackage support code again."
intl_SETUP_RUN_EXEC_BASH=$"Please run 'exec bash' in each terminal to update your path."
intl_SETUP_VERSION_REQUIREMENT=$"The version of %s needs to be upgraded to version %s or higher."
intl_SETUP_CANT_FIND_CONFIG=$"Unable to find the autopackage configuration file, even though autopackage has just been installed. Please report this bug."

################################################################################
## .desktop file

# following are action menus RMB for .desktop files added during setupDesktopFile called from installDesktop
DESKTOP_ACTION_REMOVE="[Desktop Action Apkg-Remove]
Exec=package remove Short_Name
Icon=package
Name[de]=Entfernen Paket
Name[en]=Remove Package
Name[es]=Quite El Paquete
Name[fr]=Enlevez Le Paquet
Name[it]=Rimuova Il Pacchetto
Name[nl]=Pakket Verwijderen
Name=Remove Package
"

DESKTOP_ACTION_VERIFY="[Desktop Action Apkg-Verify]
Exec=package verify Short_Name
Icon=package
Name[de]=Validieren Paket
Name[en]=Verify Package
Name[es]=Verifique El Paquete
Name[fr]=Vérifier l'emballage
Name[it]=Verifichi Il Pacchetto
Name[nl]=Pakket Controleren
Name=Verify Package
"

DESKTOP_ACTION_UPDATE="[Desktop Action Apkg-Update]
Exec=package update Short_Name
Name[de]=Aktualisieren Paket
Name[en]=Update Package
Name[es]=Paquete De la Actualización
Name[fr]=Paquet de Mise à jour
Name[it]=Pacchetto Aggiornamento
Name[nl]=Pakket Bijwerken
Name=Update Package
"
