Commit Graph

37 Commits

Author SHA1 Message Date
Murai Takashi 097d6b9ce3 bin/locale/collectcatkeys: Fix -Wformat-security
Change-Id: I7e09dd3d8eac8eeb6c4b92e9d9ebf61d5a7b9f5a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3338
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-22 05:59:30 +00:00
Kacper Kasper 3bac8deff6 Add -a option to locale utility
* Required by POSIX.

Change-Id: Ided0a9d45d5edd00f3aa6279e99ca486ca372f6c
Reviewed-on: https://review.haiku-os.org/651
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-02 14:25:57 +00:00
Adrien Destugues 4205fc9141 locale: document -c as the shortcut to get message locale again.
It was deprecated in favor of -m, but -m then changed meaning to comply
with POSIX. So restore documentation for -c, and add proper
documentation for -m.
2017-11-23 14:50:11 +01:00
Adrien Destugues 2f6aa1c7cc locale: -m option should print character sets, only.
Required by mosh testsuite.
2017-04-08 08:45:29 +02:00
Augustin Cavalier b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Adrien Destugues 09bb8269ac Tracker: localize RegExp errors.
These were left out because the same RegExp.cpp file is also used by
collectcatkeys. This needed some jam file changes to get collectcatkeys
to build on both the host and target.

Fixes the last remaining part of #6374.
2016-09-25 15:10:12 +02:00
Oliver Tappe 220d040227 Use libstdc++, libsupc++ and libgcc from gcc_syslibs.
* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
  from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
  x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
  necessary since we're only using libgcc-as-single-object for libroot
  with x86_gcc2, where the filtered object file doesn't exist. Should
  the objects that used to be filtered cause any problems as part of
  libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
  x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
  x86_gcc2, we still build libstdc++.so from the sources in the Haiku
  source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.
2014-08-13 13:32:44 +02:00
Alex Smith 11c9f9a1d6 Merge branch 'master' into x86_64
Conflicts:
	build/jam/FloppyBootImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	headers/private/shared/cpu_type.h
	src/bin/ps.c
	src/bin/sysinfo.cpp
	src/kits/tracker/PoseView.cpp
	src/preferences/appearance/DecorSettingsView.cpp
	src/preferences/virtualmemory/Settings.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/input/InputServer.cpp
	src/servers/input/InputServerMethod.cpp
	src/system/boot/Jamfile
	src/system/boot/platform/raspberrypi_arm/mmu.cpp
	src/system/boot/platform/u-boot/arch/arm/Jamfile
	src/system/kernel/arch/x86/arch_cpu.cpp
	src/system/kernel/arch/x86/arch_thread.cpp
	src/system/kernel/cache/block_cache.cpp
	src/system/kernel/vm/VMAnonymousCache.cpp
2012-11-18 14:02:07 +00:00
Oliver Tappe 8ef01bd74e Fix #8193 - wrong LC_* vars if there's no country code. 2012-11-05 19:52:35 +01:00
Alex Smith 8110732b03 Added some more binaries to the image. 2012-08-01 11:00:35 +01:00
Oliver Tappe 541ff51a6e Cleanup BCatalogAddOn.
* rename BCatalogAddOn to BCatalogData, since it doesn't represent an
  add-on, but rather the catalog data provided by an add-on
* move BCatalogData out of Catalog.{h,cpp} into its own header and
  implementation file
* drop BCatalogData::MarkForTranslation() methods, they're not needed
* drop BCatalog::GetNoAutoCollectString() methods, they're not being
  used anywhere
* cleanup the B_TRANSLATE_... macros somewhat
* add versions of the B_TRANSLATE_MARK_... macros that are meant to be
  used in void context (when the string isn't being used by the program,
  just meant to be picked up by collectcatkeys).
* adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed
* adjust users of BCatalogAddOn accordingly
2012-04-16 00:04:41 +02:00
Oliver Tappe 5ac65b7f11 More cleanup in locale kit, this time regarding namespaces.
* it's bad practice to do a 'using <namespace>' in a header, as that
  is very likely to have unintended effects, so drop those from a couple
  of private Locale headers
* adjust files all over the locale kit in order to fix the problems
  (by explicitly importing the required classes in the implementation
  files)
2012-04-16 00:04:40 +02:00
Oliver Tappe 16e5092306 Extract EditableCatalog from Catalog.{h,cpp}.
* move EditableCatalog to its own header and implementation file
* move problematic BCatalog::CatalogAddOn() to EditableCatalog
* adjust Locale tools accordingly
2012-04-16 00:04:40 +02:00
Oliver Tappe 60f75e901c Merge liblocale.so into libbe.so.
* Make the locale kit a part of libbe.
* Drop the LocaleBackend kludge used from within libbe (and from
  other places, too) in order to access system catalog strings. 
  This is now done via gSystemCatalog, which is provided and initialized
  by libbe.
* Drop all references to liblocale.so from all Jamfiles.
* Add legacy symlink liblocale.so in order to keep optional packages
  that rely on it in a working state.

