Commit Graph

66 Commits

Author SHA1 Message Date
aeb18239c3 Update tinygettext to upstream commit ca0f3ff640. Refs #2522.
Keeps our addition of precompiled.h (fd3d335265), win32/dirent,
4c9d99ff68, de6823d23f, and 8fc14655b5.

This was SVN commit r16168.
2015-01-21 20:37:37 +00:00
a9c6b7080a Fixes intermittent error messages caused by uninitialized variable
This was SVN commit r16049.
2014-12-14 17:43:40 +00:00
eb8a6c9427 Explictly use GMT when displaying a localized time that is not a date. Patch by lafferjm. Fixes #2938.
Also make some parameters const references.

This was SVN commit r16037.
2014-12-12 01:11:00 +00:00
9407dbe45e Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
2014-11-17 23:29:49 +00:00
e108b162b6 Add hotloading for translation files. Fixes #2915.
This was SVN commit r15947.
2014-11-09 16:58:14 +00:00
18ab827886 Change L10n code to use ps/Singleton, so that we can recreate it.
This allows for adding locales in mods.

This was SVN commit r15874.
2014-10-15 16:04:37 +00:00
c37a8cafc3 Fixes a few building warnings and convention issues from 19ca1e3ebf
This was SVN commit r15128.
2014-05-07 23:33:21 +00:00
19ca1e3ebf Fix locale verification to also allow ICU locales without data, but still don't allow bogus locales. Patch by Yves. Fixes #2533.
This was SVN commit r15122.
2014-05-07 08:14:57 +00:00
2b192a4fb5 Do not call Translate() on empty lines
Reported by Yves at Github:
https://github.com/leper/0ad/issues/11

This was SVN commit r15003.
2014-04-26 16:05:41 +00:00
8fea36cdd0 Made tinygettext’s debug output optional
You can now enable tinygettext’s output from the user.cfg file
(tinygettext.debug).
This enhancement also solved a warning due to the previous workaround,
which was
to uncomment the output line to avoid the debug messages.

This issue was reported by Yves at Github:
https://github.com/leper/0ad/issues/10

This was SVN commit r15002.
2014-04-26 15:32:18 +00:00
c82544be9f Use an early return in L10n::GetDictionaryLocale()
Suggested by l777 on the IRC.

This was SVN commit r14999.
2014-04-26 12:29:01 +00:00
d4f701d5f5 Remove MarkToTranslate from the JavaScript interface
The ‘l10n.js’ global JavaScript file already defines this function as
markForTranslation(),
and defines a context-aware twin function as well. Those two functions
are the only ones
currently used in the mod code (as it should be), and there are no
remaining calls to the
engine for that.

This was SVN commit r14998.
2014-04-26 12:26:04 +00:00
d6e37321d5 Removed an obsolete TODO comment in the L10n class implementation
This was SVN commit r14997.
2014-04-26 12:11:08 +00:00
fc793609eb Added API documentation to ‘source/i18n/’
This was SVN commit r14996.
2014-04-26 12:10:15 +00:00
9b9a96382c Fix boolean type
This was SVN commit r14971.
2014-04-22 12:52:49 +00:00
21362de6ac Add workaround for testing long strings with the separate po. ICU wouldn't accept a non-existing language.
This was SVN commit r14969.
2014-04-22 11:38:15 +00:00
d6db5a466d Internationalization of the C++ side
Provides the logic to detect the system language, load translations, and
use
loaded translations both in the C++ and the JavaScript side.

This patch includes code by Yves, sanderd17, leper, historic_bruno and
Gallaecio. It’s worth noting that Yves and historic_bruno were also the
main
contributors behind the changes in 1b3261b8f4 as well.

