~ubuntu-branches/ubuntu/oneiric/kdelibs/oneiric

« back to all changes in this revision

Viewing changes to kdecore/klocale.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-10-15 19:20:42 UTC
  • mfrom: (1.1.19 sid)
  • Revision ID: james.westby@ubuntu.com-20101015192042-jv1fhj33n4f5b398
Tags: 4:3.5.10.dfsg.1-5ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - make sure control and control.in are in sync
  - --with-distribution="Kubuntu (`lsb_release --codename --short`)
    $(DEB_VERSION)"
  - binary-install/kdelibs-data installs aboutkde-kubuntu.png.uu and
    cr*-device-system.png.uu
  - don't build-dep on libgamin-dev, libfam-dev
  - stop kdelibs4-dev depending on gamin/fam
  - don't install .svgz icons, docs or all_languages in kdelibs-data.install
  - rosetta support in rules common-install-prehook-impl:: [and
    common-post-build-arch:: ?] and include debian/kubuntu-desktop-i18n/
  - build-dep on: gettext-kde, kdesdk-scripts, lsb-release, base-files, sudo
  - cdbs build-dep 0.4.41ubuntu2
  - kdelibs4-dev depends on gettext-kde, kdesdk-scripts
  - copy debian/icons over
  - Make kdelibs4c2a depend on launchpad-integration, sudo.  Recommends on
    xdg-user-dirs
  - Remove 19_debianize_useragent.diff (changed to
    kubuntu_19_debianize_useragent.diff) s/Debian/Kubuntu
  - remove kdelibs4c2a depends on menu-xdg
  - include kubuntu_01_kdepot.diff and kde.pot in debian/patches/common
  - use a local copy of kde.mk without the common-install-prehook-impl::
    rule; edit debian-qt-kde.mk to include debian/cdbs/kde.mk
  - build with --with-sudo-kdesu-backend and build-dep on sudo and make
    kdelibs4c2a depend on sudo
  - kdelibs-data.install : Add nzb mimetype
  - Make kdelibs4-dev replace more recent kdelibs4c2a for overlapping files
  - remove /usr/bin/preparetips, arts files and ksvntopng from
    kdelibs4-dev.install
  - Drop the package kdelibs4-doc completely. It contained API documentation
    which is now obsolete, but still available via api.kde.org.
  - make sure control and control.in are in sync
  - in debian/rule remove .pot files outside .po directory
  - 97_automake_cleanup.diff becomes kubuntu_97_automake_cleanup.diff
  - Remove libarts1-dev from build-depends and kdelibs4-dev depends from
    control.in
* Drop kubuntu_98_fix_khc_invocation.diff, replaced by
  68_support_khelpcenter4.diff
* Drop kubuntu_97_automake_cleanup.diff, replaced by 97_automake_cleanup.diff
* Re-add security_05_XMLHttpRequest_vulnerability.diff which has been
  accidentally dropped
* Fix FTBFS, in debian/rules:
  - Add -Wl,--add-needed to LDFLAGS
  - Disable parallel building

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
#ifdef Q_WS_WIN
77
77
  char win32SystemEncoding[3+7]; //"cp " + lang ID
78
78
#endif
 
79
  bool useMainCatalogue;
79
80
};
80
81
 
81
82
static KLocale *this_klocale = 0;
118
119
{
119
120
  // Use the first non-null string.
120
121
  QString mainCatalogue = catalog;
121
 
  if (maincatalogue)
122
 
    mainCatalogue = QString::fromLatin1(maincatalogue);
 
122
 
 
123
  // don't use main catalogue if we're looking up .desktop translations
 
124
  if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) {
 
125
    if (maincatalogue) {
 
126
      mainCatalogue = QString::fromLatin1(maincatalogue);
 
127
    }
 
128
  }
123
129
 
124
130
  if (mainCatalogue.isEmpty()) {
125
131
    kdDebug(173) << "KLocale instance created called without valid "
129
135
  else {
130
136
    // do not use insertCatalogue here, that would already trigger updateCatalogs
131
137
    d->catalogNames.append( mainCatalogue );   // application catalog
132
 
    d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo
133
 
    d->catalogNames.append( "kio" );            // always include kio.mo
 
138
    if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { //don't bother if we're looking up desktop translations
 
139
      d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo
 
140
      d->catalogNames.append( "kio" );            // always include kio.mo
 
141
      d->catalogNames.append( "xdg-user-dirs" );
 
142
    }
134
143
    updateCatalogues(); // evaluate this for all languages
135
144
  }
136
145
}