TODO: the documentation hasn't been updated.
2012-04-04 22:44:42 +02:00
Oliver Tappe 98057dd02a Adjust /bin/locale to print time-related locale, too.
* add support for printing the time-related locale (which may contain
  a '@strings=messages' suffix if required by locale configuration
* adjust cmdline params of /bin/locale to be a bit clearer (but keep
  support for -c for compatibility)
* adjust /etc/profile to invoke /bin/locale accordingly
2012-02-23 23:15:36 +01:00
Oliver Tappe 93efe98ec2 Cleanup: respect line-width limit. 2012-02-23 23:15:35 +01:00
Michael Lotz 674e76845d Returning a string stored in a local BMessage doesn't work.
Instead use a BString object as return type that copies the string
so that it stays valid after return.
2011-12-07 00:26:07 +01:00
Adrien Destugues 1a5c1f9ed5 * Use const references instead of pointers for the read from/write to
attribute/resource method in locale kit catalogs
 * Only load the embedded catalog if nothing else was found, so it can easily
be overridden
 * Change the resource type to 'CADA' (CAtalog DAta) for embedded catalogs, and
use a hash of the language code as the resource ID. This allows multiple
languages to be stored in the same file and does not interfere with the user
storing his own BMessages as resources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-01 10:13:34 +00:00
Adrien Destugues ee46c038a6 Add newline to locale command line output. (that's more usual and it works for
all other CLI apps).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-31 13:32:22 +00:00
Adrien Destugues aeba7dc609 Leftover debug output. Thanks Ryan for watchiung!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-15 18:50:14 +00:00
Adrien Destugues a642bc78a3 Fix #7189 : linkcatkeys erases file with plain catalog data instead of writing it as a resource.
Was only a missing break in switch/case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-15 17:30:17 +00:00
Ryan Leavengood d806242e06 Forgot to svn add the new locale command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-09 04:31:22 +00:00
Ryan Leavengood 83a30ba91e Implement #7495 as per Matt and Ingo's suggestions.
The various LC_ environment variables (as well as LANG) are set in
/etc/profile, based on the output of this new simple bin command locale.
LANG and LC_CTYPE are set based on the first preferred language, whereas the
formatting variables are all set based on the formatting conventions language.

The list of LC_ variables are from the locale command on Linux.

Based on my testing, at least the date command obeys these variables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-09 04:29:20 +00:00
Oliver Tappe 2a06b5bdba Closing #6721: avoid unescaping when linking catalogs together
* add SetRawString() to both implementations of DefaultCatalog which sets
  the translated string as given
* use SetRawString() in both (standard- and build-)versions of linkcatkeys


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-02 13:37:59 +00:00
Oliver Tappe c090a0fd84 * updated ICU build packages with newer builds that try a bit harder to avoid
warnings and incorporate some of the ICU-patches we had in our repo before
  we upgraded to 4.4.1
* fixed remaining warnings when building locale kit
* activated EnableWerror for locale kit
* added 'Unicode' license, which is the second license in use by ICU


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 22:05:39 +00:00
Oliver Tappe ad51686353 * improved the locale kit build rules and headers to use a different set of
B_TRANSLATE-macros when running collectcatkeys, simplifying the regex a lot
* added B_TRANSLATE_NOCOLLECT...-macros for the case where a non-literal
  string shall be translated, but not picked up by collectcatkeys


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 22:47:39 +00:00
Adrien Destugues fe8d7c0225 * Remove the CatalogStub class and put the Gatcatalog function directly in BLocaleRoster,
* Adjust the B_TRANSLATE macros to take this into account
 * Adjust collectkatkeys to take it into account too
Thanks to Ingo for explaining me all the technical details about hiding things in shared objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 11:38:34 +00:00
Adrien Destugues be28dac578 A wrongly escaped regexp in collectcatkeys made it not find any strings to translate. Thanks to mt for noticing!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 13:52:49 +00:00
Adrien Destugues cae7fb3aec Fix target-side collectcatkeys to use the new regexp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 07:47:08 +00:00
Adrien Destugues e8f533b27b Fix a bug in native version of collectcatkeys (not the one used in
buildtools) that prevented it from working at all. This fixes #4840


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 10:10:36 +00:00
Adrien Destugues b254319360 -Started to localize the appearance preflet to find more locale kit bugs. It worked.
-MarkForTranslation was not scanned by collectcatkeys, improved the regexp to take it into account
-Some gristing was missing in jamrules, added a bit, still seem to miss some.
-Replaced $(var:B).ext with $(var:S=.ext) as it is the proper way in order not to loose grist and mess things up
-Removed icu include and replaced direct class nesting with pointer to avoid binary compatibility breakage on ICU updates.
-Fixed TimeFormatSettingsView to properly include needed icu things. Should not be there, actually. Needs cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-20 22:16:30 +00:00
Oliver Tappe 75f1522155 * reintegrated gsoc-locale-kit branch into trunk - there's more
work to do, but it's about time to give this code more exposure.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-18 22:23:34 +00:00
Oliver Tappe 16d5c24e53 * merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-07 10:30:09 +00:00
Stephan Aßmus a55f3fb022 Patch by Joe Prostko: Add linking to libstdc++ in some places, which is
necessary when compiling the code for example with -O1 or with the upcomming
GCC 4.4. Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-06 10:35:14 +00:00
Oliver Tappe a0352959ac * followed advice by Rene to explicitly import the used std-classes instead
of simply importing the whole namespace - thanks for proofreading!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 14:28:32 +00:00
Oliver Tappe 723383c0f4 Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
  sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 21:56:16 +00:00
Oliver Tappe c3ac87e8fc * Copied imported OpenTracker Locale Kit files from the vendor branch
into their new homes (at least for now, might need some adjustment).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 19:23:59 +00:00