Summary: | Add mimetype for vala source code | ||
---|---|---|---|
Product: | shared-mime-info | Reporter: | Sebastian Dröge (slomo) <slomo> |
Component: | freedesktop.org.xml | Assignee: | Jonathan Blandford <jrb> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, j, mathias.hasselmann |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
vala.diff
updated patch with test case Heuristic message catalog patch The script for creating the message catalog patch. updated patch |
Description
Sebastian Dröge (slomo)
2007-08-28 03:10:31 UTC
Created attachment 11305 [details] [review] vala.diff Created attachment 11361 [details] [review] updated patch with test case I've changed the magic to be more specific so that it won't conflict with C# source code. I've also added a test case and checked that it's working. Hm, your patch has the small problem that the magic would only match if using GLib; is at the beginning... if "using Gtk;" or similar is at the beginning the C# magic would match. The magic code for C# and Vala can only catch the case where the using directive is at the beginning. Most source code files start with a license, so that won't work there. globs make a lot more sense for source code. The magic in my patch makes sense so that simple Vala files don't get misdetected as C#, else we'd need to remove the magic of both, Vala and C#, and just use globs. *** Bug 12246 has been marked as a duplicate of this bug. *** Maybe also translations adopted from C# (with "adopted" as in s/C#/Vala/) should be marged? Created attachment 11374 [details]
Heuristic message catalog patch
This patch heuristically adds translations for the string "Vala source code".
Guess this works for most languages. Well, and if one translation is wrong
native speakers will complain soon.
Created attachment 11375 [details]
The script for creating the message catalog patch.
Maybe this script is useful for other database updates.
Created attachment 11407 [details] [review] updated patch I've removed the magic of both, Vala and C#, and also added a name-only test-case for C#, as discussed on IRC. 2007-08-31 Bastien Nocera <hadess@hadess.net> * freedesktop.org.xml.in: Remove dubious C# magic, and add Vala mime-type, patch from Jürg Billeter <j@bitron.ch> (Closes: #12195) * tests/*: add C# and Vala test cases |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.