Garoth / plutocracy-from-google-code

Automatically exported from code.google.com/p/plutocracy
GNU General Public License v2.0
0 stars 0 forks source link

Improve genlang.py for modifying translation files #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Modify genlang.py to:
* Read in the output file if it exists
* Merge the key-value tokens within with the scanned source tokens
* Remove or comment-out obsolete tokens
* Add new tokens in sorted order

Original issue reported on code.google.com by risu...@gmail.com on 14 Apr 2008 at 8:21

GoogleCodeExporter commented 9 years ago
Some details on key-value format:

* This is the format we use for config files
* Both /* C comments */ and // C++ comments are allowed 
* Composed of tokens that are one of:
  - an_Identifier_Without_Quotes
  - "A double quoted string" 'or a singly quoted string'
  - -1.23456
* Identifiers cannot start with a dash or number but may contain one
* Statements come in pairs starting with one key token and one or more value 
tokens
* String and numerical tokens are allowed to concatenate and spread over 
multiple lines:
    my_string "the value of this var is"
              "wrapped over multiple lines"
    my_number 3.14 
              159265

Original comment by risu...@gmail.com on 15 Apr 2008 at 1:28

GoogleCodeExporter commented 9 years ago
I can do this starting Saturday if no one else can. But until then I have 2 
Exams so
I have no time.

Original comment by Kas...@gmail.com on 15 Apr 2008 at 7:05

GoogleCodeExporter commented 9 years ago
Kasuko: it's yours. Please remember to go over the wiki for coding style and 
issue
tracker rules. Original issue filed:

http://code.google.com/p/plutocracy/issues/detail?id=28

GenLang is now committed, but that issue has my original versions attached. Ask 
me if
you have any questions about how it works.

Original comment by gar...@gmail.com on 16 Apr 2008 at 4:45

GoogleCodeExporter commented 9 years ago
Make sure that the parser can handle this amount of stress: 

http://amanieu.homelinux.com/test_input.txt 
http://amanieu.homelinux.com/test_output.txt

</evil>

Original comment by gar...@gmail.com on 16 Apr 2008 at 10:20

GoogleCodeExporter commented 9 years ago
If possible, also try to add a line number and source file above the // 
English, like
this:
// plutocracy.c:200
// English: blah blah blah

Original comment by amanieu on 17 Apr 2008 at 9:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The stress test, although it works, it's in fact a special case as the string
contains a /* <stuff> *///<stuff> so it doesn't break but if it wasn't the last 
line
or there wasn't a C++ style comment after the C style comments end it will cause
problems. I will sanitize the string by changing "*/" to "* /" so the C style 
comment
will only end when the file tells it to end.

Original comment by Kas...@gmail.com on 24 Apr 2008 at 3:00

GoogleCodeExporter commented 9 years ago
genlang.py now preserves changes, but can't quite get Deprecation to work.

Original comment by Kas...@gmail.com on 24 Apr 2008 at 6:28

GoogleCodeExporter commented 9 years ago
Changing the status of this to 'Stalled' since we can't get in touch with 
Kasuko. If
anyone is up for it, please grab this issue.

Original comment by risu...@gmail.com on 27 May 2008 at 3:14

GoogleCodeExporter commented 9 years ago
This should be an easy issue since it is well-separated from the rest of the 
program.

Original comment by risu...@gmail.com on 7 Jun 2008 at 5:42

GoogleCodeExporter commented 9 years ago
Kasuko's AWOL. Any takers?

Original comment by risu...@gmail.com on 20 Jun 2008 at 9:29

GoogleCodeExporter commented 9 years ago
Enhancement -> Feature

Original comment by risu...@gmail.com on 17 Jul 2008 at 11:22

GoogleCodeExporter commented 9 years ago
Enhancement -> Feature (again)

Original comment by risu...@gmail.com on 17 Jul 2008 at 11:25

GoogleCodeExporter commented 9 years ago
Contribute tag

Original comment by risu...@gmail.com on 17 Jul 2008 at 11:30

GoogleCodeExporter commented 9 years ago

Original comment by risu...@gmail.com on 18 Jul 2008 at 2:11

GoogleCodeExporter commented 9 years ago
The latest game requirements include matching strings in Python code (there 
aren't
any yet) and messages transmitted via N_send. These require just adding more 
regular
expressions and probably adding .py files to the ones checked.

Original comment by gar...@gmail.com on 1 Nov 2008 at 4:48

GoogleCodeExporter commented 9 years ago

Original comment by gar...@gmail.com on 1 Nov 2008 at 5:07