Commit graph

25 commits

Author SHA1 Message Date
Solomon Peachy
e4345f2db8 build: Make the lang.h and genlang.h depend on the genlang tool
(So if genlang is updated, regenerate the language headers)

Change-Id: I1de94eff609b27788db4f08e2d99992b8f360849
2021-04-10 22:59:28 -04:00
Solomon Peachy
c16f9142f7 build: Make all other language files "depend" on english.lang
If we update english.lang, we need to re-run genlang on the other
language files so any changes are picked up.

Change-Id: I7d296b3cc814871e881bdeac2784e64705bde10b
2021-03-07 04:10:47 +00:00
Solomon Peachy
b339400531 voice: Last commit didn't work from a clean build.
Change-Id: Ib1abe1ae365d211b99fdaaf5f20a516dcc5cb167
2020-12-11 16:26:27 -05:00
Solomon Peachy
227ac2b715 voice: Add voice-corrections.txt to voicestrings.zip
This is in keeping with un-hardcoding stuff from rbutil.

Change-Id: I8409c203bbe378a2cb9994ac0a327e9a324ff52d
2020-12-11 16:15:02 -05:00
William Wilgus
2ffe87902d Add Invalid Voice Announcement to the voice system FS#13216
When a voice file is invalid or fails to load the voice system splash a
message 'Invalid Voice'

Now we supply a single voice file (currently only english is used)
the support for other languages is in but I haven't set it up to
look for anything but InvalidVoice_english.talk

Also adds a one time kill voice thread function
 ie. it doesn't allow re-init after killing the voice thread & queue

Change-Id: I7b43f340c3cc65c65110190f0e0075b31218a7ac
2020-09-20 16:08:49 -04:00
Solomon Peachy
2305966d84 updatelang: New tool to update language files.
Change-Id: I3c18bb34770b4b4b321199149a2ea693dfbdb7f4
2020-07-27 14:58:38 -04:00
Solomon Peachy
a5df94beb5 build: Tweaks to better support non-English as primary language
* get rid of $(LANGUAGE) in top-level makefile (and configure script)
 * un-hardcode English-as-primary-language in a couple more places
 * allow DEFAULT_VOICE_LANG to be overriden

To actually change the primary from English, one must change:

 * $english in voice.pl
 * hardcoded 'english' in rbutil
 * $ENGLISH in apps/lang/lang.make
 * DEFAULT_VOICE_LANG in apps/talk.c
 * configure script (default prompt)

Of course, if one wants to change the default UI language, it's simpler
to change the default language setting variable at compile time, or
perhaps by adding a configuration file with the desired value into the
.rockbox directory when the .zip is assembled.

Change-Id: If5cf76019d416e838628a2eccd4ec7d6cbaeeb74
2020-07-21 17:22:45 +00:00
Solomon Peachy
688c89cfe1 genlang: More voice-related fixes.
* Use consistent ID numbering
 * Use consistent logic for voicelist and voicebin files
 * Fix situations where English <-> English would fail in strange ways
 * Delete leftover tmpfile.
 * Off-by-one error in voice validation code
 * Off-by-one error in voicelist generation

Change-Id: Ib3cea2c6612138b1cbe614dacbe51000199cc9ad
2020-07-21 11:59:47 +00:00
Solomon Peachy
b84a153c76 lang: Fix boneheaded mistake in ca31bad8
Change-Id: Iee3842ab7b5d4660855b683141a45a09c187b29f
2020-07-13 09:19:37 -04:00
Solomon Peachy
ca31bad8a5 voice: Ensure all voicelist files in voicefiles.zip are complete
Backfill all missing strings from the English master translation.

Change-Id: Ie28f4cf804c22141a2c62f82ed8b2d71c822c74a
2020-07-13 08:26:53 -04:00
Solomon Peachy
55eb1c54eb FS#7704 - Talk support for plugins
Original patch by Mario Lang
Heavily updated by Igor Poretsky
Further updated by myself

  This patch breaks binary API compatibility by placing the new
  functions where they make the most logical sense. IMO this is
  the better approach to take given the scope of the changes needed
  for talk support.

  Since binary API is changing, the patch also moves some other
  functions around to more logical locations.

  As well as voice support in plugins, this patch voice-enables several
  simple plugins.  There will be follow-up patches for many plugins that
  build on this one.

Change-Id: I18070c06e77e8a3c016c2eb6b6c5dbe6633b9b54
2019-07-20 08:48:35 +02:00
Amaury Pouly
13364c5525 Fix make race conditions reharding lang.h
The bug is due to a stupid make misfeature. The article [1] contains much more
information but in a nutshell, the following code:

a b: c
	bla

is equivalent to:

a: c
	bla
b: c
	bla

This is bad because in parallel runs (make -j typically), "bla" can be run
TWICE and even worse, twice in PARALLEL. Obviously the result will be
completely unexpected. This is a real bummer because on the other hand,
the following code:

