After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 360495 - Errors in Java/Verilog syntax files
Errors in Java/Verilog syntax files
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-07 21:02 UTC by Jeff Walden (remove +bgo to email)
Modified: 2006-10-14 11:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for all issues described (3.87 KB, patch)
2006-10-07 21:03 UTC, Jeff Walden (remove +bgo to email)
none Details | Review
Addresses comments (3.78 KB, patch)
2006-10-09 06:21 UTC, Jeff Walden (remove +bgo to email)
none Details | Review

Description Jeff Walden (remove +bgo to email) 2006-10-07 21:02:12 UTC
Verilog:
- missing "begin" in keywords (corresponds to already-present "end")

Java:
- "enum" Java 1.5 type not present
- "assert" keyword not present
- "finally" in Modifiers list, not the Flow list (no visual difference)
- "const"/"gotol" [sic] in Modifiers list (both reserved keywords)
- "strictfp" modifier (of classes, interfaces, methods) not present
- "true"/"false" not present as literals (and "null" not grouped as literal)
Comment 1 Jeff Walden (remove +bgo to email) 2006-10-07 21:03:36 UTC
Created attachment 74249 [details] [review]
Patch for all issues described

The patch was made against trunk, for what it's worth.  I suspect it applies to older versions of GNOME as well.
Comment 2 Paolo Maggi 2006-10-08 09:50:36 UTC
Thank you very much for the patch.

The patch against java.lang introduces new translatable strings so we cannot commit it for gsv 1.8.

Could you please refactor your patch avoiding adding new keyword-lists?
Comment 3 Jeff Walden (remove +bgo to email) 2006-10-09 06:21:35 UTC
Created attachment 74328 [details] [review]
Addresses comments

(In reply to comment #2)
> The patch against java.lang introduces new translatable strings so we cannot
> commit it for gsv 1.8.

Is this an artifact of the source organization?  Language keywords and syntax really shouldn't be localizable (unless there exist real-world languages with fully localized syntax -- please enlighten me if such languages exist!).  I looked through the de.po file to check whether keywords were localized, and it looks like the _names are localized.  However, note that the "new" _names I used in java.lang are already used in javascript.lang, so they're not "new strings".  Unless "#:" lines in PO files have semantic meaning in the final localization (web searches indicate they have none, and if they did I'd be surprised if there weren't tools to auto-fix them), translators shouldn't have any extra work to perform.  What am I missing here?

(To be absolutely clear, when it comes down to it whether or not this makes 1.8 doesn't really matter to me if I can change the files locally for the same effect.  Everyone else, tho, has to be able to find this bug or guess that the language definitions are in uncompiled code to make the change.)

> Could you please refactor your patch avoiding adding new keyword-lists?

I removed the literals section from java.lang since it's mostly just there to follow the example of the excellently-formatted javascript.lang, but I don't see how you can get rid of the reserved keywords keyword-list -- nothing else with the same styling exists in java.lang.  For now I assume this is what you wanted.
Comment 4 Paolo Borelli 2006-10-14 11:06:42 UTC
The only localized part are the _names. Since as you say the string you use is already present in javascript.lang, we can commit the patch without breaking the string freeze.

In fact I just committed it :)

Thanks a lot for the patch!


2006-10-14  Paolo Borelli  <pborelli@katamail.com>

	* gtksourceview/language-specs/java.lang:
	* gtksourceview/language-specs/verilog.lang:

	Add some missing keywords. Bug #360495, patch by Jeff Walden.