summaryrefslogtreecommitdiff
path: root/tools/genlang (follow)
Commit message (Collapse)AuthorAge
* Create binary voice string archive on target.Dominik Riebeling2012-06-09
| | | | | | | | | | | | | | | | | | | | | | | 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
* genlang: add VOICE_ prefix to unused voice-only strings.Dominik Riebeling2012-06-05
| | | | | | | | | | | voicefont uses the id prefix VOICE_ to recognize voice-only strings. Unused ids get a NOT_USED prefixed entry to keep order correct. However, since this applies to voice-only entries as well voicefont doesn't recognize those as voice entries and puts them at the end of the lang strings table. This messes up the order in the created voice file, so add VOICE_ as prefix so voicefont can identify them. Change-Id: Ic3f2ec038ce1ed93c84286979e6583b478fa697e
* Fix FS#12272 - genlang changes broke some targetsTorne Wuff2011-09-12
| | | | | | | | New genlang code forgot to allow for the wildcard being the full target name with a * appended. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30514 a1c6a512-1295-4272-9138-f99709370657
* Make genlang faster by doing better regexes.Thomas Martitz2011-09-08
| | | | | | | | | | | | With this change generating all languages takes only two-thirds the time. It changes the acceptable syntax for target wildcards in language files, however: instead of a comma-separated list of glob-style wildcards it requires that it be a comma-separated list of prefix matches, i.e. the * can only appear at the end of each wildcard, and ? cannot be used. This does not require any changes to existing language files as they are all already in this form. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30481 a1c6a512-1295-4272-9138-f99709370657
* Make genlang rewrite english.list if it exists but is older than english.langJens Arnold2011-06-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30056 a1c6a512-1295-4272-9138-f99709370657
* Only create english.list for binary output.Björn Stenberg2011-03-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29499 a1c6a512-1295-4272-9138-f99709370657
* Added english id caching to speed up builds.Björn Stenberg2011-03-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29498 a1c6a512-1295-4272-9138-f99709370657
* Revert r29494 as It is a) buggy b) doesn't seem to do any good in terms of ↵Marcin Bukat2011-03-02
| | | | | | speed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29495 a1c6a512-1295-4272-9138-f99709370657
* genlang: Remove unused subs. Use precompiled regex in parsetarget(). Minor ↵Marcin Bukat2011-03-02
| | | | | | tweek by substituting s/\r//g with tr/\r//d. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29494 a1c6a512-1295-4272-9138-f99709370657
* Almost 30% faster.Björn Stenberg2011-03-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29488 a1c6a512-1295-4272-9138-f99709370657
* lang.h voice comments were off by 1, fixedJeffrey Goode2010-05-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26296 a1c6a512-1295-4272-9138-f99709370657
* Fix crash in talk.c logf line when outputting voice only clips, more ↵Jeffrey Goode2010-05-26
| | | | | | comments in lang.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26294 a1c6a512-1295-4272-9138-f99709370657
* Fix genlang tool broken by r22945Peter D'Hoye2009-11-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23540 a1c6a512-1295-4272-9138-f99709370657
* Change the .lng files to contain strings from multiple users. Still ↵Tom Ross2009-10-18
| | | | | | 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
* Add support to genlang to sort strings based on their user. This is useful ↵Tom Ross2009-10-17
| | | | | | for translatable plugins. Currently, the .lng that is generated is hard-coded to only contain strings marked as core. The output of this version of genlang should be the same as non-sorting, so we don't need to change the version number. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23218 a1c6a512-1295-4272-9138-f99709370657
* RTL support in menusTomer Shalev2009-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22945 a1c6a512-1295-4272-9138-f99709370657
* Revert usage string change from r22930.Tomer Shalev2009-10-05
| | | | | | | | | | Amiconn: "langv2" had nothing to do with the language version byte in the generated .lng file, so "langv4" makes no sense. It refers to the format of the .lang. The current, tag-based format which allows to restrict strings to certain targets or features is called langv2 versus the old, simpler format. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22939 a1c6a512-1295-4272-9138-f99709370657
* Use similiar constants in genlang and language.c.Tomer Shalev2009-10-04
| | | | | | | | - In the future, they should be united. - Fix bug in max size calculation git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22930 a1c6a512-1295-4272-9138-f99709370657
* More GSoC related work. Have genlang parse the user field of the lang files. ↵Tom Ross2009-03-03
| | | | | | For now, all user strings are core. In the future more users will be added. Add missing user fields to a few phrases in some languages. Genlang will also warn if a phrase is missing the user field or it is unknown. The output format is unchanged. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20187 a1c6a512-1295-4272-9138-f99709370657
* Move generated lang-related files to their own directory in preparation of ↵Tom Ross2009-03-02
| | | | | | localizable plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20170 a1c6a512-1295-4272-9138-f99709370657
* Make genlang output errors on STDERR. FS#9668 by Tomer Shalev.Jonas Häggqvist2009-02-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20130 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9494 by Yoshihisa Uchida: add support for building the simulators ↵Maurus Cuelenaere2009-02-04
| | | | | | under Windows using MingW git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19923 a1c6a512-1295-4272-9138-f99709370657
* Make genlang emit a warning if a translation file has an dest string for a ↵Jonas Häggqvist2008-11-08
| | | | | | phrase that isn't deprecated, since this will result in empty strings when using that translation. This will mess up the build table, but the plan is to either quickly update the translation, or simply delete the phrase and let the translator provide a full translation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19039 a1c6a512-1295-4272-9138-f99709370657
* Fix the target pattern matching in genlang. Not sure if it is the 'right' ↵Magnus Holmgren2008-10-28
| | | | | | fix, but it unbreaks the e200 build for me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18903 a1c6a512-1295-4272-9138-f99709370657
* Add a -s option to genlang to sort a language file into the same order as ↵Dave Chapman2008-08-17
| | | | | | english.lang git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18303 a1c6a512-1295-4272-9138-f99709370657
* Only print the header if we're running update.Jonas Häggqvist2008-08-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18253 a1c6a512-1295-4272-9138-f99709370657
* Fix genlang to not remove the header from translation files.Jonas Häggqvist2008-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18248 a1c6a512-1295-4272-9138-f99709370657
* make the warnings gcc-style to be trapped by the scripts easierDaniel Stenberg2008-02-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16341 a1c6a512-1295-4272-9138-f99709370657
* Make genlang shut up about the non-error of not putting quotes around "none" ↵Jonas Häggqvist2008-02-17
| | | | | | in the voice. Also make it print slightly nicer errors/warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16340 a1c6a512-1295-4272-9138-f99709370657
* Make genlang ignore leading and trailing whitespace in source and desc lines ↵Jonas Häggqvist2007-09-01
| | | | | | (not the strings). If this behavior is unwanted, feel free to revert. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14567 a1c6a512-1295-4272-9138-f99709370657
* fix the -o output for indexes where there's no voice given, this is forDaniel Stenberg2007-08-10
| | | | | | | | FS#7576, and it typically caused a bazillion of LANG_SET_BOOL_YES to get output when -o was used with non-english git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14277 a1c6a512-1295-4272-9138-f99709370657
* Fix for FS#7574. It previously failed to properly deal with multiple destDaniel Stenberg2007-08-10
| | | | | | | | | | strings. I also added the numerical id number for strings in the generated header file, which is useful when the new lngdump tool is used and you want to compare the ids for the built-in strings to the ones in the generated binary files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14274 a1c6a512-1295-4272-9138-f99709370657
* *** Lang v2 cleanup (FS#6574) ***Nils Wallménius2007-08-05
| | | | | | | | | | | | | | | | | | | 1) Introduces apps/features.txt that controls which strings are included for each target based on defines. 2) .lng and .voice files are now target specific and the format versions of both these file types have been bumped, which means that new voice files are needed. 3) Use the 'features' mechanism to exclude strings for targets that didn't use them. 4) Delete unused and deprecated and duplicated strings, sort strings in english.lang Some string IDs were changed so translations will be slightly worse than before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
* skip comments when trying to parse and compare phrases!Daniel Stenberg2007-08-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14169 a1c6a512-1295-4272-9138-f99709370657
* when generating binary output, we now let the master language file properlyDaniel Stenberg2007-08-02
| | | | | | | | dictate when a certain phrase doesn't exist and should be ignored in the output git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14150 a1c6a512-1295-4272-9138-f99709370657
* Make genlang output correct .lng files when the 'none' keyword is used but ↵Nils Wallménius2007-07-24
| | | | | | is not all lowercase git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13971 a1c6a512-1295-4272-9138-f99709370657
* attempt to fix -uDaniel Stenberg2007-06-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13721 a1c6a512-1295-4272-9138-f99709370657
* FS#6652 fix attempt. Make the phrase id counting take the dest pattern intoDaniel Stenberg2007-05-20
| | | | | | | account so that the binary and source code output gets the same numbering. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13443 a1c6a512-1295-4272-9138-f99709370657
* match target names more explicitly so that h10 won't match h100 etcDaniel Stenberg2007-03-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12769 a1c6a512-1295-4272-9138-f99709370657
* prevent the incorrect warnings displayed when -u was used, added additionalDaniel Stenberg2006-10-28
| | | | | | | info to the warning output and moved a comment to the accurate place git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11371 a1c6a512-1295-4272-9138-f99709370657
* Make -t support a range of "targets", which reallly should be one targetDaniel Stenberg2006-10-18
| | | | | | | and a range of named features. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11254 a1c6a512-1295-4272-9138-f99709370657
* Fixed a bug where it didn't warn on lack of quotes as it was supposed to.Daniel Stenberg2006-04-27
| | | | | | | Now this treats a string given without quotes as "" (but still warns about it). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9824 a1c6a512-1295-4272-9138-f99709370657
* More usable playlist generation, added "<All tracks>" entry to tagMiika Pekkarinen2006-04-19
| | | | | | | browser. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9729 a1c6a512-1295-4272-9138-f99709370657
* * added more safety checks for failed open()sDaniel Stenberg2006-04-06
| | | | | | | | * allow 'deprecated' as a keyword for strings marked as ... deprecated! * warns on stderr if a given string is given without quotes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9533 a1c6a512-1295-4272-9138-f99709370657
* we're on langversion 3!Daniel Stenberg2006-04-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9472 a1c6a512-1295-4272-9138-f99709370657
* langv2Daniel Stenberg2006-04-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9470 a1c6a512-1295-4272-9138-f99709370657
* fixed comment in generated header fileDaniel Stenberg2005-07-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7273 a1c6a512-1295-4272-9138-f99709370657
* Bug fix: The trailing null byte wasn't added when there was whitespace after ↵Jens Arnold2005-02-01
| | | | | | the closing quote in the .lang file, leading to garbled strings when doing non-english builds. Thanks to quelsaruk for tracking this down. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5730 a1c6a512-1295-4272-9138-f99709370657
* Fix: Deprecated voice-only entries were treated as (deprecated) standard ↵Jens Arnold2005-01-31
| | | | | | LANG_ entries. Now they are detected by the id matching VOICE_*. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5720 a1c6a512-1295-4272-9138-f99709370657
* New way of handling the builtin language strings. Now the string pointers ↵Jens Arnold2005-01-19
| | | | | | are no longer stored as initialised data, but calculated by walking one long string containing all language strings separated by \0. While this doesn't need more RAM, it fixes the problem that loading incomplete .lng files after complete ones did not reset the missing strings to the default, and it also decreases the binary size by >1700 bytes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5608 a1c6a512-1295-4272-9138-f99709370657