This was SVN commit r14953.
2014-04-20 20:03:57 +00:00
818ea52c3b Delete obsolete non-working i18n code
This was SVN commit r8527.
2010-11-03 17:52:07 +00:00
52851faeb6 cleanup - remove old cpu_memcpy and cpu_i64FromDouble that are no longer needed
This was SVN commit r8517.
2010-11-01 11:09:03 +00:00
1e40c8c776 MSVC warning fixes
This was SVN commit r7583.
2010-05-25 19:12:00 +00:00
e7e8b8dbc3 Fix spidermonkey-tip to build on Windows. Add precompiled binaries.
This was SVN commit r7365.
2010-03-19 20:28:22 +00:00
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00
da3030cfe6 more unicode/string cleanup:
- swprintf -> swprintf_s
- use secure_crt's _wfopen_s instead of conversion+fopen
- centralize all MBS <-> WCS conversion in new wchar.cpp (requires
workspace rebuild)
- remove no longer needed os_path
- remove unnecessary fs::wpath / VfsPath constructor casts
- fixed buffer size parameters -> ARRAY_SIZE

This was SVN commit r7162.
2009-11-03 22:27:25 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
2001557224 Make jsval typedef match the bundled spidermonkey headers
This was SVN commit r7093.
2009-08-08 13:25:23 +00:00
008d894dd7 Fix some GCC warnings
This was SVN commit r7048.
2009-07-28 16:59:19 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
Zyi
6822796a95 Simplified the logger:
- Removed the configurable interestingness from system.cfg.
- InterestingLog contains all warning and errors now.
- Modified and implemented methods in CLogger to write messages,
warnings and errors to the log.
- Modified a warning in CLocale so that the log wouldn't get spammed.

To do:
- Modify all of the logging statements in the source code.
- Remove the current preprocessor directives LOG_INFO, LOG_WARNING and
LOG_ERROR so that they can be used to log messages.

This was SVN commit r6817.
2009-04-11 22:53:33 +00:00
b51353ae0b Use NONCOPYABLE macro, to avoid ICC warnings
This was SVN commit r6589.
2009-01-03 18:40:28 +00:00
5228800b73 # Fixed Linux build
Use noncopyable instead of boost::noncopyable. (But maybe this should be
changed to the NONCOPYABLE macro instead?)
Use boost::filesystem::wpath::file_string instead of
external_file_string, since the latter varies between std::string on
Linux and std::wstring on Windows.
Use wcstombs instead of wcstombs_s.
Use rtl_AllocateAligned instead of _mm_malloc.

This was SVN commit r6574.
2009-01-02 21:19:41 +00:00
fbc3d22720 Use GCC's std::tr1::unordered_* classes instead of the now-deprecated __gnu_cxx::hash_* when possible
This was SVN commit r6250.
2008-07-19 00:20:54 +00:00
fe6370aff8 more dehydra. disabled lockfree module (not in use).
This was SVN commit r6240.
2008-07-17 17:00:00 +00:00
5529977ecd fix: CLogger's ELogMethod is now inside the class and does not use names that are vulnerable to macro destruction (fixes a conflict with Windows system header's #define ERROR)
This was SVN commit r5532.
2007-12-29 16:22:23 +00:00
fba692c8b5 # Fixed some warnings and potentially misleading code
* Removed ToJSVal<jsval> because it's treated as ToJSVal<long> and
causes minor confusion and/or compiler errors.
   Changed script interface functions to return either C++ types or a
jsval_t wrapper.
 * Replaced some C casts with static_cast to avoid significant confusion
and to cause compiler errors instead.
 * Removed some redundant argument-checking code. Simplified some
string-generating code.
 * Fixed some "dereferencing type-punned pointer will break
strict-aliasing rules" warnings (from `g++ -O3`).

This was SVN commit r5115.
2007-05-29 19:01:21 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
623e649acb # big refactoring in CPU-specific code, fix for dual core vs. HT detection
all cpu-related stuff is now defined in cpu.h (with cpu_ prefix and
fully encapsulated). fix quite brittle core/HT unit/package detection.
implement mkdir on VC8, where it is deprecated
add strdup on MacOSX
move ia32 code into separate subdir. functions implemented in asm are
called ia32_asm_*.
add some unix versions of sysdep functions (cannot test them)
timer: fix for amd64 linux

This was SVN commit r4995.
2007-04-25 18:19:35 +00:00
8d0a7170f6 # Slightly tidied up string code.
CStr: Indented comments more consistently. Made some parameters
pass-by-reference, made some others not. Removed some useless methods -
Length (use length or empty), GetSubstring (use substr), LCase/UCase
(use LowerCase/UpperCase). Removed operator[] bounds-checking because
VS2005 does that anyway.
Maybe fixed noncopyable warnings on VS2003.

