- status: unread --> accepted
- assigned_to: Michael Rohan
Hello,
When I followed Zanyblue manual:
The zbmcompile utility must be used with the
“-a” command line option to generate the accessor packages and the target parent package is given as “Messages”:
$ zbmcompile -a -i -v Messages Moons
This is ZBMCompile, Version 0.2.0 ALPHA (r2621) at 8:58:04 AM on Feb 21, 2012
Copyright (c) 2009-2012, Michael Rohan. All rights reserved
Loaded 18 messages for the facility "Moons" (4 locales)
Performing consistency checks for the facility "Moons"
Performing consistency checks for the accessor package generation
Loaded 1 facilities, 5 keys, 4 locales and 18 messages
...
ZBMCompile completed at 8:58:04 AM on Feb 21, 2012, elapsed time 0:00:00.176
But my ZBMCompile creates only one locale with the facility argument with capital first letter as I wanted to get it in upper case for my Ada source code:
$ zbmcompile -i -v -a Moons_Messages Moons
This is ZBMCompile, Version 1.2.0 BETA (r2860X) on 18/04/2016 at 10:55
Copyright (c) 2009-2014, Michael Rohan. All rights reserved
Loaded 5 messages for the facility "Moons" (1 locales)
Performing consistency checks for the facility "Moons"
Performing consistency checks for the accessor package generation
Loaded 1 facilities, 5 keys, 1 locales and 5 messages
...
ZBMCompile completed on 18/04/2016 at 10:55, elapsed time 0:00:00.092
Though it is ok with the facility argument in lowercase:
cmd$ zbmcompile -i -v -a Moons_Messages moons
This is ZBMCompile, Version 1.2.0 BETA (r2860X) on 18/04/2016 at 10:55
Copyright (c) 2009-2014, Michael Rohan. All rights reserved
Loaded 20 messages for the facility "moons" (4 locales)
Performing consistency checks for the facility "moons"
Performing consistency checks for the accessor package generation
Loaded 1 facilities, 5 keys, 4 locales and 20 messages
...
ZBMCompile completed on 18/04/2016 at 10:55, elapsed time 0:00:00.092
Maybe the issue comes from Scan_Properties in zanyblue-text-catalogs-load_facility.adb:
Search_Pattern : constant String := To_UTF8 (Source_Name)
& "_*."
& To_UTF8 (Extension);
Source_Name = "Moons" doesn't match files as "moons_fr.properties", etc.
In my opinion, either ZB should provide an option to set the generated Ada name, or the casing search pattern source name should be lower case.
Thanks, Pascal.