%.c %.h: %:in
	bla

actually expresses the fact that bla produces two files. For some reasons,
pattern rules work differently from implicit rules.

This commit attempts to fix the problem with lang.h by rewriting (simplified):

lang.c lang.h: lang.in
	genlang

as

lang.h: lang.in
	genlang
lang.c: lang.h

This works (it correctly expresses the dependency chain and ensures genlang runs
once) but as one drawback: if one manually removes lang.c, then genlang will not
re-run since the second rule does nothing. This is minor drawback since no one
ever removes lang.c manually and "clean" removes lang.h which triggers a rebuild.

[1]: https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html

Change-Id: Ic0bf7c7c203dc599b00fde457946d2316c70474e
2017-09-24 23:32:47 +02:00
Amaury Pouly
acc3ef3b6f Print "GEN lang.h" when generated language header.
Hopefully this will help narrow down the problem with LANG_* error message,
I have the feeling that lang.h is not generated in time but it's very hard to
reproduce.

Change-Id: I02b6c98ed9c7e7168fad10dcf1142e307fbc6093
2017-09-22 21:06:30 +02:00
Frank Gevaerts
45c6785e22 Attempt to fix dependencies for lang.h, lang_core.c and lang_core.o
This hopefully fixes occasional build failures

Change-Id: Iff79d2066d6421cca78cc3ecb6cb8db57351ab1f
2016-08-21 17:00:25 +02:00
Dominik Riebeling
4e41c6d9ba Only check lng files for MAX_LANGUAGE_SIZE.
Since the build system now creates files holding the voice strings and an
archive holding those creating MAX_LANGUAGE_SIZE needs to be created using a
more specific wildcard.

Change-Id: Ia424533a8053e4817f23b8dd99f6ab3c324d584d
2012-06-09 23:04:42 +02:00
Dominik Riebeling
d6ef5a0d80 Create binary voice string archive on target.
Extend genlang to create files holding the voice strings in a binary format
similar to lng. Create such files for all languages during a normal build, put
them in a zip file and add them to rockbox.zip so they are installed with a
main build.

Creating a voice file requires access to the voice strings, which are currently
not distributed with Rockbox. Therefore it is necessary to either have access
to the source code of the installed build or to use a build the genlang service
on rockbox.org can retrieve the strings for, making it impossible for normal
users to generate a voice file for custom builds, test builds and older builds
that aren't supported by the rockbox.org script. It also requires a network
connection when creating voice files with Rockbox Utility even if creating a
voice file by itself isn't network related.

Furthermore, putting the voice strings on the target is also a prerequisite for
eventually supporting a TTS on the player.

Strip voice strings path.

Change-Id: Ic2f86130909b3b257986a348e5cfcf618c4500c3
2012-06-09 22:44:56 +02:00
Thomas Martitz
3b84012d63 Prettier genlang-features output. Use the same style for max_language_size.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27469 a1c6a512-1295-4272-9138-f99709370657
2010-07-17 15:33:35 +00:00
Jens Arnold
78fc9844a9 Oops, one explicit colon is enough (though an extra one doesn't hurt).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27411 a1c6a512-1295-4272-9138-f99709370657
2010-07-13 18:19:33 +00:00
Jens Arnold
9c4ba5e44d The simplification from r27406 changed the format of 'genlang-features': it used to have a leading colon. Fix missing target and feature specific strings resulting from that (mashed target name and first feature) by inserting a colon into the command line explicitly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27410 a1c6a512-1295-4272-9138-f99709370657
2010-07-13 18:16:17 +00:00
Teruaki Kawashima
e3fc65cfff change dependencies in make files:
* apps.make: depends on ctype.o instead of errno.o to depend on config-*.h so that it works for simulator.
* lang.make: add dependency of lang.h to make it sure that the file is updated properly when needed.
* plugins.make: object files don't depend on libpluginbitmaps.a.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24256 a1c6a512-1295-4272-9138-f99709370657
2010-01-17 13:03:10 +00:00
Tom Ross
ec2737b2c2 Change the .lng files to contain strings from multiple users. Still hard-coded to only output the core strings for now. Should be the majority of the core changes needed for translatable plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23241 a1c6a512-1295-4272-9138-f99709370657
2009-10-18 00:56:42 +00:00
Tom Ross
4fb5864a6c Move generated lang-related files to their own directory in preparation of localizable plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20170 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 06:13:18 +00:00
Björn Stenberg
a091d20ba0 Added 'keywords' and 'eol-style' properties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19218 a1c6a512-1295-4272-9138-f99709370657
2008-11-25 19:54:23 +00:00
Björn Stenberg
6640978129 Altered mkdepfile to use a single gcc call and post-process the output. This speeds up the dependency generation, especially in cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19169 a1c6a512-1295-4272-9138-f99709370657
2008-11-21 15:07:15 +00:00
Björn Stenberg
c6b3d38a15 New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-11-20 11:27:31 +00:00