This was SVN commit r4828.
2007-02-01 14:46:14 +00:00
27b6ffe2d6 # housekeeping
sorry, update-workspaces + rebuild is necessary (moved boost/utility
into PCH)

- ps/ : committed additional documentation on behalf of Joe.
- lib/ : HAVE_C99 - replace with specific e.g. HAVE_NPRINTF; intended to
help with MacOSX compat (by no longer requiring us to lie about
STDC_VERSION)
- NO_COPY_CTOR -> boost::noncopyable

This was SVN commit r4825.
2007-02-01 01:34:17 +00:00
13f2e3ca0c Tried compiling with ICC9 on Linux, which raised various issues:
* Fixed some bugs with incorrect macro usage (SDL_BYTE_ORDER vs
SDL_BYTEORDER, {MSC,GCC}_VER vs {MSC,GCC}_VERSION, OS_WIN/OS_UNIX in
projects where they're not defined).
 * Removed some redundant declarations of g_Console.
 * Removed some unnecessary semicolons.
 * Removed some unused variables.
 * Added throw specification to operator new.

This was SVN commit r4698.
2006-12-16 01:01:15 +00:00
2f53eea71a Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without
indirectly including CVector[34]D.
Terrain: Added 'base colour', for the Actor Viewer to be able to
modulate the colour of normally-white terrain.
Removed some "using namespace std" (because it doesn't make the code
easier to read, and it defeats the point of namespaces, and the rest of
the code doesn't do it).

This was SVN commit r4392.
2006-09-26 01:44:20 +00:00
37c87a6579 # housekeeping
add new JSUtil, automatically included via SpiderMonkey.h.
move JS_ASSERT there and rename JSU_ASSERT.
move scriptglue's REQUIRE_PARAMS there and rename to JSU_*
replace if(argc < x) bail() code with those macros.

This was SVN commit r4169.
2006-07-26 13:10:13 +00:00
90bfaf9c99 # housekeeping + bugfix in file trace recorder
entity.cpp: fix indenting (was using space instead of tab)
replace all instance of & operator=( with NO_COPY_CTOR
trace: fix bug reported by michael: if trace file is huge, indices would
keep on being recorded but data was cut off after a certain limit,
leading to invalid pointers (into garbage data)

This was SVN commit r4158.
2006-07-21 01:11:23 +00:00
5f7875a243 rename i18n's tests subdirectory tests2, so that it doesn't get confused as a self-test directory
This was SVN commit r3959.
2006-06-07 03:01:25 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
8f02c6f10d # GCC compatibility
This was SVN commit r3788.
2006-04-20 06:53:22 +00:00
fd08924348 # VC2005, GCC compatibility
Used new library include paths.
Renamed ia32.asm to ia32_asm.asm, so we don't need Premake modifications
to avoid object-file conflicts with ia32.cpp.

This was SVN commit r3784.
2006-04-20 01:33:57 +00:00
987a6b7d4e fixed wchar_t issues; now correctly separates utf16, CStrW and jschar.
NOTE: wchar_t should be defined as a built-in type; no more need to
define manually or change project settings.

adts: disambiguate iterator type; add operator- as required by VC8
std::equal() implementation
precompiled: squelch stupid warning (that informs us that array members
are now actually default-initialized as called for by C++)
file_cache: remove debug variable

This was SVN commit r3464.
2006-02-03 20:36:15 +00:00
fcfa746244 Linux compat changes, fix for (really old) bug in VertexBufferManager shutdown, GUI header reorganization for gcc 4.0
This was SVN commit r3437.
2006-01-29 18:23:47 +00:00
20d038efda profiling indicates memcpy is a bottleneck, so globally replace all of them with memcpy2 (hand-optimized). depending on transfer size, this is 10%..300% faster. also made memcpy2 into a macro instead of thunk function because vc7 was still generating a jump.
This was SVN commit r3057.
2005-10-30 16:19:20 +00:00