Chameleon

Chameleon Commit Details

Date:2015-11-02 16:16:24 (4 years 18 days ago)
Author:ErmaC
Commit:2790
Parents: 2789
Message:Merge latest changes from Enoch Chameleon Branch.
Changes:
A/trunk/package/OptionalSettings/IntelSkl.txt
A/trunk/package/Scripts.templates/AddKernelOption
A/trunk/package/Patches/kernelPatcher.txt
A/trunk/package/OptionalSettings/CrsActiveConfig.txt
A/trunk/package/bin/po4a/lib/Locale/Po4a/AsciiDoc.pm
A/trunk/package/Scripts.templates/AddKernelOption/postinstall
A/trunk/package/Patches
M/trunk/package/po/nl.po
M/trunk/package/po/pl.po
M/trunk/package/po/it.po
M/trunk/package/bin/po4a/README
M/trunk/package/bin/po4a/po4a-gettextize
M/trunk/package/bin/po4a/lib/Locale/Po4a/Man.pm
M/trunk/package/bin/po4a/lib/Locale/Po4a/LaTeX.pm
M/trunk/i386/libsaio/bootstruct.h
M/trunk/package/po/pt.po
M/trunk/package/po/bg.po
M/trunk/package/bin/po4a/lib/Locale/Po4a/TransTractor.pm
M/trunk/i386/libsaio/disk.c
M/trunk/package/bin/po4a/lib/Locale/Po4a/Wml.pm
M/trunk/package/bin/po4a/lib/Locale/Po4a/TeX.pm
M/trunk/package/po/bs.po
M/trunk/package/po/cs.po
M/trunk/package/po/es.po
M/trunk/package/po/mk.po
M/trunk/doc/BootHelp.txt
M/trunk/package/po/ko.po
M/trunk/i386/libsaio/efi.h
M/trunk/package/po/ro.po
M/trunk/package/bin/po4a/po4a-normalize
M/trunk/package/bin/po4a/lib/Locale/Po4a/Ini.pm
M/trunk/package/Scripts.templates/CleanOptions/clean_bootplist.pl
M/trunk/i386/libsaio/hfs.c
M/trunk/i386/libsaio/vbe.h
M/trunk/package/bin/po4a/NEWS
M/trunk/i386/libsaio/fake_efi.c
M/trunk/package/po/en.po
M/trunk/package/po/ar.po
M/trunk/package/bin/po4a/lib/Locale/Po4a/Xml.pm
M/trunk/package/bin/po4a/lib/Locale/Po4a/Sgml.pm
M/trunk/package/po/fr.po
M/trunk/package/po/hr.po
M/trunk/i386/libsaio/gma.c
M/trunk/i386/boot2/boot.c
M/trunk/package/Scripts/Main/Standardpostinstall
M/trunk/package/buildpkg.sh
M/trunk/i386/boot2/boot.h
M/trunk/package/po/ca.po
M/trunk/package/bin/po4a/po4a
M/trunk/package/po/sr.po
M/trunk/package/po/pt-BR.po
M/trunk/package/po/fa.po
M/trunk/package/Resources/templates/Localizable.strings
M/trunk/package/bin/po4a/lib/Locale/Po4a/Text.pm
M/trunk/package/po/de.po
M/trunk/package/po/ja.po
M/trunk/package/po/he.po
M/trunk/i386/boot2/options.c
M/trunk/package/po/hu.po
M/trunk/package/bin/po4a/po4a-translate
M/trunk/package/po/chameleon.pot
M/trunk/package/bin/po4a/lib/Locale/Po4a/Po.pm
M/trunk/package/bin/po4a/lib/Locale/Po4a/Prop.pm
M/trunk/package/Distribution
M/trunk/package/po/ru.po
M/trunk/i386/boot2/drivers.c
M/trunk/i386/libsaio/saio_types.h
M/trunk/package/po/zh_TW.po
M/trunk/package/po/id.po
M/trunk/i386/libsaio/cpu.c
M/trunk/package/po/el.po
M/trunk/package/po/zh_CN.po
M/trunk/package/bin/po4a/po4a-updatepo
M/trunk/package/Scripts/Main/ESPpostinstall

File differences

trunk/i386/libsaio/efi.h
159159
160160
161161
162
163
164
165
166
167
168
169
162170
163171
164172
// ACPI 3.0 Table GUID in EFI System Table
#define EFI_ACPI_30_TABLE_GUID EFI_ACPI_20_TABLE_GUID
// The EFI variable GUID for the 'FirmwareFeatures' and friends. Also known as AppleFirmwareVariableGuid in other sources.
#define APPLE_FIRMWARE_VARIABLE_GUID \
{0x4D1EDE05, 0x38C7, 0x4A6A, {0x9C, 0xC6, 0x4B, 0xCC, 0xA8, 0xB3, 0x8C, 0x14 } }
// The EFI variable GUID for the 'boot-args' variable and others. Also known as AppleNVRAMVariableGuid in other sources.
#define APPLE_NVRAM_VARIABLE_GUID \
{0x7C436110, 0xAB2A, 0x4BBB, {0xA8, 0x80, 0xFE, 0x41, 0x99, 0x5C, 0x9F, 0x82 } }
typedef union {
EFI_GUID Guid;
EFI_UINT8 Raw[16];
trunk/i386/libsaio/bootstruct.h
135135
136136
137137
138
138139
139140
140141
config_file_t smbiosConfig;// smbios.plist
config_file_t helperConfig;// boot helper partition's boot.plist
config_file_t ramdiskConfig;// RAMDisk.plist
config_file_t kernelConfig;// kernel.plist
bool memDetect;
} PrivateBootInfo_t;
trunk/i386/libsaio/hfs.c
161161
162162
163163
164
164
165165
166166
167167
......
256256
257257
258258
259
259
260260
261261
262262
......
285285
286286
287287
288
288
289289
290290
291291
......
324324
325325
326326
327
327
328328
329329
330330
......
337337
338338
339339
340
340
341341
342342
343343
......
345345
346346
347347
348
348
349349
350350
351351
352352
353353
354354
355
355
356356
357357
358358
......
480480
481481
482482
483
483
484484
485485
486486
......
512512
513513
514514
515
515
516516
517517
518518
......
530530
531531
532532
533
533
534534
535535
536536
......
579579
580580
581581
582
582
583583
584584
585585
......
597597
598598
599599
600
600
601601
602602
603603
604604
605605
606606
607
608
607
608
609609
610610
611611
......
672672
673673
674674
675
675
676676
677677
678678
......
12261226
12271227
12281228
1229
1229
12301230
12311231
12321232
#ifdef __i386__
CacheInit(ih, gCacheBlockSize);
#endif
return 0;
return 0L;
}
#ifdef __i386__
verbose("HFS signature was not present.\n");
gCurrentIH = 0;
return -1;
return -1L;
}
gIsHFSPlus = 1;
CacheInit(ih, gCacheBlockSize);
}
return 0;
return 0L;
}
//==============================================================================
if (dirID == 0)
{
return -1;
return -1L;
}
filePath++;
if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat))
{
return -1;
return -1L;
}
#if UNUSED
// Check file owner and permissions.
if (flags & (kOwnerNotRoot | kPermGroupWrite | kPermOtherWrite))
{
return -1;
return -1L;
}
#endif
result = ReadFile(entry, &length, base, offset);
if (result == -1)
{
return -1;
return -1L;
}
getDeviceDescription(ih, devStr);
if (HFSInitPartition(ih) == -1)
{
return -1;
return -1L;
}
dirID = kHFSRootFolderID;
if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat))
{
printf("HFS: Resolve path '%s' failed\n", filePath);
return -1;
return -1L;
}
if (gIsHFSPlus)
printf("Allocation offset 0x%x\n", (unsigned long)gAllocationOffset);
#endif
*firstBlock = ((u_int64_t) GetExtentStart(extents, 0) * (u_int64_t) gBlockSize + gAllocationOffset) / 512ULL;
return 0;
return 0L;
}
{
printf("ReadFile(HFS%s): Offset is too large.\n", gIsHFSPlus ? "+" : "");
return -1;
return -1L;
}
if ((*length == 0) || ((offset + *length) > fileLength))
*length = ReadExtent((char *)extents, fileLength, fileID, offset, *length, (char *)base, 0);
return 0;
return 0L;
}
//==============================================================================
static long GetCatalogEntryInfo(void * entry, long * flags, u_int32_t * time, FinderInfo * finderInfo, long * infoValid)
{
u_int32_t tmpTime = 0;
long valid = 0;
u_int32_t tmpTime = 0L;
long valid = 0L;
// Get information about the file.
*infoValid = valid;
}
return 0;
return 0L;
}
//==============================================================================
static u_int32_t GetExtentSize(void * extents, u_int32_t index)
{
u_int32_t size = 0;
u_int32_t size = 0L;
HFSExtentDescriptor *hfsExtents = extents;
HFSPlusExtentDescriptor *hfsPlusExtents = extents;
trunk/i386/libsaio/vbe.h
211211
212212
213213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
214231
215232
216233
mode1280x1024x555 = 0x119,
mode1280x1024x565 = 0x11A,
mode1280x1024x888 = 0x11B,
mode1600x1200x8 = 0x11C,
mode1600x1200x1555= 0x11D,
mode1600x1200x565 = 0x11E,
mode1600x1200x888 = 0x11F,
mode320X200X8888 = 0x140,
mode640X400X8888 = 0x141,
mode640X480X8888 = 0x142,
mode800X600X8888 = 0x143,
mode1024X768X8888 = 0x144,
mode1280X1024X8888= 0x145,
mode320X200X8 = 0x146,
mode1600X1200X8888= 0x147,
mode1152X864X8 = 0x148,
mode1152X864X1555 = 0x149,
mode1152X864X565 = 0x14A,
mode1152X864X888 = 0x14B,
mode1152X864X8888 = 0x14C,
modeSpecial = 0x81FF,
modeEndOfList = 0xFFFF
};
trunk/i386/libsaio/gma.c
999999
10001000
10011001
1002
1002
10031003
1004
1005
1004
1005
10061006
1007
1007
10081008
10091009
1010
1011
1010
1011
10121012
10131013
10141014
1015
1015
10161016
10171017
10181018
/* HD Graphics */
case GMA_SKYLAKE_ULT_GT1:// 1906
case GMA_SKYLAKE_ULT_GT15:// 1913
case GMA_SKYLAKE_ULT_GT2:// 1916 *
case GMA_SKYLAKE_ULT_GT2:// 1916
case GMA_SKYLAKE_ULX_GT1:// 190E
case GMA_SKYLAKE_ULX_GT2:// 191E *
case GMA_SKYLAKE_DT_GT2:// 1912 *
case GMA_SKYLAKE_ULX_GT2:// 191E
case GMA_SKYLAKE_DT_GT2:// 1912
case GMA_SKYLAKE_1921:// 1921
case GMA_SKYLAKE_ULT_GT3_E:// 1926 *
case GMA_SKYLAKE_ULT_GT3_E:// 1926
case GMA_SKYLAKE_ULT_GT3:// 1923
case GMA_SKYLAKE_ULT_GT3_28W:// 1927
case GMA_SKYLAKE_DT_GT15:// 1917 *
case GMA_SKYLAKE_DT_GT1:// 1902 *
case GMA_SKYLAKE_DT_GT15:// 1917
case GMA_SKYLAKE_DT_GT1:// 1902
case GMA_SKYLAKE_DT_GT4:// 1932
case GMA_SKYLAKE_GT4:// 193B
case GMA_SKYLAKE_GT3_FE:// 192B
case GMA_SKYLAKE_GT2:// 191B *
case GMA_SKYLAKE_GT2:// 191B
case GMA_SKYLAKE_192A:// 192A
case GMA_SKYLAKE_SRW_GT4:// 193A
case GMA_SKYLAKE_WS_GT2:// 191D
trunk/i386/libsaio/cpu.c
491491
492492
493493
494
495
494496
495497
496498
......
655657
656658
657659
660
661
658662
659663
660664
//case CPUID_MODEL_HASWELL_H:
case CPUID_MODEL_HASWELL_ULT:
case CPUID_MODEL_HASWELL_ULX:
case CPUID_MODEL_BROADWELL_HQ:
case CPUID_MODEL_SKYLAKE_S:
//case CPUID_MODEL_:
msr = rdmsr64(MSR_CORE_THREAD_COUNT); // 0x35
p->CPU.NoCores= (uint32_t)bitfield((uint32_t)msr, 31, 16);
case CPUID_MODEL_HASWELL_ULT:
case CPUID_MODEL_HASWELL_ULX:
case CPUID_MODEL_BROADWELL_HQ:
case CPUID_MODEL_SKYLAKE_S:
/* --------------------------------------------------------- */
msr = rdmsr64(MSR_PLATFORM_INFO);
DBG("msr(%d): platform_info %08x\n", __LINE__, bitfield(msr, 31, 0));
trunk/i386/libsaio/disk.c
18001800
18011801
18021802
1803
18031804
18041805
1806
1807
1808
1809
18051810
18061811
18071812
const char *val;
int len;
// ProductVersion
if (getValueForKey(kProductVersion, &val, &len, &systemVersion))
{
// Copy the complete value into OSFullVer
strncpy( bvr->OSFullVer, val, len );
bvr->OSFullVer[len] = '\0'; /* null character manually added */
// getValueForKey uses const char for val
// so copy it and trim
*str = '\0';
trunk/i386/libsaio/saio_types.h
211211
212212
213213
214
215
214216
215217
216218
boolfiltered;/* newFilteredBVChain() will set to TRUE */
boolvisible;/* will shown in the device list */
charOSVersion[OSVERSTRLEN]; /* Null terminated string from '/System/Library/CoreServices/SystemVersion.plist/ProductVersion' e.g. "10.10.10" - hope will not reach e.g. 111.222.333 soon:) If so, OSVERSTRLEN 9 change to 12 */
charOSFullVer[OSVERSTRLEN]; /* Null terminated string from '/System/Library/CoreServices/SystemVersion.plist/ProductVersion' */
charOSBuildVer[OSVERSTRLEN];/* Null terminated string from '/System/Library/CoreServices/SystemVersion.plist/ProductBuildVersion' */
boolOSisServer;/* 1 = OS X server , 0 = OS X client */
boolOSisInstaller;/* 1 = OS X Install partition / recovery partition , 0 = OS X Install */
trunk/i386/libsaio/fake_efi.c
104104
105105
106106
107
108
107
109108
110
109
111110
112111
113112
......
651650
652651
653652
654
653
655654
656655
657656
/* Identify ourselves as the EFI firmware vendor */
static EFI_CHAR16 const FIRMWARE_VENDOR[] = {'C','h','a','m','e','l','e','o','n','_','2','.','3', 0};
// Bungo
//static EFI_UINT32 const FIRMWARE_REVISION = 132; /* FIXME: Find a constant for this. */
static EFI_UINT32 const FIRMWARE_REVISION = 0x0001000a; // got from real MBP6,1
// Bungo
/* Default platform system_id (fix by IntVar)
static EFI_CHAR8 const SYSTEM_ID[] = "0123456789ABCDEF"; //random value gen by uuidgen
*/
{
stop("Couldn't get root '/' node");
}
const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig);
const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig); // SMboardserial
if (boardid)
{
DT__AddProperty(node, BOARDID_PROP, strlen(boardid)+1, (EFI_CHAR16 *)boardid);
trunk/i386/boot2/drivers.c
198198
199199
200200
201
201202
203
202204
203205
204206
......
250252
251253
252254
253
255
256
257
254258
255
259
260
256261
257262
258263
259
264
265
266
260267
261268
262269
......
670677
671678
672679
673
680
674681
675682
676683
strcpy(dirSpecExtra, "rd(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
verbose("Attempting to loading drivers from \"Extra\" repository:\n");
// Next try to load Extra extensions from the selected root partition.
strlcpy(dirSpecExtra, "/Extra/", sizeof(dirSpecExtra));
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
}
else
{
if ( MAVERICKS || YOSEMITE || ELCAPITAN ) // issue 352
verbose("Attempting to loading drivers from standard repositories:\n");
if ( (gMacOSVersion[3] == '9') || ((gMacOSVersion[3] == '1') && ((gMacOSVersion[4] == '0') || gMacOSVersion[4] == '1' ) )) // issue 352
{
strlcpy(gExtensionsSpec, dirSpec, 4087); /* 4096 - sizeof("Library/") */
verbose("\t- Third party extensions search path: /Library/Extensions\n");
strlcpy(gExtensionsSpec, dirSpec, 4087); /* 4096 - sizeof("Library/") mean 4096 - 9 = 4087 */
strcat(gExtensionsSpec, "Library/");
FileLoadDrivers(gExtensionsSpec, 0);
}
strlcpy(gExtensionsSpec, dirSpec, 4080); /* 4096 - sizeof("System/Library/") */
verbose("\t- Apple extensions search path: /System/Library/Extensions\n");
strlcpy(gExtensionsSpec, dirSpec, 4080); /* 4096 - sizeof("System/Library/") mean 4096 -16 = 4080 */
strcat(gExtensionsSpec, "System/Library/");
FileLoadDrivers(gExtensionsSpec, 0);
}
length = 0;
}
if (length != -1)
if ((length != -1) && executableAddr)
{
//driverModuleAddr = (void *)kLoadAddr;
//if (length != 0)
trunk/i386/boot2/boot.c
282282
283283
284284
285
285
286286
287287
288288
......
293293
294294
295295
296
296
297297
298298
299299
......
316316
317317
318318
319
319
320320
321321
322322
......
325325
326326
327327
328
328
329329
330330
331331
else
{
// Leopard prelink kernel cache file
if ( TIGER || LEOPARD ) // OSX is 10.4 or 10.5
if ( MacOSVerCurrent >= MacOSVer2Int("10.4") && MacOSVerCurrent <= MacOSVer2Int("10.5") ) // OSX is 10.4 or 10.5
{
// Reset cache name.
bzero(gCacheNameAdler + 64, sizeof(gCacheNameAdler) - 64);
}
// Snow Leopard prelink kernel cache file
else if ( SNOW_LEOPARD )
else if ( MacOSVerCurrent >= MacOSVer2Int("10.6") && MacOSVerCurrent < MacOSVer2Int("10.7") )
{
snprintf(kernelCacheFile, sizeof(kernelCacheFile), "kernelcache_%s",
(archCpuType == CPU_TYPE_I386) ? "i386" : "x86_64");
prev_time = time;
}
}
verbose("Kernel Cache file path (Mac OS X 10.6.X): %s\n", kernelCachePath);
verbose("Kernel Cache file path (Mac OS X 10.6): %s\n", kernelCacheFile);
}
closedir(cacheDir);
}
// Lion, Mountain Lion, Mavericks, Yosemite and El Capitan prelink kernel cache file
// for 10.7 10.8 10.9 10.10 10.11
snprintf(kernelCacheFile, sizeof(kernelCacheFile), "%skernelcache", kDefaultCachePathSnow);
verbose("Kernel Cache file path (Mac OS X 10.7 and newer): %s\n", kernelCachePath);
verbose("Kernel Cache file path (Mac OS X 10.7 and newer): %s\n", kernelCacheFile);
}
}
trunk/i386/boot2/boot.h
6262
6363
6464
65
6566
6667
6768
......
169170
170171
171172
173
172174
173175
174
176
175177
176178
177179
......
185187
186188
187189
190
191
192
188193
189194
190195
/*
* Keys used in system Boot.plist
*/
#define kGraphicsModeKey"Graphics Mode"
#define kTextModeKey"Text Mode"
#define kQuietBootKey"Quiet Boot"
#define kEnableHDMIAudio"EnableHDMIAudio"/* ati.c && nvidia.c */
/* cparm: added these keys */
#define kEnableHiDPI"EnableHiDPI"// enable High resolution display (aka Retina)
/* ErmaC: added these keys */
#define kEnableDualLink"EnableDualLink"/* ati.c && nvidia.c && gma.c*/
#define kEnableDualLink"EnableDualLink"/* ati.c && nvidia.c && gma.c */
#define kNvidiaGeneric"NvidiaGeneric"/* nvidia.c */
#define kSkipIntelGfx"SkipIntelGfx"/* pci_setup.c */
#define kSkipNvidiaGfx"SkipNvidiaGfx"/* pci_setup.c */
#define kHDEFLayoutID"HDEFLayoutID"/* hda.c */
#define kHDAULayoutID"HDAULayoutID"/* hda.c */
/* Pike R. Alpha: added this key */
#define kBlackMode"BlackMode"
/* Karas: added this key */
#define kMemFullInfo"ForceFullMemInfo"/* smbios.c */
trunk/i386/boot2/options.c
13141314
13151315
13161316
1317
1317
13181318
13191319
13201320
}
// Save a version of mac os we're booting.
MacOSVerCurrent = MacOSVer2Int(gBootVolume->OSVersion);
MacOSVerCurrent = MacOSVer2Int(gBootVolume->OSFullVer);
// so copy it and trim
gMacOSVersion[0] = 0;
if ( MacOSVerCurrent >= MacOSVer2Int("10.10") )
trunk/package/Distribution
22
33
44
5
6
5
6
77
8
9
10
11
12
8
9
10
11
12
1313
14
14
1515
16
16
1717
18
19
20
21
22
23
24
25
26
18
19
20
21
22
23
24
25
26
27
28
29
30
2731
28
29
30
31
32
33
34
35
36
37
38
32
33
34
35
36
37
38
39
40
41
42
43
44
3945
40
41
42
43
46
47
48
49
50
51
52
53
54
55
56
57
4458
45
46
47
48
49
50
59
60
61
62
63
5164
52
53
54
65
66
67
68
69
70
71
72
73
5574
56
75
76
77
78
79
80
81
82
83
84
85
86
5787
58
59
60
88
89
90
91
92
6193
6294
63
95
96
6497
65
66
98
99
100
101
67102
68103
69
70
71
72
73
74
75
76
77
78
104
105
106
107
108
109
110
111
112
113
114
115
116
117
79118
80
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<installer-gui-script minSpecVersion='1'>
<options hostArchitectures='i386' allow-external-scripts="no"/>
<domains enable_anywhere="true"/>
<options hostArchitectures='i386' allow-external-scripts="no"/>
<domains enable_anywhere="true"/>
<welcome file='Welcome.html'/>
<license file="License.rtf" sla="EA0401"/>
<readme file='Description.html'/>
<conclusion file="Conclusion.html"/>
<background file='background.tiff' alignment='topleft' scaling='tofit'/>
<welcome file='Welcome.html'/>
<license file="License.rtf" sla="EA0401"/>
<readme file='Description.html'/>
<conclusion file="Conclusion.html"/>
<background file='background.tiff' alignment='topleft' scaling='tofit'/>
<title>Chameleon_Package_Title</title>
<title>Chameleon v%CHAMELEONVERSION% r%CHAMELEONREVISION%</title>
<script>
<script>
var bootPlist = null;
if (my.target) {
var boot_plist_filenames = new Array( 'org.chameleon.Boot.plist', 'com.apple.Boot.plist', 'com.apple.boot.plist');
for ( var i = 0; i &lt; boot_plist_filenames.length; i++ ) {
bootPlist = system.files.plistAtPath( my.target.mountpoint + '/Extra/' + boot_plist_filenames[i] );
if (bootPlist)
break;
}
}
var bootPlist = null;
if (my.target)
{
var boot_plist_filenames = new Array( 'org.chameleon.Boot.plist', 'org.chameleon.Boot.plist', 'com.apple.Boot.plist', 'com.apple.boot.plist');
for ( var i = 0; i &lt; boot_plist_filenames.length; i++ )
{
bootPlist = system.files.plistAtPath( my.target.mountpoint + '/Extra/' + boot_plist_filenames[i] );
if (bootPlist)
{
break;
}
}
}
function installCheckScript() {
var obj = system.ioregistry.matchingClass("AppleSMC");
if (obj) {
system.log('installCheckScript: Found AppleSMC');
my.result.message = system.localizedStringWithFormat('Intel_Mac_message');
my.result.type = 'Fatal';
return false;
}
system.log('installCheckScript: Failed.');
return false;
}
var kernelPlist = null;
if (my.target)
{
var kernel_plist_filenames = new Array( 'kernel.plist' );
for ( var i = 0; i &lt; kernel_plist_filenames.length; i++ )
{
kernelPlist = system.files.plistAtPath( my.target.mountpoint + '/Extra/' + kernel_plist_filenames[i] );
if (kernelPlist)
{
break;
}
}
}
function volCheckScript() {
system.log('volCheckScript: Failed.');
return true;
}
function installCheckScript()
{
var obj = system.ioregistry.matchingClass("AppleSMC");
if (obj) {
system.log('installCheckScript: Found AppleSMC');
my.result.message = system.localizedStringWithFormat('Intel_Mac_message');
my.result.type = 'Fatal';
return false;
}
system.log('installCheckScript: Failed.');
return false;
}
function systemHasGPT() {
var obj = system.ioregistry.matchingName("EFI System Partition");
if (obj)
return true;
return false;
}
function volCheckScript()
{
system.log('volCheckScript: Failed.');
return true;
}
function chameleon_boot_plist_exists() {
return bootPlist ? true : false;
}
function systemHasGPT()
{
var obj = system.ioregistry.matchingName("EFI System Partition");
if (obj)
{
return true;
}
return false;
}
function check_chameleon_bool_option(key, value) {
function chameleon_boot_plist_exists()
{
return bootPlist ? true : false;
}
function kernel_plist_exists()
{
return kernelPlist ? true : false;
}
function check_chameleon_bool_option(key, value)
{
if ( bootPlist &amp;&amp; bootPlist[ key ] )
// check if the first letter (in lowercase) is the same
return bootPlist[ key ].charAt(0).toLowerCase() == value.charAt(0).toLowerCase();
return false;
{
// check if the first letter (in lowercase) is the same
return bootPlist[ key ].charAt(0).toLowerCase() == value.charAt(0).toLowerCase();
}
return false;
}
function check_chameleon_text_option(key, value) {
function check_chameleon_text_option(key, value)
{
if ( bootPlist &amp;&amp; bootPlist[ key ] )
return bootPlist[ key ] == value; // check if the strings are equal
return false;
{
return bootPlist[ key ] == value; // check if the strings are equal
}
return false;
}
function check_chameleon_list_option(key, value) {
if ( bootPlist &amp;&amp; bootPlist[ key ] ) {
var items = bootPlist[ key ].split(" ");
for ( var i = 0; i &lt; items.length; i++ ) {
if (items[i] == value)
return true;
}
}
return false;
}
function check_chameleon_list_option(key, value) {
if ( bootPlist &amp;&amp; bootPlist[ key ] )
{
var items = bootPlist[ key ].split(" ");
for ( var i = 0; i &lt; items.length; i++ )
{
if (items[i] == value)
{
return true;
}
}
}
return false;
}
</script>
function check_kernel_bool_option(key, value)
{
if ( kernelPlist &amp;&amp; kernelPlist[ key ] )
{
// check if the first letter (in lowercase) is the same
return kernelPlist[ key ].charAt(0).toLowerCase() == value.charAt(0).toLowerCase();
}
return false;
}
function check_kernel_text_option(key, value)
{
if ( kernelPlist &amp;&amp; kernelPlist[ key ] )
{
return kernelPlist[ key ] == value; // check if the strings are equal
}
return false;
}
function check_kernel_list_option(key, value)
{
if ( kernelPlist &amp;&amp; kernelPlist[ key ] )
{
var items = kernelPlist[ key ].split(" ");
for ( var i = 0; i &lt; items.length; i++ )
{
if (items[i] == value)
{
return true;
}
}
}
return false;
}
</script>
trunk/package/Scripts.templates/AddKernelOption/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -u
configFile='/private/tmp/InstallConfig.plist'
v_mntptDev=$( /usr/libexec/PlistBuddy -c "Print :ramdisk" ${configFile} )
v_mntpt=$( LC_ALL=C diskutil info ${v_mntptDev} | grep -i 'mount point' | awk '{$1=$2=""; print $0}' | \
sed -e 's/^ *//' | sed -e 's/ *$//' )
key="@optionKey@"
value="@optionValue@"
type="@optionType@"
logName="@LOG_FILENAME@"
# Check if target volume exists
if [[ ! -d "$v_mntpt" ]]; then
echo "$v_mntpt volume does not exist!" >&2
exit 1
fi
mainLine="=============================================================================="
subLine="------------------------------------------------------------------------------"
exec > >(tee -a "${v_mntpt}/${logName}") 2>&1
echo "$mainLine"
echo "Writing kernel patcher option: ${key}=${value}"
key="${key// /\\ }" # Escape spaces
value="${value// /\\ }" # Escape spaces
kernelPListFile="${v_mntpt}/Extra/kernel.plist"
case "$type" in
bool|text)
/usr/libexec/PlistBuddy -c "Add :${key} string ${value}" "$kernelPListFile"
;;
list)
current_values=$( /usr/libexec/PlistBuddy -c "Print :${key}" \
"$kernelPListFile" 2>/dev/null )
result=$?
current_values="${current_values// /\\ }" # Escape spaces
current_values="${current_values//\"/\\\"}" # Escape double quotes
if [[ $result -eq 0 ]]; then
# Append our new values
if [[ "$current_values" = "" ]]; then
new_values="${value}"
else
new_values="${current_values}\ ${value}"
fi
/usr/libexec/PlistBuddy -c "Set :${key} ${new_values}" \
"$kernelPListFile"
else
# Create a new option
new_values="${value}"
/usr/libexec/PlistBuddy -c "Add :${key} string ${new_values}" \
"$kernelPListFile"
fi
;;
esac
echo "$subLine"
exit 0
trunk/package/Scripts.templates/CleanOptions/clean_bootplist.pl
44
55
66
7
7
8
89
10
11
912
1013
11
12
14
15
1316
14
17
18
1519
1620
17
18
21
22
1923
2024
2125
......
2731
2832
2933
30
34
3135
3236
3337
use YAML::Syck;
our $target_volume;
our $boot_plist_filepath;
our $config_file;
our $plist_filepath;
our $yaml_file="@YAML_FILE@";
if ($#ARGV < 0) {
print stderr "A target volume is needed\n";
if ($#ARGV < 1) {
print stderr "A target volume and the plist file are needed\n";
} else {
$target_volume=$ARGV[0];
$target_volume=$ARGV[0];
$config_file=$ARGV[1];
}
$boot_plist_filepath = "${target_volume}/Extra/org.chameleon.Boot.plist";
if ( -f "$boot_plist_filepath" ) {
$plist_filepath = "${target_volume}/Extra/${config_file}";
if ( -f "$plist_filepath" ) {
main("$yaml_file");
}
$value =~ s/([\s"])/\\$1/g; # Escape characters in value (space & ")
my $plistbuddy_command="$cmd :$key $value";
open ( OUTPUT, "-|", '/usr/libexec/PlistBuddy', "-c", "$plistbuddy_command", "$boot_plist_filepath" );
open ( OUTPUT, "-|", '/usr/libexec/PlistBuddy', "-c", "$plistbuddy_command", "$plist_filepath" );
my $exit_code = $?;
chomp($out = <OUTPUT>);
close OUTPUT;
trunk/package/OptionalSettings/IntelSkl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# ---------------------------------------------
# Chameleon Optional Settings List.
# ---------------------------------------------
# Add boot options or kernel flags to the bottom of this file.
# They will appear under the package installer's Settings menu
# in a sub menu named with the filename of this file.
# Use one file or many files - it's flexible to make it easy
# to group different options under separate sub menus.
# ---------------------------------------------
# To add boot option: Structure is:
# type@name:key=value
# example1: Bool@InstantMenu:Instant Menu=Yes
# example2: Text@1024x600x32:Graphics Mode=1024x600x32
# example3: List@Npci:Kernel Flags=npci=0x2000
# ---------------------------------------------
# type can be: Bool, Text or List
# ---------------------------------------------
# The package installer has a setting which controls what
# the user is allowed to choose.
# A) User can select every option from the list.
# B) User can select only one of the options from the list.
# Set Exclusive=False for A, or Exclusive=True for B.
#
Exclusive=True
# ---------------------------------------------
# Note: There must be a carriage return at end of last line
# ---------------------------------------------
Text@IntelSkylakex00:IntelSklFB=0
Text@IntelSkylakex01:IntelSklFB=1
Text@IntelSkylakex02:IntelSklFB=2
Text@IntelSkylakex03:IntelSklFB=3
Text@IntelSkylakex04:IntelSklFB=4
Text@IntelSkylakex05:IntelSklFB=5
Text@IntelSkylakex06:IntelSklFB=6
Text@IntelSkylakex07:IntelSklFB=7
Text@IntelSkylakex08:IntelSklFB=8
Text@IntelSkylakex09:IntelSklFB=9
Text@IntelSkylakex10:IntelSklFB=10
Text@IntelSkylakex11:IntelSklFB=11
trunk/package/OptionalSettings/CrsActiveConfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ---------------------------------------------
# Chameleon Optional Settings List.
# ---------------------------------------------
# Add boot options or kernel flags to the bottom of this file.
# They will appear under the package installer's Settings menu
# in a sub menu named with the filename of this file.
# Use one file or many files - it's flexible to make it easy
# to group different options under separate sub menus.
# ---------------------------------------------
# To add boot option: Structure is:
# type@name:key=value
# example1: Bool@InstantMenu:Instant Menu=Yes
# example2: Text@1024x600x32:Graphics Mode=1024x600x32
# example3: List@Npci:Kernel Flags=npci=0x2000
# ---------------------------------------------
# type can be: Bool, Text or List
# ---------------------------------------------
# The package installer has a setting which controls what
# the user is allowed to choose.
# A) User can select every option from the list.
# B) User can select only one of the options from the list.
# Set Exclusive=False for A, or Exclusive=True for B.
#
Exclusive=False
# ---------------------------------------------
# Note: There must be a carriage return at end of last line
# ---------------------------------------------
Text@Crs1:CrsActiveConfig=1
Text@Crs2:CrsActiveConfig=2
Text@Crs4:CrsActiveConfig=4
Text@Crs8:CrsActiveConfig=8
Text@Crs16:CrsActiveConfig=16
Text@Crs32:CrsActiveConfig=32
Text@Crs64:CrsActiveConfig=64
Text@Crs128:CrsActiveConfig=128
trunk/package/Patches/kernelPatcher.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ---------------------------------------------
# Chameleon Optional Settings List.
# ---------------------------------------------
# Add boot options or kernel flags to the bottom of this file.
# They will appear under the package installer's Settings menu
# in a sub menu named with the filename of this file.
# Use one file or many files - it's flexible to make it easy
# to group different options under separate sub menus.
# ---------------------------------------------
# To add boot option: Structure is:
# type@name:key=value
# example1: Bool@InstantMenu:Instant Menu=Yes
# example2: Text@1024x600x32:Graphics Mode=1024x600x32
# example3: List@Npci:Kernel Flags=npci=0x2000
# ---------------------------------------------
# type can be: Bool, Text or List
# ---------------------------------------------
# The package installer has a setting which controls what
# the user is allowed to choose.
# A) User can select every option from the list.
# B) User can select only one of the options from the list.
# Set Exclusive=False for A, or Exclusive=True for B.
#
Exclusive=False
# ---------------------------------------------
# Note: There must be a carriage return at end of last line
# ---------------------------------------------
Bool@KernelBooter_kexts:KernelBooter_kexts=Yes
Bool@KernelPm:KernelPm=Yes
Bool@KernelLapicError:KernelLapicError=Yes
Bool@KernelLapicVersion:KernelLapicVersion=Yes
Bool@KernelHaswell:KernelHaswell=Yes
Bool@KernelcpuFamily:KernelcpuFamily=Yes
Bool@KernelSSE3:KernelSSE3=Yes
trunk/package/Scripts/Main/ESPpostinstall
292292
293293
294294
295
295
296
296297
297298
298299
else
echo "Extra folder already exist on ${choicedVolume}, copying to the Ram Disk.."
cp -R "${choicedVolume}/Extra" "${v_mntpt}"/
./clean_bootplist.pl "${v_mntpt}"
./clean_bootplist.pl "${v_mntpt}" org.chameleon.Boot.plist
./clean_bootplist.pl "${v_mntpt}" kernel.plist
fi
}
# --------------------------------------------------------------------------------------------------------
trunk/package/Scripts/Main/Standardpostinstall
292292
293293
294294
295
295
296
296297
297298
298299
else
echo "Extra folder already exist on ${choicedVolume}, copying to the Ram Disk.."
cp -R "${choicedVolume}/Extra" "${v_mntpt}"/
./clean_bootplist.pl "${v_mntpt}"
./clean_bootplist.pl "${v_mntpt}" org.chameleon.Boot.plist
./clean_bootplist.pl "${v_mntpt}" kernel.plist
fi
}
# --------------------------------------------------------------------------------------------------------
trunk/package/bin/po4a/po4a-normalize
119119
120120
121121
122
123
124
122
123
124
125125
126
126
127127
128
128
129129
130
130
131131
132
133
134
132
133
134
135135
136136
137137
......
143143
144144
145145
146
146
147147
148
148
149149
150150
151151
......
159159
160160
161161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176176
177177
178178
my ($mastchar);
Getopt::Long::Configure('no_auto_abbrev','no_ignore_case');
GetOptions(
'help|h' => \$help,
'help-format' => \$help_fmt,
'format|f=s' => \$type,
'help|h' => \$help,
'help-format' => \$help_fmt,
'format|f=s' => \$type,
'blank|b' => \$blank,
'blank|b' => \$blank,
'master-charset|M=s' => \$mastchar,
'master-charset|M=s' => \$mastchar,
'option|o=s' => \@options,
'option|o=s' => \@options,
'verbose|v' => \$verbose,
'debug|d' => \$debug,
'version|V' => \&show_version
'verbose|v' => \$verbose,
'debug|d' => \$debug,
'version|V' => \&show_version
) or pod2usage();
$help && pod2usage (-verbose => 1, -exitval => 0);
"debug" => $debug);
foreach (@options) {
if (m/^([^=]*)=(.*)$/) {
$options{$1}="$2";
$options{$1}="$2";
} else {
$options{$_}=1;
$options{$_}=1;
}
}
$parser->{TT}{file_in_charset} = $mastchar;
$parser->parse();
if ($blank) {
foreach my $msgid (keys %{$parser->{TT}{po_out}{po}}) {
if ($msgid =~ m/\n$/s) {
$parser->{TT}{po_out}{po}{$msgid}{'msgstr'} = "\n";
} else {
$parser->{TT}{po_out}{po}{$msgid}{'msgstr'} = " ";
}
}
my $empty_po = $parser->{TT}{po_out};
$parser = Locale::Po4a::Chooser::new($type,%options);
$parser->{TT}{po_in} = $empty_po;
$parser->read($filename);
$parser->{TT}{utf_mode} = 1;
$parser->{TT}{file_in_charset} = $mastchar;
$parser->parse();
foreach my $msgid (keys %{$parser->{TT}{po_out}{po}}) {
if ($msgid =~ m/\n$/s) {
$parser->{TT}{po_out}{po}{$msgid}{'msgstr'} = "\n";
} else {
$parser->{TT}{po_out}{po}{$msgid}{'msgstr'} = " ";
}
}
my $empty_po = $parser->{TT}{po_out};
$parser = Locale::Po4a::Chooser::new($type,%options);
$parser->{TT}{po_in} = $empty_po;
$parser->read($filename);
$parser->{TT}{utf_mode} = 1;
$parser->{TT}{file_in_charset} = $mastchar;
$parser->parse();
}
$parser->write('po4a-normalize.output');
$parser->writepo('po4a-normalize.po');
trunk/package/bin/po4a/po4a-updatepo
174174
175175
176176
177
178
177179
178180
179181
......
195197
196198
197199
198
200
199201
200
201
202
202
203
204
203205
204
206
205207
206
208
207209
208
209
210
211
212
213
214
210
211
212
213
214
215
216
215217
216
217
218
218
219
220
219221
220222
221223
......
223225
224226
225227
228
226229
227230
228231
......
234237
235238
236239
237
240
238241
239
242
240243
241244
242245
......
245248
246249
247250
248
251
249252
250253
251
252
253
254
255
254
255
256
257
258
256259
257260
258261
......
261264
262265
263266
264
265
266
267
267
268
269
270
268271
269272
270273
271274
272275
273276
274
275
276
277
278
279
280
277
278
279
280
281
282
283
284
285
286
281287
282
283
284
285
288
289
290
291
286292
287293
288294
use Pod::Usage qw(pod2usage);
use File::Temp;
use File::Copy qw(copy);
use Config;
Locale::Po4a::Common::textdomain('po4a');
my $noprevious;
my $msgmerge_opt = "";
GetOptions('help|h' => \$help,
'help-format' => \$help_fmt,
'help-format' => \$help_fmt,
'master|m=s' => \@masterfiles,
'po|p=s' => \@pofiles,
'format|f=s' => \$format,
'master|m=s' => \@masterfiles,
'po|p=s' => \@pofiles,
'format|f=s' => \$format,
'master-charset|M=s' => \$mastchar,
'master-charset|M=s' => \$mastchar,
'option|o=s' => \@options,
'option|o=s' => \@options,
'no-previous' => \$noprevious,
'previous' => \$previous,
'msgmerge-opt=s' => \$msgmerge_opt,
'copyright-holder=s' => \$copyright_holder,
'msgid-bugs-address=s'=> \$msgid_bugs_address,
'package-name=s' => \$package_name,
'package-version=s' => \$package_version,
'no-previous' => \$noprevious,
'previous' => \$previous,
'msgmerge-opt=s' => \$msgmerge_opt,
'copyright-holder=s' => \$copyright_holder,
'msgid-bugs-address=s'=> \$msgid_bugs_address,
'package-name=s' => \$package_name,
'package-version=s' => \$package_version,
'verbose|v' => \$verbose,
'debug|d' => \$debug,
'version|V' => \&show_version)
'verbose|v' => \$verbose,
'debug|d' => \$debug,
'version|V' => \&show_version)
or pod2usage();
$help && pod2usage (-verbose => 1, -exitval => 0);
pod2usage () if scalar @masterfiles < 1 || scalar @pofiles < 1;
$msgmerge_opt .= " --previous" unless $noprevious;
$msgmerge_opt =~ s/^\s+//;
my %options = (
"verbose" => $verbose,
foreach (@options) {
if (m/^([^=]*)=(.*)$/) {
$options{$1}="$2";
$options{$1}="$2";
} else {
$options{$_}=1;
$options{$_}=1;
}
}
map { -e $_ || die wrap_msg(gettext("File %s does not exist."), $_) } @masterfiles;
map { die wrap_msg(gettext("po4a-updatepo can't take the input PO from stdin."))
if $_ eq '-' && !-e '-'} @pofiles;
if $_ eq '-' && !-e '-'} @pofiles;
my ($pot_filename);
(undef,$pot_filename)=File::Temp->tempfile("po4a-updatepoXXXX",
DIR => "/tmp",
SUFFIX => ".pot",
OPEN => 0,
UNLINK => 0)
(undef,$pot_filename)=File::Temp::tempfile("po4a-updatepoXXXX",
DIR => $ENV{TMPDIR} || "/tmp",
SUFFIX => ".pot",
OPEN => 0,
UNLINK => 0)
or die wrap_msg(gettext("Can't create a temporary POT file: %s"), $!);
$doc->{TT}{utf_mode} = 1;
$doc->process('file_in_name' => \@masterfiles,
'file_in_charset' => $mastchar,
'po_out_name' => $pot_filename,
'debug' => $debug,
'verbose' => $verbose);
'file_in_charset' => $mastchar,
'po_out_name' => $pot_filename,
'debug' => $debug,
'verbose' => $verbose);
print STDERR wrap_msg(gettext("done.")) if $verbose;
while (my $po_filename=shift @pofiles) {
if (-e $po_filename) {
print STDERR wrap_msg(gettext("Updating %s:"), $po_filename)
if $verbose;
my $cmd = "msgmerge $msgmerge_opt -U $po_filename $pot_filename";
system ($cmd) == 0
or die wrap_msg(gettext("Error while running msgmerge: %s"), $!);
system "msgfmt --statistics -v -o /dev/null $po_filename"
if $verbose;
print STDERR wrap_msg(gettext("Updating %s:"), $po_filename)
if $verbose;
my @cmd = ("msgmerge".$Config{_exe});
push (@cmd, split(/\s+/, $msgmerge_opt)) if length($msgmerge_opt);
push @cmd, ("-U", $po_filename, $pot_filename);
system (@cmd) == 0
or die wrap_msg(gettext("Error while running msgmerge: %s"), $!);
@cmd = ("msgfmt".$Config{_exe}, "--statistics", "-v", "-o", File::Spec->devnull(), $po_filename);
system (@cmd)
if $verbose;
} else {
print STDERR wrap_msg(gettext("Creating %s:"), $po_filename)
if $verbose;
system ("cp",$pot_filename,$po_filename) == 0
or die wrap_msg(gettext("Error while copying the PO file: %s"), $!);
print STDERR wrap_msg(gettext("Creating %s:"), $po_filename)
if $verbose;
copy ($pot_filename,$po_filename)
or die wrap_msg(gettext("Error while copying the PO file: %s"), $!);
}
}
trunk/package/bin/po4a/po4a
142142
143143
144144
145
145
146146
147147
148148
......
253253
254254
255255
256
256
257257
258258
259259
......
261261
262262
263263
264
264
265265
266266
267267
......
279279
280280
281281
282
283
284
285
286
287
288
289
290
282291
283292
284293
......
402411
403412
404413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
405445
406446
407447
......
420460
421461
422462
463
464
465
466
467
468
423469
424470
425471
......
436482
437483
438484
439
440
441
442
443
444
445
446
447
448
449485
450486
451487
......
557593
558594
559595
596
560597
561598
562599
......
601638
602639
603640
641
604642
605643
606644
......
632670
633671
634672
673
635674
636675
637676
......
804843
805844
806845
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
823862
824863
825864
826865
827866
828
829
830
831
832
833
834
835
836
837
867
868
869
870
871
872
873
874
875
876
838877
839878
840
841
842
843
879
880
881
882
844883
845884
846
847
848
849
850
851
885
886
887
888
889
890
852891
853
854
855
856
857
858
859
860
861
892
893
894
895
896
897
898
899
900
862901
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
879918
880
881
882
883
919
920
921
922
884923
885
886
924
925
887926
888
889
927
928
890929
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
914953
915
916
917
918
919
954
955
956
957
958
920959
921
922
923
924
925
926
927
960
961
962
963
964
965
966
928967
929
930
931
932
968
969
970
971
933972
934
935
936
937
938
939
940
941
942
943
944
973
974
975
976
945977
946
947
948
949
950
951
952
953
954
955
956
978
979
980
981
982
983
984
985
986
987
988
957989
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
10021046
1003
1004
1005
1006
1007
1008
1009
1047
1048
1049
1050
1051
1052
1053
10101054
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
10211065
1022
1023
1066
1067
10241068
10251069
10261070
......
10761120
10771121
10781122
1079
1123
10801124
10811125
10821126
......
11281172
11291173
11301174
1131
1175
11321176
11331177
11341178
......
11361180
11371181
11381182
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
11521183
11531184
11541185
1155
1186
1187
1188
1189
1190
1191
1192
11561193
11571194
11581195
......
11851222
11861223
11871224
1188
1225
11891226
1190
1191
1227
1228
11921229
11931230
11941231
......
12031240
12041241
12051242
1206
1243
12071244
12081245
12091246
......
12171254
12181255
12191256
1220
1221
1257
1258
12221259
12231260
12241261
......
12341271
12351272
12361273
1237
1274
12381275
12391276
12401277
......
12481285
12491286
12501287
1251
1252
1288
1289
12531290
12541291
12551292
......
12581295
12591296
12601297
1261
1298
12621299
12631300
12641301
......
12671304
12681305
12691306
1270
1307
12711308
12721309
12731310
......
12801317
12811318
12821319
1283
1320
12841321
1285
1286
1287
1288
1289
1290
1291
1292
1322
1323
1324
1325
1326
1327
1328
1329
1330
12931331
1294
1295
1296
1297
1332
1333
1334
1335
12981336
12991337
1300
1338
13011339
13021340
13031341
13041342
13051343
1306
1344
13071345
13081346
13091347
......
13141352
13151353
13161354
1317
1318
1355
1356
13191357
13201358
13211359
......
13261364
13271365
13281366
1329
1367
13301368
13311369
13321370
1333
1371
13341372
13351373
13361374
......
13381376
13391377
13401378
1341
1379
13421380
13431381
13441382
......
13641402
13651403
13661404
1367
1405
13681406
13691407
13701408
13711409
13721410
13731411
1374
1375
1376
1377
1378
1379
1380
1412
1413
1414
1415
1416
1417
1418
13811419
1382
1383
1384
1385
1386
1387
1388
1389
1390
1420
1421
1422
1423
1424
1425
1426
1427
1428
13911429
13921430
13931431
......
14211459
14221460
14231461
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
14401478
1441
1442
1479
1480
14431481
1444
1482
14451483
1446
1447
1484
1485
14481486
1449
1450
1451
1452
1453
1454
1455
1456
1487
1488
1489
1490
1491
1492
1493
1494
14571495
1458
1496
14591497
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
14911529
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
15191557
1520
1521
1522
1523
1524
1525
1558
1559
1560
1561
1562
1563
15261564
15271565
15281566
15291567
15301568
1531
1569
15321570
15331571
15341572
15351573
15361574
1537
1575
15381576
15391577
15401578
15411579
15421580
1543
1581
15441582
1545
1546
1547
1548
1549
1583
1584
1585
1586
1587
15501588
15511589
1552
1590
15531591
15541592
15551593
[po4a_paths] doc/l10n/project.doc.pot $lang:doc/l10n/$lang.po
You can also use B<$master> to refer to the document basename. In this case,
You can also use B<$master> to refer to the document filename. In this case,
B<po4a> will use a split mode: one POT and one PO (for each language) will
be created for each document specified in the B<po4a> configuration file.
See the B<Split mode> section.
If you must specify the same options for multiple files, you may be
interested in defining a module alias. This can be done this way:
[po4a_alias:test] man opt:"-k 21" opt_es:"-o debug=splitargs"
[po4a_alias:test] man opt:"-k 21" opt_es:"-o debug=splitargs"
This defines a module alias named B<test>, based on the B<man> module, with
the B<-k 21> applied to all the languages and with B<-o debug=splitargs>
This module alias can then be use like a regular module:
[type:test] data-05/test2_man.1 $lang:tmp/test2_man.$lang.1 \
[type:test] data-05/test2_man.1 $lang:tmp/test2_man.$lang.1 \
opt_it:"-L UTF-8" opt_fr:-v
Note that you can specify additional options on a per file basis.
and removes the fuzzy tag in one PO, the translation of this string will
be updated in every POs automatically.
If there are name conflicts because several files have the same filename,
the name of the master file can be specified by adding a C<master:file=>I<name>
option:
[po4a_langs] de fr ja
[po4a_paths] l10n/po/$master.pot $lang:l10n/po/$master.$lang.po
[type: xml] foo/gui.xml $lang:foo/gui.$lang.xml master:file=foo-gui
[type: xml] bar/gui.xml $lang:bar/gui.$lang.xml master:file=bar-gui
=head1 OPTIONS
=over 4
Every occurrence of I<$(var)> will be replaced by I<value>.
This option can be used multiple times.
=item B<--srcdir> I<SRCDIR>
Set the base directory for all input documents specified in the B<po4a>
configuration file.
=item B<--destdir> I<DESTDIR>
Set the base directory for all the output documents specified in the B<po4a>
configuration file.
=back
=head2 OPTIONS WHICH MODIFY POT HEADER
=over 4
=item B<porefs> I<type>[,B<wrap>|B<nowrap>]
Specify the reference format. Argument I<type> can be one of B<none> to not
produce any reference, B<noline> to not specify the line number (more
accurately all line numbers are replaced by 1), B<counter> to replace line
number by an increasing counter, and B<full> to include complete
references.
Argument can be followed by a comma and either B<wrap> or B<nowrap> keyword.
References are written by default on a single line. The B<wrap> option wraps
references on several lines, to mimic B<gettext> tools (B<xgettext> and
B<msgmerge>). This option will become the default in a future release, because
it is more sensible. The B<nowrap> option is available so that users who want
to keep the old behavior can do so.
=item B<--msgid-bugs-address> I<email@address>
Set the report address for msgid bugs. By default, the created POT files
Set the package version for the POT header. The default is "VERSION".
=back
=head2 OPTIONS TO MODIFY PO FILES
=over 4
=item B<--msgmerge-opt> I<options>
Extra options for B<msgmerge>.
This option adds B<--previous> to the options passed to B<msgmerge>.
It requires B<gettext> 0.16 or later, and is activated by default.
=item B<--srcdir> I<SRCDIR>
Set the base directory for all input documents specified in the B<po4a>
configuration file.
=item B<--destdir> I<DESTDIR>
Set the base directory for all the output documents specified in the B<po4a>
configuration file.
=back
=head2 EXAMPLE
use File::Spec;
use Fcntl; # sysopen flags
use Cwd; # cwd
use Config;
Locale::Po4a::Common::textdomain('po4a');
"options" => {"verbose" => 0, "debug" => 0},
"variables" => {},
"partial" => [],
"porefs" => "full",
"copyright-holder"=> undef,
"msgid-bugs-address"=> undef,
"package-name" => undef,
'version|V' => \&show_version,
'option|o=s' => \@options,
'variable=s' => \@variables,
'porefs=s' => \$opts{"porefs"},
'copyright-holder=s' => \$opts{"copyright-holder"},
'msgid-bugs-address=s' => \$opts{"msgid-bugs-address"},
'package-name=s' => \$opts{"package-name"},
my $main = ($args=~ s/^(\S+) *// ? $1 : "");
if (@langs) {
# Expand the $lang templates
my($args2) = "";
foreach my $arg (split(/ /,$args)) {
if ( $arg =~ /\$lang\b/ ) {
# Expand for all the langs
foreach my $lang (@langs) {
my($arg2) = $arg;
$arg2 =~ s/\$lang\b/$lang/g;
$args2 .= $arg2." ";
}
} else {
# Leave the argument as is
$args2 .= $arg." ";
}
}
$args = $args2;
# Expand the $lang templates
my($args2) = "";
foreach my $arg (split(/ /,$args)) {
if ( $arg =~ /\$lang\b/ ) {
# Expand for all the langs
foreach my $lang (@langs) {
my($arg2) = $arg;
$arg2 =~ s/\$lang\b/$lang/g;
$args2 .= $arg2." ";
}
} else {
# Leave the argument as is
$args2 .= $arg." ";
}
}
$args = $args2;
}
print "cmd=[$cmd]; main=$main; args=\"$args\"\n" if $po4a_opts{"debug"};
if ($cmd eq "po4a_paths") {
die wrap_ref_mod("$config_file:$nb", "",
gettext("'%s' redeclared"), "po4a_path")
if (length $pot_filename);
$pot_filename = $main;
foreach my $arg (split(/ /,$args)) {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unparsable argument '%s'."), $arg)
unless ($arg =~ /^([^:]*):(.*)/);
$po_filename{$1}=$2 if $1 ne '$lang';
}
die wrap_ref_mod("$config_file:$nb", "",
gettext("'%s' redeclared"), "po4a_path")
if (length $pot_filename);
$pot_filename = $main;
foreach my $arg (split(/ /,$args)) {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unparsable argument '%s'."), $arg)
unless ($arg =~ /^([^:]*):(.*)/);
$po_filename{$1}=$2 if $1 ne '$lang';
}
} elsif ($cmd eq "po4a_langs") {
die wrap_ref_mod("$config_file:$nb", "",
gettext("'%s' redeclared"), "po4a_langs")
if (@langs);
@langs = split(/ /,$main." ".$args);
die wrap_ref_mod("$config_file:$nb", "",
gettext("'%s' redeclared"), "po4a_langs")
if (@langs);
@langs = split(/ /,$main." ".$args);
} elsif ($cmd eq "po_directory") {
die wrap_ref_mod("$config_file:$nb", "",
gettext("The list of languages cannot be set twice."))
if scalar @langs;
die wrap_ref_mod("$config_file:$nb", "",
gettext("The POT file cannot be set twice."))
if length $pot_filename;
die wrap_ref_mod("$config_file:$nb", "",
gettext("The list of languages cannot be set twice."))
if scalar @langs;
die wrap_ref_mod("$config_file:$nb", "",
gettext("The POT file cannot be set twice."))
if length $pot_filename;
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
my $po_directory = $main;
die wrap_ref_mod("$config_file:$nb", "",
gettext("'%s' is not a directory"), $po_directory)
unless (-d $po_directory);
opendir PO_DIR, $po_directory
or die wrap_ref_mod("$config_file:$nb", "",
gettext("Cannot list the '%s' directory"), $po_directory);
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
my $po_directory = $main;
die wrap_ref_mod("$config_file:$nb", "",
gettext("'%s' is not a directory"), $po_directory)
unless (-d $po_directory);
opendir PO_DIR, $po_directory
or die wrap_ref_mod("$config_file:$nb", "",
gettext("Cannot list the '%s' directory"), $po_directory);
foreach my $f (readdir PO_DIR) {
next unless -f "$po_directory/$f";
if ($f =~ m/^(.*)\.po$/) {
push @langs, $1;
$po_filename{$1} = "$po_directory/$f";
}
if ($f =~ m/\.pot$/) {
if (length $pot_filename) {
die wrap_ref_mod("$config_file:$nb", "",
gettext("too many POT files: %s %s"),
$pot_filename, "$po_directory/$f");
} else {
$pot_filename = "$po_directory/$f";
}
}
}
foreach my $f (readdir PO_DIR) {
next unless -f "$po_directory/$f";
if ($f =~ m/^(.*)\.po$/) {
push @langs, $1;
$po_filename{$1} = "$po_directory/$f";
}
if ($f =~ m/\.pot$/) {
if (length $pot_filename) {
die wrap_ref_mod("$config_file:$nb", "",
gettext("too many POT files: %s %s"),
$pot_filename, "$po_directory/$f");
} else {
$pot_filename = "$po_directory/$f";
}
}
}
if (not @langs) {
warn wrap_ref_mod("$config_file:$nb", "",
gettext("no PO files found in %s"), $po_directory);
}
if (not @langs) {
warn wrap_ref_mod("$config_file:$nb", "",
gettext("no PO files found in %s"), $po_directory);
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
} elsif ($cmd =~ m/type: *(.*)/) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
if (defined $document{$main}{'format'}) {
warn wrap_ref_mod("$config_file:$nb", "",
gettext("The '%s' master file was specified earlier in the ".
"configuration file. This may cause problems with ".
"options."), $main)
unless ($po4a_opts{"quiet"});
} elsif (not -e $main) {
die wrap_ref_mod("$config_file:$nb", "",
gettext("The '%s' master file does not exist."), $main);
}
if (scalar @{$po4a_opts{"partial"}}) {
foreach my $file (@{$po4a_opts{"partial"}}) {
if ($args =~ m/(\S+):\Q$file\E\b/) {
$partial{'lang'}{$1} = 1;
$partial{'master'}{$main} = 1;
$partial{'files'}{$file} = 1;
last;
}
}
}
$document{$main}{'format'} = $1;
$document{$main}{'pos'} = $doc_count;
$doc_count++;
if (defined $document{$main}{'format'}) {
warn wrap_ref_mod("$config_file:$nb", "",
gettext("The '%s' master file was specified earlier in the ".
"configuration file. This may cause problems with ".
"options."), $main)
unless ($po4a_opts{"quiet"});
} elsif (not -e $main) {
die wrap_ref_mod("$config_file:$nb", "",
gettext("The '%s' master file does not exist."), $main);
}
if (scalar @{$po4a_opts{"partial"}}) {
foreach my $file (@{$po4a_opts{"partial"}}) {
if ($args =~ m/(\S+):\Q$file\E\b/) {
$partial{'lang'}{$1} = 1;
$partial{'master'}{$main} = 1;
$partial{'files'}{$file} = 1;
last;
}
}
}
$document{$main}{'format'} = $1;
$document{$main}{'pos'} = $doc_count;
$doc_count++;
# Options
my %options;
# 1. Use the global options ([opt] ...)
%options = %{$document{''}{'options'}}
if defined $document{''}{'options'};
# Options
my %options;
# 1. Use the global options ([opt] ...)
%options = %{$document{''}{'options'}}
if defined $document{''}{'options'};
# 2. Merge the alias options
if (defined $aliases{$1}) {
$document{$main}{'format'} = $aliases{$1}{"module"};
if (defined $aliases{$1}{"options"}) {
%options = %{$aliases{$1}{"options"}}; # XXX not a merge, but overwrite
}
}
# 2. Merge the alias options
if (defined $aliases{$1}) {
$document{$main}{'format'} = $aliases{$1}{"module"};
if (defined $aliases{$1}{"options"}) {
%options = %{$aliases{$1}{"options"}}; # XXX not a merge, but overwrite
}
}
# 3. If this file was already specified, reuse the previous
# options (no merge)
%options = %{$document{$main}{'options'}}
if defined $document{$main}{'options'};
# 3. If this file was already specified, reuse the previous
# options (no merge)
%options = %{$document{$main}{'options'}}
if defined $document{$main}{'options'};
# 4. Merge the document specific options
# separate the end of the line, which contains options.
# Something more clever could be done to allow options in the
# middle of a line.
if ($args =~ m/^(.*?) +(opt(_.+)?:(.*))$/) {
$args = $1;
$args = "" unless defined $args;
$args .= " ".parse_config_options("$config_file:$nb",
$2, \%options);
}
%{$document{$main}{'options'}} = %options;
# 4. Handle "master:file=" flags for "$master" substitution in strings
if ($args =~ s/ +master:file=(\S+)//) {
$document{$main}{'master'} = $1;
}
my %discarded = ();
my @remaining_args = split(/ /,$args);
while (@remaining_args) {
my $arg = shift(@remaining_args);
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unparsable argument '%s' (%s)."), $arg, $line)
unless ($arg =~ /^([^:]*):(.*)/);
my ($lang,$trans)=($1,$2);
die wrap_ref_mod("$config_file:$nb", "",
gettext("The translated and master file are the same."))
if ($main eq $trans);
# 5. Merge the document specific options
# separate the end of the line, which contains options.
# Something more clever could be done to allow options in the
# middle of a line.
if ($args =~ m/^(.*?) +(opt(_.+)?:(.*))$/) {
$args = $1;
$args = "" unless defined $args;
$args .= " ".parse_config_options("$config_file:$nb",
$2, \%options);
}
%{$document{$main}{'options'}} = %options;
if ($lang =~ /^add_/) {
my $modifiers;
$trans =~ s/^([@!?]+)// and $modifiers = $1;
next if defined($discarded{$trans});
if (defined $modifiers) {
if ($modifiers =~ m/!/) {
$discarded{$trans} = 1;
next;
}
next if ($modifiers =~ m/\?/ and not -e $trans);
if ($modifiers =~ m/@/) {
open LIST,"<","$trans" or die wrap_msg(gettext("Can't open %s: %s"), $trans, $!);
my @new_list = ();
while(<LIST>) {
chomp;
s/\s+$//;
next if length($_) == 0 or $_ =~ m/^\s*#/;
while (m/\$\((\w+)\)/) {
if (defined $po4a_opts{"variables"}{$1}) {
s/\$\((\Q$1\E)\)/$po4a_opts{"variables"}{$1}/g;
} else {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unknown variable: %s"), $1);
}
}
push(@new_list, "$lang:$_");
}
close LIST;
unshift(@remaining_args, @new_list);
} else {
push @{$document{$main}{$lang}},$trans;
}
} else {
push @{$document{$main}{$lang}},$trans;
}
} else {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Translation of %s in %s redefined"), $main, $lang)
if (defined $document{$main}{$lang});
$document{$main}{$lang} = $trans;
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
my %discarded = ();
my @remaining_args = split(/ /,$args);
while (@remaining_args) {
my $arg = shift(@remaining_args);
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unparsable argument '%s' (%s)."), $arg, $line)
unless ($arg =~ /^([^:]*):(.*)/);
my ($lang,$trans)=($1,$2);
die wrap_ref_mod("$config_file:$nb", "",
gettext("The translated and master file are the same."))
if ($main eq $trans);
if ($lang =~ /^add_/) {
my $modifiers;
$trans =~ s/^([@!?]+)// and $modifiers = $1;
next if defined($discarded{$trans});
if (defined $modifiers) {
if ($modifiers =~ m/!/) {
$discarded{$trans} = 1;
next;
}
next if ($modifiers =~ m/\?/ and not -e $trans);
if ($modifiers =~ m/@/) {
open LIST,"<","$trans" or die wrap_msg(gettext("Can't open %s: %s"), $trans, $!);
my @new_list = ();
while(<LIST>) {
chomp;
s/\s+$//;
next if length($_) == 0 or $_ =~ m/^\s*#/;
while (m/\$\((\w+)\)/) {
if (defined $po4a_opts{"variables"}{$1}) {
s/\$\((\Q$1\E)\)/$po4a_opts{"variables"}{$1}/g;
} else {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unknown variable: %s"), $1);
}
}
push(@new_list, "$lang:$_");
}
close LIST;
unshift(@remaining_args, @new_list);
} else {
push @{$document{$main}{$lang}},$trans;
}
} else {
push @{$document{$main}{$lang}},$trans;
}
} else {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Translation of %s in %s redefined"), $main, $lang)
if (defined $document{$main}{$lang});
$document{$main}{$lang} = $trans;
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
} elsif ($cmd =~ m/po4a_alias: *(.*)/) {
my $name = $1;
my %alias = ();
$alias{"module"} = $main;
my %options;
$args = parse_config_options("$config_file:$nb", $args, \%options);
%{$alias{"options"}} = %options;
%{$aliases{$name}} = %alias;
my $name = $1;
my %alias = ();
$alias{"module"} = $main;
my %options;
$args = parse_config_options("$config_file:$nb", $args, \%options);
%{$alias{"options"}} = %options;
%{$aliases{$name}} = %alias;
} elsif ($cmd eq "options") {
my %options;
my $o = $line;
$o =~ s/.*?\[options\] +//;
if (defined $document{''}{"options"}) {
%options = %{$document{''}{"options"}};
}
parse_config_options("$config_file:$nb",
$o,
\%options);
%{$document{''}{"options"}} = %options;
my %options;
my $o = $line;
$o =~ s/.*?\[options\] +//;
if (defined $document{''}{"options"}) {
%options = %{$document{''}{"options"}};
}
parse_config_options("$config_file:$nb",
$o,
\%options);
%{$document{''}{"options"}} = %options;
} else {
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unparsable command '%s'."), $cmd);
die wrap_ref_mod("$config_file:$nb", "",
gettext("Unparsable command '%s'."), $cmd);
}
$line = "";
}
foreach my $master (keys %document) {
next if ($master eq '');
my $m = basename $master;
my $m = $document{$master}{"master"} || basename $master;
my $master_pot = $pot_filename;
$master_pot =~ s/\$master/$m/g;
$split_pot{$master} = $master_pot;
if ($update_pot_file and $po4a_opts{"verbose"});
} else {
print wrap_msg(gettext("Creating %s:"), $pot_filename)
if $po4a_opts{"verbose"};
if $po4a_opts{"verbose"};
$update_pot_file = 1;
}
chdir $po4a_opts{"calldir"}
}
}
my %Po_opts;
if (defined $po4a_opts{'msgid-bugs-address'}) {
$Po_opts{'msgid-bugs-address'} = $po4a_opts{'msgid-bugs-address'};
}
if (defined $po4a_opts{'copyright-holder'}) {
$Po_opts{'copyright-holder'} = $po4a_opts{'copyright-holder'};
}
if (defined $po4a_opts{'package-name'}) {
$Po_opts{'package-name'} = $po4a_opts{'package-name'};
}
if (defined $po4a_opts{'package-version'}) {
$Po_opts{'package-version'} = $po4a_opts{'package-version'};
}
if ($update_pot_file) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
my $potfile=Locale::Po4a::Po->new(\%Po_opts);
my %pot_options;
foreach (qw(porefs msgid-bugs-address copyright-holder package-name package-version)) {
if (defined $po4a_opts{$_}) {
$pot_options{$_} = $po4a_opts{$_};
}
}
my $potfile=Locale::Po4a::Po->new(\%pot_options);
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
foreach my $master (sort { return -1 if ($a eq "");
$potfile = $doc->getpoout();
}
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
if ($po4a_opts{"split"}) {
(undef,$pot_filename)=File::Temp->tempfile("po4aXXXX",
DIR => "/tmp",
(undef,$pot_filename)=File::Temp::tempfile("po4aXXXX",
DIR => $ENV{TMPDIR} || "/tmp",
SUFFIX => ".pot",
OPEN => 0,
UNLINK => 0)
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
print wrap_msg(gettext(" (%d entries)"), $potfile->count_entries())
unless ($po4a_opts{"quiet"});
# Create a temporary POT, and check if the old one needs to be
# updated (unless --force was specified).
unless ($po4a_opts{"force"}) {
(undef,$tmp_file)=File::Temp->tempfile("po4aXXXX",
DIR => "/tmp",
(undef,$tmp_file)=File::Temp::tempfile("po4aXXXX",
DIR => $ENV{TMPDIR} || "/tmp",
SUFFIX => ".pot",
OPEN => 0,
UNLINK => 0)
or die wrap_msg(gettext("Can't create directory '%s': %s"),
$dir, $!);
}
my $cmd = "msggrep -N '$master' -o ".
my $cmd = "msggrep".$Config{_exe}." -N '$master' -o ".
($po4a_opts{"force"}?$split_pot{$master}:$tmp_file).
" $pot_filename";
run_cmd($cmd);
# Generate a complete .po
foreach my $lang (sort keys %po_filename) {
my $tmp_bigpo;
(undef,$tmp_bigpo)=File::Temp->tempfile("po4aXXXX",
DIR => "/tmp",
(undef,$tmp_bigpo)=File::Temp::tempfile("po4aXXXX",
DIR => $ENV{TMPDIR} || "/tmp",
SUFFIX => "-$lang.po",
OPEN => 0,
UNLINK => 0)
my $cmd_cat = "";
foreach my $master (keys %document) {
next if ($master eq '');
my $m = basename $master;
my $m = $document{$master}{"master"} || basename $master;
my $master_po = $po_filename{$lang};
$master_po =~ s/\$master/$m/g;
if (-e "$master_po") {
$split_po{$lang}{$master} = $master_po;
}
if (length $cmd_cat) {
$cmd_cat = "msgcat -o $tmp_bigpo $cmd_cat";
$cmd_cat = "msgcat".$Config{_exe}." -o $tmp_bigpo $cmd_cat";
run_cmd($cmd_cat);
}
# We do not need to keep the original name with $master
if (not scalar @{$po4a_opts{"partial"}}) {
foreach $lang (sort keys %po_filename) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
if (-e $po_filename{$lang}) {
print wrap_msg(gettext("Updating %s:")." ", $po_filename{$lang})
if ($po4a_opts{"verbose"});
my $msgmerge_opt = $po4a_opts{"msgmerge-opt"};
$msgmerge_opt =~ s/\$lang\b/$lang/g if scalar @langs;
my $cmd = "msgmerge -U ".$po_filename{$lang}." $pot_filename ".$msgmerge_opt." --backup=none";
run_cmd($cmd);
system "msgfmt --statistics -v -o /dev/null ".$po_filename{$lang}
if $po4a_opts{"verbose"};
print wrap_msg(gettext("Updating %s:")." ", $po_filename{$lang})
if ($po4a_opts{"verbose"});
my $msgmerge_opt = $po4a_opts{"msgmerge-opt"};
$msgmerge_opt =~ s/\$lang\b/$lang/g if scalar @langs;
my $cmd = "msgmerge".$Config{_exe}." -U ".$po_filename{$lang}." $pot_filename ".$msgmerge_opt." --backup=none";
run_cmd($cmd);
my @cmd = ("msgfmt".$Config{_exe}, "--statistics", "-v", "-o", File::Spec->devnull(), $po_filename{$lang});
system (@cmd)
if $po4a_opts{"verbose"};
} else {
print wrap_msg(gettext("Creating %s:"), $po_filename{$lang})
if $po4a_opts{"verbose"};
my $cmd = "msginit -i $pot_filename --locale $lang -o ".$po_filename{$lang}." --no-translator";
run_cmd($cmd);
print wrap_msg(gettext("Creating %s:"), $po_filename{$lang})
if $po4a_opts{"verbose"};
my $cmd = "msginit".$Config{_exe}." -i $pot_filename --locale $lang -o ".$po_filename{$lang}." --no-translator";
run_cmd($cmd);
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
}
}
if ($po4a_opts{"split"}) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
# We don't need the tmp big POT anymore
unlink($pot_filename);
my $tmp_file;
# Create a temporary PO, and check if the old one needs to be
# updated (unless --force was specified).
(undef,$tmp_file)=File::Temp->tempfile("po4aXXXX",
DIR => "/tmp",
(undef,$tmp_file)=File::Temp::tempfile("po4aXXXX",
DIR => $ENV{TMPDIR} || "/tmp",
SUFFIX => ".po",
OPEN => 0,
UNLINK => 0)
# Create an empty PO or copy the original PO header.
# This permits to keep the header.
if (-f $split_po{$lang}{$master}) {
$cmd = "msggrep --force-po -v -K -e '.'".
$cmd = "msggrep".$Config{_exe}." --force-po -v -K -e '.'".
" -o ".$tmp_file.
" ".$split_po{$lang}{$master};
} else {
$cmd = "msginit --no-translator -l ".$lang.
$cmd = "msginit".$Config{_exe}." --no-translator -l ".$lang.
" -i ".$split_pot{$master}.
" -o ".$tmp_file;
}
# Update the PO according to the new POT and to the big PO
# (compendium).
$cmd = "msgmerge -U -C ".$po_filename{$lang}.
$cmd = "msgmerge".$Config{_exe}." -U -C ".$po_filename{$lang}.
" --backup=none ".$po4a_opts{"msgmerge-opt"}.
" $tmp_file ".$split_pot{$master};
run_cmd($cmd);
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
}
if (not $po4a_opts{"no-translations"}) {
# update all translations
foreach $lang (sort keys %po_filename) {
# Read the $lang PO once, no options for the creation
my $po = Locale::Po4a::Po->new();
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
$po->read($po_filename{$lang});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
# Read the $lang PO once, no options for the creation
my $po = Locale::Po4a::Po->new();
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
$po->read($po_filename{$lang});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
DOC: foreach my $master (sort { return -1 if ($a eq "");
return 1 if ($b eq "");
$document{$a}{'pos'} <=>
$document{$b}{'pos'} } keys %document) {
next if ($master eq '');
next unless defined $document{$master}{$lang};
if (scalar @{$po4a_opts{"partial"}}) {
next unless defined $partial{'files'}{$document{$master}{$lang}};
}
DOC: foreach my $master (sort { return -1 if ($a eq "");
return 1 if ($b eq "");
$document{$a}{'pos'} <=>
$document{$b}{'pos'} } keys %document) {
next if ($master eq '');
next unless defined $document{$master}{$lang};
if (scalar @{$po4a_opts{"partial"}}) {
next unless defined $partial{'files'}{$document{$master}{$lang}};
}
unless ($po4a_opts{"force"}) {
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"srcdir"});
}
my %file_opts = %po4a_opts;
my $options = "";
if (defined $document{$master}{"options"}{"global"}) {
$options .= $document{$master}{"options"}{"global"};
}
# append the language options
if (defined $document{$master}{"options"}{$lang}) {
$options .= " ".$document{$master}{"options"}{$lang};
}
if (defined $options) {
# also use the options provided on the command line
%file_opts = get_options(@ORIGINAL_ARGV,
split_opts($options));
}
my $doc=Locale::Po4a::Chooser::new($document{$master}{'format'},
%{$file_opts{"options"}});
my %file_opts = %po4a_opts;
my $options = "";
if (defined $document{$master}{"options"}{"global"}) {
$options .= $document{$master}{"options"}{"global"};
}
# append the language options
if (defined $document{$master}{"options"}{$lang}) {
$options .= " ".$document{$master}{"options"}{$lang};
}
if (defined $options) {
# also use the options provided on the command line
%file_opts = get_options(@ORIGINAL_ARGV,
split_opts($options));
}
my $doc=Locale::Po4a::Chooser::new($document{$master}{'format'},
%{$file_opts{"options"}});
my @file_in_name;
push @file_in_name, $master;
my @file_in_name;
push @file_in_name, $master;
# Reuse the already parsed PO, do not use the po_in_name
# Reuse the already parsed PO, do not use the po_in_name
# option of process.
$doc->{TT}{po_in} = $po;
$doc->{TT}{po_in}->stats_clear();
$doc->{TT}{po_in} = $po;
$doc->{TT}{po_in}->stats_clear();
$doc->process('file_in_name' => \@file_in_name,
'file_out_name' => $document{$master}{$lang},
'file_in_charset' => $file_opts{"mastchar"},
'file_out_charset' => $file_opts{"locchar"},
'addendum_charset' => $file_opts{"addchar"},
'srcdir' => $po4a_opts{"srcdir"},
'destdir' => $po4a_opts{"destdir"},
'calldir' => $po4a_opts{"calldir"});
$doc->process('file_in_name' => \@file_in_name,
'file_out_name' => $document{$master}{$lang},
'file_in_charset' => $file_opts{"mastchar"},
'file_out_charset' => $file_opts{"locchar"},
'addendum_charset' => $file_opts{"addchar"},
'srcdir' => $po4a_opts{"srcdir"},
'destdir' => $po4a_opts{"destdir"},
'calldir' => $po4a_opts{"calldir"});
my ($percent,$hit,$queries) = $doc->stats();
my ($percent,$hit,$queries) = $doc->stats();
if ($percent<$file_opts{"threshold"}) {
print wrap_msg(gettext("Discard %s (%s of %s strings; only %s%% translated; need %s%%)."),
$document{$master}{$lang}, $hit, $queries,
$percent, $file_opts{"threshold"});
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
unlink($document{$master}{$lang}) if (-e $document{$master}{$lang});
unless ($po4a_opts{"force"}) {
if ($po4a_opts{"stamp"}) {
touch($document{$master}{$lang}.".po4a-stamp");
print wrap_msg(gettext("Timestamp %s created."),
$document{$master}{$lang}.".po4a-stamp")
if ($po4a_opts{"verbose"});
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
next DOC;
}
unless ($po4a_opts{"force"}) {
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
if (-e $document{$master}{$lang}.".po4a-stamp") {
unlink $document{$master}{$lang}.".po4a-stamp";
print wrap_msg(gettext("Timestamp %s removed."),
$document{$master}{$lang}.".po4a-stamp")
if ($po4a_opts{"verbose"});
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
}
if ($percent<$file_opts{"threshold"}) {
print wrap_msg(gettext("Discard %s (%s of %s strings; only %s%% translated; need %s%%)."),
$document{$master}{$lang}, $hit, $queries,
$percent, $file_opts{"threshold"});
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
unlink($document{$master}{$lang}) if (-e $document{$master}{$lang});
unless ($po4a_opts{"force"}) {
if ($po4a_opts{"stamp"}) {
touch($document{$master}{$lang}.".po4a-stamp");
print wrap_msg(gettext("Timestamp %s created."),
$document{$master}{$lang}.".po4a-stamp")
if ($po4a_opts{"verbose"});
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
next DOC;
}
unless ($po4a_opts{"force"}) {
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
if (-e $document{$master}{$lang}.".po4a-stamp") {
unlink $document{$master}{$lang}.".po4a-stamp";
print wrap_msg(gettext("Timestamp %s removed."),
$document{$master}{$lang}.".po4a-stamp")
if ($po4a_opts{"verbose"});
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
}
if (defined ($document{$master}{"add_$lang"})) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
foreach my $add (@{$document{$master}{"add_$lang"}}) {
if ( !$doc->addendum($add) ) {
die wrap_msg(gettext("Addendum %s does NOT apply to %s (translation discarded)."),
$add, $document{$master}{$lang});
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
unlink($document{$master}{$lang}) if (-e $document{$master}{$lang});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
next DOC;
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
}
if ($file_opts{"verbose"}) {
if ($percent == 100) {
print wrap_msg(gettext("%s is %s%% translated (%s strings)."),
$document{$master}{$lang}, $percent, $queries);
} else {
print wrap_msg(gettext("%s is %s%% translated (%s of %s strings)."),
$document{$master}{$lang}, $percent, $hit, $queries);
}
}
if (defined ($document{$master}{"add_$lang"})) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
foreach my $add (@{$document{$master}{"add_$lang"}}) {
if ( !$doc->addendum($add) ) {
die wrap_msg(gettext("Addendum %s does NOT apply to %s (translation discarded)."),
$add, $document{$master}{$lang});
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
unlink($document{$master}{$lang}) if (-e $document{$master}{$lang});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
next DOC;
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
}
if ($file_opts{"verbose"}) {
if ($percent == 100) {
print wrap_msg(gettext("%s is %s%% translated (%s strings)."),
$document{$master}{$lang}, $percent, $queries);
} else {
print wrap_msg(gettext("%s is %s%% translated (%s of %s strings)."),
$document{$master}{$lang}, $percent, $hit, $queries);
}
}
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
$doc->write($document{$master}{$lang});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
}
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
$doc->write($document{$master}{$lang});
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
}
}
}
if ($po4a_opts{"split"}) {
chdir $po4a_opts{"srcdir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
# We don't need the tmp big POs anymore
foreach $lang (keys %po_filename) {
unlink $po_filename{$lang};
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"srcdir"});
if (defined $po4a_opts{"srcdir"});
}
if ($po4a_opts{"rm-translations"}) {
# Delete the translated documents
chdir $po4a_opts{"destdir"}
if (defined $po4a_opts{"destdir"});
if (defined $po4a_opts{"destdir"});
foreach $lang (keys %po_filename) {
foreach my $master (keys %document) {
next if ($master eq '');
unlink $document{$master}{$lang};
unlink $document{$master}{$lang}.".po4a-stamp";
}
foreach my $master (keys %document) {
next if ($master eq '');
unlink $document{$master}{$lang};
unlink $document{$master}{$lang}.".po4a-stamp";
}
}
chdir $po4a_opts{"calldir"}
if (defined $po4a_opts{"destdir"});
if (defined $po4a_opts{"destdir"});
}
sub touch {
trunk/package/bin/po4a/lib/Locale/Po4a/Man.pm
19681968
19691969
19701970
1971
1972
1973
1974
1975
1976
1971
1972
19771973
19781974
19791975
......
24812477
24822478
24832479
2484
2485
2486
2487
24882480
24892481
24902482
# corresponding UE command.
# When generating HTML this should translate into the HTML command
# <A NAME="u" id="u">&nbsp;</A>
$macro{'UR'}=sub {
return untranslated(@_)
if (defined($_[2]) && $_[2] eq ':');
return translate_joined(@_);
};
$macro{'UE'}=\&noarg;
$inline{'UR'}=1;
$inline{'UE'}=1;
$macro{'UN'}=\&translate_joined;
# Miscellaneous Macros
$macro{'In'} = \&translate_mdoc;
# NetBSD Macro
$inline{'Nx'} = 1;
# Curly brackets
$inline{'Brq'} = 1;
# Corporate name
$inline{'%Q'} = 1;
# Math symbol
$inline{'Ms'} = 1;
# Prints 'under development'
trunk/package/bin/po4a/lib/Locale/Po4a/LaTeX.pm
188188
189189
190190
191
191
192192
193193
194194
register_generic_command("*newfont,{}{}");
register_generic_command("*newlength,{}");
register_generic_command("*newsavebox,{}");
register_generic_command("*newtheorem,{}{_}"); # Two forms, the optionnal arg is not the first one
register_generic_command("*newtheorem,{}[]{_}[]"); # Two forms, {}[]{_} or {}{_}[]
register_generic_command("nocite,{}");
register_generic_command("nolinebreak,[]");
register_generic_command("*nopagebreak,[]");
trunk/package/bin/po4a/lib/Locale/Po4a/AsciiDoc.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
#!/usr/bin/perl -w
=encoding UTF-8
=head1 NAME
Locale::Po4a::AsciiDoc - convert AsciiDoc documents from/to PO files
=head1 DESCRIPTION
The po4a (PO for anything) project goal is to ease translations (and more
interestingly, the maintenance of translations) using gettext tools on
areas where they were not expected like documentation.
Locale::Po4a::AsciiDoc is a module to help the translation of documentation in
the AsciiDoc format.
=cut
package Locale::Po4a::AsciiDoc;
use 5.010;
use strict;
use warnings;
require Exporter;
use vars qw(@ISA @EXPORT);
@ISA = qw(Locale::Po4a::TransTractor);
@EXPORT = qw();
use Locale::Po4a::TransTractor;
use Locale::Po4a::Common;
=head1 OPTIONS ACCEPTED BY THIS MODULE
These are this module's particular options:
=over
=item B<definitions>
The name of a file containing definitions for po4a, as defined in the
B<INLINE CUSTOMIZATION> section.
You can use this option if it is not possible to put the definitions in
the document being translated.
In a definitions file, lines must not start by two slashes, but directly
by B<po4a:>.
=item B<entry>
Space-separated list of attribute entries you want to translate. By default,
no attribute entries are translatable.
=item B<macro>
Space-separated list of macro definitions.
=item B<style>
Space-separated list of style definitions.
=back
=head1 INLINE CUSTOMIZATION
The AsciiDoc module can be customized with lines starting by B<//po4a:>.
These lines are interpreted as commands to the parser.
The following commands are recognized:
=over 4
=item B<//po4a: macro >I<name>B<[>I<attribute list>B<]>
This permits to describe in detail the parameters of a B<macro>;
I<name> must be a valid macro name, and it ends with an underscore
if the target must be translated.
The I<attribute list> argument is a comma separated list which
contains informations about translatable arguments. This list contains
either numbers, to define positional parameters, or named attributes.
If a plus sign (B<+>) is prepended to I<name>, then the macro and its
arguments are translated as a whole. There is no need to define
attribute list in this case, but brackets must be present.
=item B<//po4a: style >B<[>I<attribute list>B<]>
This permits to describe in detail which attributes of a style must
be translated.
The I<attribute list> argument is a comma separated list which
contains informations about translatable arguments. This list contains
either numbers, to define positional parameters, or named attributes.
The first attribute is the style name, it will not be translated.
If a plus sign (B<+>) is prepended to the style name, then the
attribute list is translated as a whole. There is no need to define
translatable attributes.
If a minus sign (B<->) is prepended to the style name, then this
attribute is not translated.
=item B<//po4a: entry >I<name>
This declares an attribute entry as being translatable. By default,
they are not translated.
=back
=cut
my @comments = ();
my %debug=('split_attributelist' => 0,
'join_attributelist' => 0
);
sub initialize {
my $self = shift;
my %options = @_;
$self->{options}{'nobullets'} = 1;
$self->{options}{'debug'}='';
$self->{options}{'verbose'} = 1;
$self->{options}{'entry'}='';
$self->{options}{'macro'}='';
$self->{options}{'style'}='';
$self->{options}{'definitions'}='';
foreach my $opt (keys %options) {
die wrap_mod("po4a::asciidoc",
dgettext("po4a", "Unknown option: %s"), $opt)
unless exists $self->{options}{$opt};
$self->{options}{$opt} = $options{$opt};
}
if ($options{'debug'}) {
foreach ($options{'debug'}) {
$debug{$_} = 1;
}
}
$self->{translate} = {
macro => {},
style => {},
entry => {}
};
$self->register_attributelist('[verse,2,3,attribution,citetitle]');
$self->register_attributelist('[quote,2,3,attribution,citetitle]');
$self->register_attributelist('[icon]');
$self->register_attributelist('[caption]');
$self->register_attributelist('[-icons,caption]');
$self->register_macro('image_[1,alt,title,link]');
if ($self->{options}{'definitions'}) {
$self->parse_definition_file($self->{options}{'definitions'})
}
$self->{options}{entry} =~ s/^\s*//;
foreach my $attr (split(/\s+/, $self->{options}{entry})) {
$self->{translate}->{entry}->{$attr} = 1;
}
$self->{options}{macro} =~ s/^\s*//;
foreach my $attr (split(/\s+/, $self->{options}{macro})) {
$self->register_macro($attr);
}
$self->{options}{style} =~ s/^\s*//;
foreach my $attr (split(/\s+/, $self->{options}{style})) {
$self->register_attributelist($attr);
}
}
sub register_attributelist {
my $self = shift;
my $list = shift;
my $type = shift || 'style';
$list =~ s/^\[//;
$list =~ s/\]$//;
$list =~ s/\s+//;
$list = ",".$list.",";
$list =~ m/^,([-+]?)([^,]*)/;
my $command = $2;
$self->{translate}->{$type}->{$command} = $list;
print STDERR "Definition: $type $command: $list\n" if $debug{definitions};
}
sub register_macro {
my $self = shift;
my $text = shift;
die wrap_mod("po4a::asciidoc",
dgettext("po4a", "Unable to parse macro definition: %s"), $text)
unless $text =~ m/^(\+?)([\w\d][\w\d-]*?)(_?)\[(.*)\]$/;
my $macroplus = $1;
my $macroname = $2;
my $macrotarget = $3;
my $macroparam = $macroname.",".$4;
$self->register_attributelist($macroparam, 'macro');
if ($macrotarget eq '_') {
$self->{translate}->{macro}->{$macroname} .= '_';
}
if ($macroplus eq '+') {
$self->{translate}->{macro}->{$macroname} =~ s/^,/,+/;
}
}
sub is_translated_target {
my $self = shift;
my $macroname = shift;
return defined($self->{translate}->{macro}->{$macroname}) &&
$self->{translate}->{macro}->{$macroname} =~ m/_$/;
}
sub is_unsplitted_attributelist {
my $self = shift;
my $name = shift;
my $type = shift;
return defined($self->{translate}->{$type}->{$name}) &&
$self->{translate}->{$type}->{$name} =~ m/^,\+/;
}
sub process_definition {
my $self = shift;
my $command = shift;
if ($command =~ m/^po4a: macro\s+(.*\[.*\])\s*$/) {
$self->register_macro($1);
} elsif ($command =~ m/^po4a: style\s*(\[.*\])\s*$/) {
$self->register_attributelist($1);
} elsif ($command =~ m/^po4a: entry\s+(.+?)\s*$/) {
$self->{translate}->{entry}->{$1} = 1;
}
}
sub parse_definition_file {
my $self = shift;
my $filename = shift;
if (! open (IN,"<", $filename)) {
die wrap_mod("po4a::asciidoc",
dgettext("po4a", "Can't open %s: %s"), $filename, $!);
}
while (<IN>) {
chomp;
process_definition($self, $_);
}
close IN;
}
my $RE_SECTION_TEMPLATES = "sect1|sect2|sect3|sect4|preface|colophon|dedication|synopsis|index";
my $RE_STYLE_ADMONITION = "TIP|NOTE|IMPORTANT|WARNING|CAUTION";
my $RE_STYLE_PARAGRAPH = "normal|literal|verse|quote|listing|abstract|partintro|comment|example|sidebar|source|music|latex|graphviz";
my $RE_STYLE_NUMBERING = "arabic|loweralpha|upperalpha|lowerroman|upperroman";
my $RE_STYLE_LIST = "appendix|horizontal|qanda|glossary|bibliography";
my $RE_STYLES = "$RE_SECTION_TEMPLATES|$RE_STYLE_ADMONITION|$RE_STYLE_PARAGRAPH|$RE_STYLE_NUMBERING|$RE_STYLE_LIST|float";
BEGIN {
my $UnicodeGCString_available = 0;
$UnicodeGCString_available = 1 if (eval { require Unicode::GCString });
eval {
sub columns($$$) {
my $text = shift;
my $encoder = shift;
$text = $encoder->decode($text) if (defined($encoder) && $encoder->name ne "ascii");
if ($UnicodeGCString_available) {
return Unicode::GCString->new($text)->columns();
} else {
$text =~ s/\n$//s;
return length($text) if !(defined($encoder) && $encoder->name ne "ascii");
die wrap_mod("po4a::asciidoc",
dgettext("po4a", "Detection of two line titles failed at %s\nInstall the Unicode::GCString module!"), shift)
}
}
};
}
sub parse {
my $self = shift;
my ($line,$ref);
my $paragraph="";
my $wrapped_mode = 1;
($line,$ref)=$self->shiftline();
my $file = $ref;
$file =~ s/:[0-9]+$// if defined($line);
while (defined($line)) {
$ref =~ m/^(.*):[0-9]+$/;
if ($1 ne $file) {
$file = $1;
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
}
chomp($line);
$self->{ref}="$ref";
if ((defined $self->{verbatim}) and ($self->{verbatim} == 3)) {
# Untranslated blocks
$self->pushline($line."\n");
if ($line =~ m/^~{4,}$/) {
undef $self->{verbatim};
undef $self->{type};
$wrapped_mode = 1;
}
} elsif ((defined $self->{verbatim}) and ($self->{verbatim} == 2)) {
# CommentBlock
if ($line =~ m/^\/{4,}$/) {
undef $self->{verbatim};
undef $self->{type};
$wrapped_mode = 1;
} else {
push @comments, $line;
}
} elsif ((not defined($self->{verbatim})) and ($line =~ m/^(\+|--)$/)) {
# List Item Continuation or List Block
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$self->pushline($line."\n");
} elsif ((not defined($self->{verbatim})) and
($line =~ m/^(={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})$/) and
(defined($paragraph) )and
($paragraph =~ m/^[^\n]*\n$/s) and
(columns($paragraph, $self->{TT}{po_in}{encoder}, $ref) == (length($line)))) {
# Found title
$wrapped_mode = 0;
my $level = $line;
$level =~ s/^(.).*$/$1/;
$paragraph =~ s/\n$//s;
my $t = $self->translate($paragraph,
$self->{ref},
"Title $level",
"comment" => join("\n", @comments),
"wrap" => 0);
$self->pushline($t."\n");
$paragraph="";
@comments=();
$wrapped_mode = 1;
$self->pushline(($level x (columns($t, $self->{TT}{po_in}{encoder}, $ref)))."\n");
} elsif ($line =~ m/^(={1,5})( +)(.*?)( +\1)?$/) {
my $titlelevel1 = $1;
my $titlespaces = $2;
my $title = $3;
my $titlelevel2 = $4||"";
# Found one line title
do_paragraph($self,$paragraph,$wrapped_mode);
$wrapped_mode = 0;
$paragraph="";
my $t = $self->translate($title,
$self->{ref},
"Title $titlelevel1",
"comment" => join("\n", @comments),
"wrap" => 0);
$self->pushline($titlelevel1.$titlespaces.$t.$titlelevel2."\n");
@comments=();
$wrapped_mode = 1;
} elsif ($line =~ m/^(\/{4,}|\+{4,}|-{4,}|\.{4,}|\*{4,}|_{4,}|={4,}|~{4,}|\|={4,})$/) {
# Found one delimited block
my $t = $line;
$t =~ s/^(.).*$/$1/;
my $type = "delimited block $t";
if (defined $self->{verbatim} and ($self->{type} ne $type)) {
$paragraph .= "$line\n";
} else {
do_paragraph($self,$paragraph,$wrapped_mode);
if ( (defined $self->{type})
and ($self->{type} eq $type)) {
undef $self->{type};
undef $self->{verbatim};
$wrapped_mode = 1;
} else {
if ($t eq "\/") {
# CommentBlock, should not be treated
$self->{verbatim} = 2;
} elsif ($t eq "+") {
# PassthroughBlock
$wrapped_mode = 0;
$self->{verbatim} = 1;
} elsif ($t eq "-" or $t eq "|") {
# ListingBlock
$wrapped_mode = 0;
$self->{verbatim} = 1;
} elsif ($t eq ".") {
# LiteralBlock
$wrapped_mode = 0;
$self->{verbatim} = 1;
} elsif ($t eq "*") {
# SidebarBlock
$wrapped_mode = 1;
} elsif ($t eq "_") {
# QuoteBlock
if ( (defined $self->{type})
and ($self->{type} eq "verse")) {
$wrapped_mode = 0;
$self->{verbatim} = 1;
} else {
$wrapped_mode = 1;
}
} elsif ($t eq "=") {
# ExampleBlock
$wrapped_mode = 1;
} elsif ($t eq "~") {
# Filter blocks, TBC: not translated
$wrapped_mode = 0;
$self->{verbatim} = 3;
}
$self->{type} = $type;
}
$paragraph="";
$self->pushline($line."\n") unless defined($self->{verbatim}) && $self->{verbatim} == 2;
}
} elsif ((not defined($self->{verbatim})) and ($line =~ m/^\/\/(.*)/)) {
my $comment = $1;
if ($comment =~ m/^po4a: /) {
# Po4a command line
$self->process_definition($comment);
} else {
# Comment line
push @comments, $comment;
}
} elsif (not defined $self->{verbatim} and
($line =~ m/^\[\[([^\]]*)\]\]$/)) {
# Found BlockId
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
$self->pushline($line."\n");
undef $self->{bullet};
undef $self->{indent};
} elsif (not defined $self->{verbatim} and
($paragraph eq "") and
($line =~ m/^((?:$RE_STYLE_ADMONITION):\s+)(.*)$/)) {
my $type = $1;
my $text = $2;
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph=$text."\n";
$wrapped_mode = 1;
$self->pushline($type);
undef $self->{bullet};
undef $self->{indent};
} elsif (not defined $self->{verbatim} and
($line =~ m/^\[($RE_STYLES)\]$/)) {
my $type = $1;
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
$self->pushline($line."\n");
if ($type eq "verse") {
$wrapped_mode = 0;
}
undef $self->{bullet};
undef $self->{indent};
} elsif (not defined $self->{verbatim} and
($line =~ m/^\[.*\]$/)) {
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
my $t = $self->parse_style($line);
$self->pushline("$t\n");
@comments=();
$wrapped_mode = 1;
if ($line =~ m/^\[(['"]?)(verse|quote)\1,/) {
$wrapped_mode = 0 if $2 eq 'verse';
$self->{type} = $2;
}
undef $self->{bullet};
undef $self->{indent};
} elsif (not defined $self->{verbatim} and
($line =~ m/^(\s*)([*_+`'#[:alnum:]].*)((?:::|;;|\?\?|:-)(?: *\\)?)$/)) {
my $indent = $1;
my $label = $2;
my $labelend = $3;
# Found labeled list
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
$self->{bullet} = "";
$self->{indent} = $indent;
my $t = $self->translate($label,
$self->{ref},
"Labeled list",
"comment" => join("\n", @comments),
"wrap" => 0);
$self->pushline("$indent$t$labelend\n");
@comments=();
} elsif (not defined $self->{verbatim} and
($line =~ m/^(\s*)(\S.*)((?:::|;;)\s+)(.*)$/)) {
my $indent = $1;
my $label = $2;
my $labelend = $3;
my $labeltext = $4;
# Found Horizontal Labeled Lists
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph=$labeltext."\n";
$wrapped_mode = 1;
$self->{bullet} = "";
$self->{indent} = $indent;
my $t = $self->translate($label,
$self->{ref},
"Labeled list",
"comment" => join("\n", @comments),
"wrap" => 0);
$self->pushline("$indent$t$labelend");
@comments=();
} elsif (not defined $self->{verbatim} and
($line =~ m/^\:(\S.*?)(:\s*)(.*)$/)) {
my $attrname = $1;
my $attrsep = $2;
my $attrvalue = $3;
while ($attrvalue =~ s/ \+$//s) {
($line,$ref)=$self->shiftline();
$ref =~ m/^(.*):[0-9]+$/;
$line =~ s/^\s+//;
$attrvalue .= $line;
}
# Found an Attribute entry
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
undef $self->{bullet};
undef $self->{indent};
if (defined($self->{translate}->{entry}->{$attrname})) {
my $t = $self->translate($attrvalue,
$self->{ref},
"Attribute :$attrname:",
"comment" => join("\n", @comments),
"wrap" => 0);
$self->pushline(":$attrname$attrsep$t\n");
} else {
$self->pushline(":$attrname$attrsep$attrvalue\n");
}
@comments=();
} elsif (not defined $self->{verbatim} and
($line =~ m/^([\w\d][\w\d-]*)(::)(\S+)\[(.*)\]$/)) {
my $macroname = $1;
my $macrotype = $2;
my $macrotarget = $3;
my $macroparam = $4;
# Found a macro
if ($macrotype eq '::') {
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
undef $self->{bullet};
undef $self->{indent};
}
my $t = $self->parse_macro($macroname, $macrotype, $macrotarget, $macroparam);
$self->pushline("$t\n");
@comments=();
} elsif (not defined $self->{verbatim} and
($line !~ m/^\.\./) and ($line =~ m/^\.(\S.*)$/)) {
my $title = $1;
# Found block title
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
undef $self->{bullet};
undef $self->{indent};
my $t = $self->translate($title,
$self->{ref},
"Block title",
"comment" => join("\n", @comments),
"wrap" => 0);
$self->pushline(".$t\n");
@comments=();
} elsif (not defined $self->{verbatim} and
($line =~ m/^(\s*)((?:[-*o+]|(?:[0-9]+[.\)])|(?:[a-z][.\)])|\([0-9]+\)|\.|\.\.)\s+)(.*)$/)) {
my $indent = $1||"";
my $bullet = $2;
my $text = $3;
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph = $text."\n";
$self->{indent} = $indent;
$self->{bullet} = $bullet;
} elsif (not defined $self->{verbatim} and
($line =~ m/^((?:<?[0-9]+)?> +)(.*)$/)) {
my $bullet = $1;
my $text = $2;
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph = $text."\n";
$self->{indent} = "";
$self->{bullet} = $bullet;
} elsif (not defined $self->{verbatim} and
(defined $self->{bullet} and $line =~ m/^(\s+)(.*)$/)) {
my $indent = $1;
my $text = $2;
if (not defined $self->{indent}) {
$paragraph .= $text."\n";
$self->{indent} = $indent;
} elsif (length($paragraph) and (length($self->{bullet}) + length($self->{indent}) == length($indent))) {
$paragraph .= $text."\n";
} else {
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph = $text."\n";
$self->{indent} = $indent;
$self->{bullet} = "";
}
} elsif ($line =~ /^\s*$/) {
# Break paragraphs on lines containing only spaces
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1 unless defined($self->{verbatim});
$self->pushline($line."\n");
undef $self->{controlkey};
} elsif ($line =~ /^-- $/) {
# Break paragraphs on email signature hint
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
$self->pushline($line."\n");
} elsif ( $line =~ /^=+$/
or $line =~ /^_+$/
or $line =~ /^-+$/) {
$wrapped_mode = 0;
$paragraph .= $line."\n";
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
} else {
if ($line =~ /^\s/) {
# A line starting by a space indicates a non-wrap
# paragraph
$wrapped_mode = 0;
}
undef $self->{bullet};
undef $self->{indent};
# TODO: comments
$paragraph .= $line."\n";
}
# paragraphs starting by a bullet, or numbered
# or paragraphs with a line containing many consecutive spaces
# (more than 3)
# are considered as verbatim paragraphs
$wrapped_mode = 0 if ( $paragraph =~ m/^(\*|[0-9]+[.)] )/s
or $paragraph =~ m/[ \t][ \t][ \t]/s);
($line,$ref)=$self->shiftline();
}
if (length $paragraph) {
do_paragraph($self,$paragraph,$wrapped_mode);
}
}
sub do_paragraph {
my ($self, $paragraph, $wrap) = (shift, shift, shift);
my $type = shift || $self->{type} || "Plain text";
return if ($paragraph eq "");
# DEBUG
# my $b;
# if (defined $self->{bullet}) {
# $b = $self->{bullet};
# } else {
# $b = "UNDEF";
# }
# $type .= " verbatim: '".($self->{verbatim}||"NONE")."' bullet: '$b' indent: '".($self->{indent}||"NONE")."' type: '".($self->{type}||"NONE")."'";
if (not $wrap and not defined $self->{verbatim}) {
# Detect bullets
# | * blah blah
# |<spaces> blah
# | ^-- aligned
# <empty line>
#
# Other bullets supported:
# - blah o blah + blah
# 1. blah 1) blah (1) blah
TEST_BULLET:
if ($paragraph =~ m/^(\s*)((?:[-*o+]|([0-9]+[.\)])|\([0-9]+\))\s+)([^\n]*\n)(.*)$/s) {
my $para = $5;
my $bullet = $2;
my $indent1 = $1;
my $indent2 = "$1".(' ' x length $bullet);
my $text = $4;
while ($para !~ m/$indent2(?:[-*o+]|([0-9]+[.\)])|\([0-9]+\))\s+/
and $para =~ s/^$indent2(\S[^\n]*\n)//s) {
$text .= $1;
}
# TODO: detect if a line starts with the same bullet
if ($text !~ m/\S[ \t][ \t][ \t]+\S/s) {
my $bullet_regex = quotemeta($indent1.$bullet);
$bullet_regex =~ s/[0-9]+/\\d\+/;
if ($para eq '' or $para =~ m/^$bullet_regex\S/s) {
my $trans = $self->translate($text,
$self->{ref},
"Bullet: '$indent1$bullet'",
"wrap" => 1,
"wrapcol" => - (length $indent2));
$trans =~ s/^/$indent1$bullet/s;
$trans =~ s/\n(.)/\n$indent2$1/sg;
$self->pushline( $trans."\n" );
if ($para eq '') {
return;
} else {
# Another bullet
$paragraph = $para;
goto TEST_BULLET;
}
}
}
}
}
my $end = "";
if ($wrap) {
$paragraph =~ s/^(.*?)(\n*)$/$1/s;
$end = $2 || "";
}
my $t = $self->translate($paragraph,
$self->{ref},
$type,
"comment" => join("\n", @comments),
"wrap" => $wrap);
@comments = ();
if (defined $self->{bullet}) {
my $bullet = $self->{bullet};
my $indent1 = $self->{indent};
my $indent2 = $indent1.(' ' x length($bullet));
$t =~ s/^/$indent1$bullet/s;
$t =~ s/\n(.)/\n$indent2$1/sg;
}
$self->pushline( $t.$end );
}
sub parse_style {
my ($self, $text) = (shift, shift);
$text =~ s/^\[//;
$text =~ s/\]$//;
$text =~ m/^([^=,]+)/;
if (defined($1) && $self->is_unsplitted_attributelist($1, 'style')) {
my $t = $self->translate($text,
$self->{ref},
"Unsplitted AttributeList",
"comment" => join("\n", @comments),
"wrap" => 0);
return "[$t]";
}
my @attributes = $self->split_attributelist($text);
return "[".join(", ", $self->join_attributelist("style", @attributes))."]";
}
sub parse_macro {
my ($self, $macroname, $macrotype, $macrotarget, $macroparam) = (shift, shift, shift, shift, shift);
if ($self->is_unsplitted_attributelist($macroname, 'macro')) {
my $t = $self->translate("$macroname$macrotype$macrotarget\[$macroparam\]",
$self->{ref},
"Unsplitted macro call",
"comment" => join("\n", @comments),
"wrap" => 0);
return $t;
}
my @attributes = $self->split_attributelist($macroparam);
unshift @attributes, $macroname;
my @translated_attributes = $self->join_attributelist("macro", @attributes);
shift @translated_attributes;
if ($self->is_translated_target($macroname)) {
my $target = unquote_space($macrotarget);
my $t = $self->translate($target,
$self->{ref},
"Target for macro $macroname",
"comment" => join("\n", @comments),
"wrap" => 0);
$macrotarget = quote_space($t);
}
return "$macroname$macrotype$macrotarget\[".join(", ", @translated_attributes)."]";
}
sub split_attributelist {
my ($self, $text) = (shift, shift);
print STDERR "Splitting attributes in: $text\n" if $debug{split_attributelist};
my @attributes = ();
while ($text =~ m/\G(
[^\W\d][-\w]*="(?:[^"\\]++|\\.)*+" # named attribute
| [^\W\d][-\w]*=None # undefined named attribute
| [^\W\d][-\w]*=\S+ # invalid, but accept it anyway
| "(?:[^"\\]++|\\.)*+" # quoted attribute
| (?:[^,\\]++|\\.)++ # unquoted attribute
)(?:,\s*+)?/gx) {
print STDERR " -> $1\n" if $debug{split_attributelist};
push @attributes, $1;
}
die wrap_mod("po4a::asciidoc",
dgettext("po4a", "Unable to parse attribute list: [%s]"), $text)
unless scalar(@attributes);
return @attributes;
}
sub join_attributelist {
my ($self, $type) = (shift, shift);
my @attributes = @_;
my $command = shift(@attributes);
my $position = 1;
my @text = ($command);
if ($command =~ m/=/) {
my $attr = $command;
$command =~ s/=.*//;
@text = ();
push @text, $self->translate_attributelist($type, $command, $position, $attr);
}
foreach my $attr (@attributes) {
$position++;
push @text, $self->translate_attributelist($type, $command, $position, $attr);
}
print STDERR "Joined attributes: ".join(", ", @text)."\n" if $debug{join_attributelist};
return @text;
}
sub translate_attributelist {
my ($self, $type, $command, $count, $attr) = (shift, shift, shift, shift, shift);
return $attr unless defined $self->{translate}->{$type}->{$command};
if ($attr =~ m/^([^\W\d][-\w]*)=(.*)/) {
my $attrname = $1;
my $attrvalue = $2;
if ($self->{translate}->{$type}->{$command} =~ m/,$attrname,/) {
my $value = unquote($attrvalue);
my $t = $self->translate($value,
$self->{ref},
"Named '$attrname' AttributeList argument for $type '$command'",
"comment" => join("\n", @comments),
"wrap" => 0);
if ($attrvalue eq 'None' && $t eq 'None') {
$attr = $attrname."=None";
} else {
$attr = $attrname."=".quote($t);
}
}
} else {
if ($self->{translate}->{$type}->{$command} =~ m/,$count,/) {
my $attrvalue = unquote($attr);
my $t = $self->translate($attrvalue,
$self->{ref},
"Positional (\$$count) AttributeList argument for $type '$command'",
"comment" => join("\n", @comments),
"wrap" => 0);
$attr = quote($t);
}
}
return $attr;
}
sub unquote {
my ($text) = shift;
return $text unless $text =~ s/^"(.*)"$/$1/;
$text =~ s/\\"/"/g;
return $text;
}
sub quote {
my $text = shift;
$text =~ s/"/\\"/g;
return '"'.$text.'"';
}
sub quote_space {
my $text = shift;
$text =~ s/ /%20/g;
return $text;
}
sub unquote_space {
my $text = shift;
$text =~ s/%20/ /g;
return $text;
}
1;
=head1 STATUS OF THIS MODULE
Tested successfully on simple AsciiDoc files.
=head1 AUTHORS
Nicolas François <nicolas.francois@centraliens.net>
Denis Barbier <barbier@linuxfr.org>
=head1 COPYRIGHT AND LICENSE
Copyright 2005-2008 by Nicolas FRANÇOIS <nicolas.francois@centraliens.net>.
Copyright 2012 by Denis BARBIER <barbier@linuxfr.org>.
This program is free software; you may redistribute it and/or modify it
under the terms of GPL (see the COPYING file).
trunk/package/bin/po4a/lib/Locale/Po4a/Po.pm
157157
158158
159159
160
161
160
161
162162
163
164
165
163
164
165
166166
167
168
167
169168
170169
171170
......
173172
174173
175174
176
175
176
177177
178178
179179
......
572572
573573
574574
575
576
575
576
577
577578
578579
579580
# '%s' is not supported on Solaris and '%z' indicates
# "2006-10-25 19:36E. Europe Standard Time" on MS Windows.
sub timezone {
my @g = gmtime();
my @l = localtime();
my ($time) = @_;
my @l = localtime($time);
my $diff;
$diff = floor(timelocal(@l)/60 +0.5);
$diff -= floor(timelocal(@g)/60 +0.5);
my $diff = floor(timegm(@l)/60 +0.5) - floor($time/60 +0.5);
my $sign = ($diff >= 0 ? 1 : -1);
$diff = abs($diff);
my $h = floor($diff / 60) + $l[8]; # $l[8] indicates if we are currently
# in a daylight saving time zone
my $h = $sign * floor($diff / 60);
my $m = $diff%60;
return sprintf "%+03d%02d\n", $h, $m;
sub initialize {
my ($self, $options) = (shift, shift);
my $date = strftime("%Y-%m-%d %H:%M", localtime).timezone();
my $time = time;
my $date = strftime("%Y-%m-%d %H:%M", localtime($time)) . timezone($time);
chomp $date;
# $options = ref($options) || $options;
if (-e $filename) {
my ($tmp_filename);
(undef,$tmp_filename)=File::Temp->tempfile($filename."XXXX",
DIR => "/tmp",
my $basename = basename($filename);
(undef,$tmp_filename)=File::Temp::tempfile($basename."XXXX",
DIR => $ENV{TMPDIR} || "/tmp",
OPEN => 0,
UNLINK => 0);
$self->write($tmp_filename);
trunk/package/bin/po4a/lib/Locale/Po4a/Ini.pm
4040
4141
4242
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
7673
7774
7875
chomp($line);
print STDERR "begin\n" if $debug;
if ($line =~ /\"/) {
print STDERR "Start of line containing \".\n" if $debug;
# Text before the first quote
$line =~ m/(^[^"\r\n]*")/;
my $pre_text = $1;
print STDERR " PreText=".$pre_text."\n" if $debug;
# The text for translation
$line =~ m/("[^\r\n]*")/;
my $quoted_text = $1;
print STDERR " QuotedText=".$quoted_text."\n" if $debug;
# Text after last quote
$line =~ m/("[^"\n]*$)/;
my $post_text = $1;
print STDERR " PostText=".$post_text."\n" if $debug;
# Remove starting and ending quotes from the translation text, if any
$quoted_text =~ s/^"//g;
$quoted_text =~ s/"$//g;
# Translate the string it
$par = $self->translate($quoted_text, $ref);
# Escape the \n characters
$par =~ s/\n/\\n/g;
# Now push the result
$self->pushline($pre_text.$par.$post_text."\n");
print STDERR "End of line containing \".\n" if $debug;
}
else
{
print STDERR "Other stuff\n" if $debug;
$self->pushline("$line\n");
}
# Reinit the loop
($line,$ref)=$self->shiftline();
}
if ($line =~ /\"/) {
print STDERR "Start of line containing \".\n" if $debug;
# Text before the first quote
$line =~ m/(^[^"\r\n]*)"/;
my $pre_text = $1;
print STDERR " PreText=".$pre_text."\n" if $debug;
# The text for translation
$line =~ m/"([^\r\n]*)"/;
my $quoted_text = $1;
print STDERR " QuotedText=".$quoted_text."\n" if $debug;
# Text after last quote
$line =~ m/"([^"\n]*$)/;
my $post_text = $1;
print STDERR " PostText=".$post_text."\n" if $debug;
# Translate the string it
$par = $self->translate($quoted_text, $ref, $pre_text);
# Escape the \n characters
$par =~ s/\n/\\n/g;
# Now push the result
$self->pushline($pre_text.'"'.$par.'"'.$post_text."\n");
print STDERR "End of line containing \".\n" if $debug;
}
else
{
print STDERR "Other stuff\n" if $debug;
$self->pushline("$line\n");
}
# Reinit the loop
($line,$ref)=$self->shiftline();
}
}
##############################################################################
trunk/package/bin/po4a/lib/Locale/Po4a/Prop.pm
125125
126126
127127
128
128
129129
130130
131131
=head1 COPYRIGHT AND LICENSE
Copyright 2012 by Yves Blusseau
Copyright 2012-2015 by Yves Blusseau
This program is free software; you may redistribute it and/or modify it
under the terms of GPL (see the COPYING file).
trunk/package/bin/po4a/lib/Locale/Po4a/Text.pm
208208
209209
210210
211
212
211213
212214
213215
......
318320
319321
320322
321
323
322324
323325
324326
if (defined $options{'asciidoc'}) {
$parse_func = \&parse_asciidoc;
$asciidoc=1;
warn wrap_mod("po4a::text",
dgettext("po4a", "asciidoc option deprecated, use asciidoc format instead of text"));
}
if (defined $options{'control'}) {
sub parse_control {
my ($self,$line,$ref,$paragraph,$wrapped_mode,$expect_header,$end_of_paragraph) = @_;
if ($line =~ m/^([^ :]*): *(.*)$/) {
warn "Unrecognized section: '$paragraph'\n"
warn wrap_mod("po4a::text", dgettext("po4a", "Unrecognized section: %s"), $paragraph)
unless $paragraph eq "";
my $tag = $1;
my $val = $2;
trunk/package/bin/po4a/lib/Locale/Po4a/TransTractor.pm
1111
1212
1313
14
14
1515
1616
1717
use subs qw(makespace);
use vars qw($VERSION @ISA @EXPORT);
$VERSION="0.44";
$VERSION="0.45";
@ISA = qw(DynaLoader);
@EXPORT = qw(new process translate
read write readpo writepo
trunk/package/bin/po4a/lib/Locale/Po4a/Wml.pm
8181
8282
8383
84
85
84
85
8686
8787
8888
sub read {
my ($self,$filename)=@_;
my $tmp_filename;
(undef,$tmp_filename)=File::Temp->tempfile("po4aXXXX",
DIR => "/tmp",
(undef,$tmp_filename)=File::Temp::tempfile("po4aXXXX",
DIR => $ENV{TMPDIR} || "/tmp",
SUFFIX => ".xml",
OPEN => 0,
UNLINK => 0)
trunk/package/bin/po4a/lib/Locale/Po4a/TeX.pm
12621262
12631263
12641264
1265
1265
12661266
12671267
12681268
......
12911291
12921292
12931293
1294
1294
12951295
12961296
12971297
......
13171317
13181318
13191319
1320
1320
13211321
13221322
13231323
$commands{'begin'}= sub {
my $self = shift;
my ($command,$variant,$args,$env) = (shift,shift,shift,shift);
my $no_wrap = shift;
my $no_wrap = shift || 0;
print "begin($command,$variant,@$args,@$env,$no_wrap)="
if ($debug{'commands'} || $debug{'environments'});
my ($t,@e) = ("",());
$commands{'end'}= sub {
my $self = shift;
my ($command,$variant,$args,$env) = (shift,shift,shift,shift);
my $no_wrap = shift;
my $no_wrap = shift || 0;
print "end($command,$variant,@$args,@$env,$no_wrap)="
if ($debug{'commands'} || $debug{'environments'});
sub generic_command {
my $self = shift;
my ($command,$variant,$args,$env) = (shift,shift,shift,shift);
my $no_wrap = shift;
my $no_wrap = shift || 0;
print "generic_command($command,$variant,@$args,@$env,$no_wrap)="
if ($debug{'commands'} || $debug{'environments'});
trunk/package/bin/po4a/lib/Locale/Po4a/Xml.pm
10371037
10381038
10391039
1040
1040
1041
10411042
10421043
10431044
if (!$found) {
#It should never enter here, unless you undefine the most
#general tags (as <...>)
die "po4a::xml: Unknown tag type: ".$line."\n";
chomp $line;
die $ref.": Unknown tag type: ".$line."\n";
} else {
return $i;
}
trunk/package/bin/po4a/lib/Locale/Po4a/Sgml.pm
366366
367367
368368
369
369
370370
371371
372372
......
375375
376376
377377
378
378
379379
380380
381381
......
800800
801801
802802
803
803
804804
805805
806806
# - protect entities from expansion (ie "&release;")
my $origfile="";
my $i=0;
while (defined(@{$self->{TT}{doc_in}}) && $i < @{$self->{TT}{doc_in}}) {
while ($i < @{$self->{TT}{doc_in}}) {
$origfile .= ${$self->{TT}{doc_in}}[$i];
$i+=2;
}
# Detect if we can find the DTD
my ($tmpfh,$tmpfile)=File::Temp::tempfile("po4a-XXXX",
SUFFIX => ".sgml",
DIR => "/tmp",
DIR => $ENV{TMPDIR} || "/tmp",
UNLINK => 0);
print $tmpfh $origfile;
close $tmpfh
my ($tmpfh,$tmpfile)=File::Temp::tempfile("po4a-XXXX",
SUFFIX => ".sgml",
DIR => "/tmp",
DIR => $ENV{TMPDIR} || "/tmp",
UNLINK => 0);
print $tmpfh $origfile;
close $tmpfh or die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close tempfile: %s"), $!);
trunk/package/bin/po4a/NEWS
22
33
44
5
5
66
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
756
57
58
59
60
61
62
63
64
65
66
67
68
869
970
71
72
73
74
75
76
77
78
79
80
1081
1182
1283
......
2394
2495
2596
26
97
2798
2899
29100
=======================================================================
* Major changes in release 0.42 (UNRELEASED)
* Major changes in release 0.45 (2013-08-21)
po4a:
* Fix usage of File::Temp::tempfile to allow using Perl >= 5.18.
Asciidoc:
* Make it a standalone format.
Docbook:
* Make <beginpage> inline.
Ini:
* Add key parameter as an automatic comment. This allows using
po4a-gettextize on ini files.
LaTeX:
* Fix handling of optional parameters in newtheorem command.
Po:
* Fix computation of timezone written into PO files.
Sgml:
* Fix failing tests with recent Docbook DTD.
=======================================================================
* Major changes in release 0.44 (2012-10-21)
translations:
* Start of Portuguese translation
=======================================================================
* Major changes in release 0.43 (2012-10-17)
po4a:
* Add --porefs option to change how file locations are written into
the POT file (and thus into the PO files also).
po4a-updatepo po4a Po:
* Extend the --porefs option, add a new 'counter' value to replace
line number by an increasing counter.
An optional ",nowrap" or ",wrap" specifier can be added to tell
whether file locations are written on a single line or wrapped on
several lines. Default is ",nowrap", it will be changed to ",wrap"
in a future release.
Man:
* Make .UR/.UE macros inline.
* Add macros used in several NetBSD man pages: %I %U Brc Bro Lp Lk
Text:
* Fix two line titles in AsciiDoc format.
* Let AsciiDoc format handle many more styles.
* Add support for automatic comments in AsciiDoc format.
=======================================================================
* Major changes in release 0.42 (2012-05-16)
po4a:
* Allow adding command-line options after config file.
Text:
* Add support for control files.
msguntypot:
* Do not remove obsolete entries from PO files.
documentation translations:
* New German translations
* Updated Spanish translations
* Updated French translations
* Updated Japanese translations
* Updated Polish translations
=======================================================================
* Major changes in release 0.41 (2010-12-01)
* Remove trailing newline in titles from PO files
Packaging:
* Remove Makefile, all processing is performed by Build.PL
* Remove Makefile, all processing is performed by Build.PL
=======================================================================
trunk/package/bin/po4a/README
7171
7272
7373
74
74
7575
7676
7777
This program is free software; you may redistribute it and/or modify it
under the terms of GPL (see COPYING file).
Copyright (C) 2002-2O10 by SPI, inc.
Copyright (C) 2002-2O15 by SPI, inc.
Authors:
Denis Barbier <barbier@linuxfr.org>
Martin Quinson (mquinson#debian.org)
trunk/package/bin/po4a/po4a-gettextize
186186
187187
188188
189
189
190190
191191
192
193
192
193
194194
195
196
197
198
195
196
197
198
199199
200
201
200
201
202202
203
203
204204
205
206
207
208
205
206
207
208
209209
210
211
212
210
211
212
213213
214214
215215
......
219219
220220
221221
222
222
223223
224
224
225225
226226
227227
......
231231
232232
233233
234
234
235235
236236
237237
238
238
239239
240240
241241
242242
243
243
244244
245245
246246
......
254254
255255
256256
257
257
258258
259259
260260
my ($pofile)=('-');
my (@masterfile,@locfile,$help_fmt,$help,$type,@options);
my ($mastchar,$locchar)=('ascii');
my ($mastchar,$locchar);
Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev');
GetOptions(
'help|h' => \$help,
'help-format' => \$help_fmt,
'help|h' => \$help,
'help-format' => \$help_fmt,
'master|m=s' => \@masterfile,
'localized|l=s' => \@locfile,
'po|p=s' => \$pofile,
'format|f=s' => \$type,
'master|m=s' => \@masterfile,
'localized|l=s' => \@locfile,
'po|p=s' => \$pofile,
'format|f=s' => \$type,
'master-charset|M=s' => \$mastchar,
'localized-charset|L=s' => \$locchar,
'master-charset|M=s' => \$mastchar,
'localized-charset|L=s' => \$locchar,
'option|o=s' => \@options,
'option|o=s' => \@options,
'copyright-holder=s' => \$opts{"copyright-holder"},
'msgid-bugs-address=s' => \$opts{"msgid-bugs-address"},
'package-name=s' => \$opts{"package-name"},
'package-version=s' => \$opts{"package-version"},
'copyright-holder=s' => \$opts{"copyright-holder"},
'msgid-bugs-address=s' => \$opts{"msgid-bugs-address"},
'package-name=s' => \$opts{"package-name"},
'package-version=s' => \$opts{"package-version"},
'verbose|v' => \$opts{"verbose"},
'debug|d' => \$opts{"debug"},
'version|V' => \&show_version
'verbose|v' => \$opts{"verbose"},
'debug|d' => \$opts{"debug"},
'version|V' => \&show_version
) or pod2usage();
# Argument check
foreach (@options) {
if (m/^([^=]*)=(.*)$/) {
$opts{$1}="$2";
$opts{$1}="$2";
} else {
$opts{$_}=1;
$opts{$_}=1;
}
}
# Check file existence
# Declare the TransTractor parsers
my ($mastertt,$transtt)=(Locale::Po4a::Chooser::new($type,%opts),
Locale::Po4a::Chooser::new($type,%opts));
Locale::Po4a::Chooser::new($type,%opts));
# Parse master file forcing conversion to utf if it's not in ascii
foreach my $file (@masterfile) {
$mastertt->read($file);
$mastertt->read($file);
}
$mastertt->{TT}{utf_mode} = 1;
if ($mastertt->{TT}{ascii_input}) {
$mastertt->detected_charset('ascii');
} else {
} elsif (defined($mastchar)) {
$mastertt->detected_charset($mastchar);
$mastertt->{TT}{po_in}->set_charset($mastchar);
}
# We have to merge two transtractor files
foreach my $file (@locfile) {
$transtt->read($file);
$transtt->read($file);
}
# We force the conversion to utf if the master document wasn't in ascii
$transtt->{TT}{utf_mode} = !$mastertt->{TT}{ascii_input};
trunk/package/bin/po4a/po4a-translate
115115
116116
117117
118
118
119119
120120
121121
......
177177
178178
179179
180
181
180
181
182182
183
184
185
186
187
183
184
185
186
187
188188
189
190
191
189
190
191
192192
193
193
194194
195
196
197
198
195
196
197
198
199199
200
200
201201
202202
203203
......
218218
219219
220220
221
221
222222
223
223
224224
225225
226226
......
229229
230230
231231
232
233
234
235
232
233
234
235
236236
237237
238238
......
244244
245245
246246
247
247
248248
249249
250250
251251
252252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280280
281281
282
283
284
285
286
282
283
284
285
286
287287
288288
289289
290290
291291
292
To add some extra content to the generated document beside what you
translated (like the name of the translator, or a "About this translation"
section), you should use the B<--addendum> option.
section), you should use the B<--addendum> option.
The first line of the addendum must be a header indicating where to put
it in the document (it can be before or after a given part of the
my ($master_filename,$po_filename);
my ($mastchar,$locchar,$addchar);
GetOptions(
'help|h' => \$help,
'help-format' => \$help_fmt,
'help|h' => \$help,
'help-format' => \$help_fmt,
'master|m=s' => \$master_filename,
'localized|l=s' => \$outfile,
'po|p=s' => \$po_filename,
'addendum|a=s' => \@addfiles,
'format|f=s' => \$format,
'master|m=s' => \$master_filename,
'localized|l=s' => \$outfile,
'po|p=s' => \$po_filename,
'addendum|a=s' => \@addfiles,
'format|f=s' => \$format,
'master-charset|M=s' => \$mastchar,
'localized-charset|L=s' => \$locchar,
'addendum-charset|A=s' => \$addchar,
'master-charset|M=s' => \$mastchar,
'localized-charset|L=s' => \$locchar,
'addendum-charset|A=s' => \$addchar,
'option|o=s' => \@options,
'option|o=s' => \@options,
'width|w=s' => \$width,
'verbose|v' => \@verbose,
'debug|d' => \$debug,
'keep|k=s' => \$threshold,
'width|w=s' => \$width,
'verbose|v' => \@verbose,
'debug|d' => \$debug,
'keep|k=s' => \$threshold,
'version|V' => \&show_version
'version|V' => \&show_version
) or pod2usage();
$help && pod2usage(-verbose => 1, -exitval => 0);
foreach (@options) {
if (m/^([^=]*)=(.*)$/) {
$options{$1}="$2";
$options{$1}="$2";
} else {
$options{$_}=1;
$options{$_}=1;
}
}
# parser
# Prepare the document to be used as translator, but not parser
$doc->process('po_in_name' => \@pos,
'file_in_name' => \@masters,
'file_in_charset' => $mastchar,
'file_out_charset' => $locchar,
'addendum_charset' => $addchar);
'file_in_name' => \@masters,
'file_in_charset' => $mastchar,
'file_out_charset' => $locchar,
'addendum_charset' => $addchar);
my ($percent,$hit,$queries) = $doc->stats();
my $error=0;
if ($percent<$threshold) {
print STDERR wrap_msg(gettext("Discard the translation of %s (only %s%% translated; need %s%%)."),
$master_filename, $percent, $threshold);
$master_filename, $percent, $threshold);
unlink($outfile) if (-e $outfile);
} else {
my %discarded = ();
my @files = ();
while (@addfiles) {
my $add = shift(@addfiles);
my $modifiers;
$add =~ s/^([@!?]+)// and $modifiers = $1;
next if defined($discarded{$add});
if (defined $modifiers) {
if ($modifiers =~ m/!/) {
$discarded{$add} = 1;
next;
}
next if ($modifiers =~ m/\?/ and not -e $add);
if ($modifiers =~ m/@/) {
open LIST,"<","$add" or die wrap_msg(gettext("Can't open %s: %s"), $add, $!);
my @new_list = ();
while(<LIST>) {
chomp;
s/\s+$//;
next if length($_) == 0 or $_ =~ m/^\s*#/;
push(@new_list, $_);
}
close LIST;
unshift(@addfiles, @new_list);
} else {
push @files,$add;
}
} else {
push @files,$add;
}
my $add = shift(@addfiles);
my $modifiers;
$add =~ s/^([@!?]+)// and $modifiers = $1;
next if defined($discarded{$add});
if (defined $modifiers) {
if ($modifiers =~ m/!/) {
$discarded{$add} = 1;
next;
}
next if ($modifiers =~ m/\?/ and not -e $add);
if ($modifiers =~ m/@/) {
open LIST,"<","$add" or die wrap_msg(gettext("Can't open %s: %s"), $add, $!);
my @new_list = ();
while(<LIST>) {
chomp;
s/\s+$//;
next if length($_) == 0 or $_ =~ m/^\s*#/;
push(@new_list, $_);
}
close LIST;
unshift(@addfiles, @new_list);
} else {
push @files,$add;
}
} else {
push @files,$add;
}
}
for my $add (@files) {
unless ($doc->addendum($add)) {
unlink($outfile) if (-e $outfile);
die wrap_msg(gettext("Discard the translation of %s (addendum %s does not apply)."),
$master_filename, $add);
}
unless ($doc->addendum($add)) {
unlink($outfile) if (-e $outfile);
die wrap_msg(gettext("Discard the translation of %s (addendum %s does not apply)."),
$master_filename, $add);
}
}
$doc->write($outfile);
}
1;
trunk/package/Resources/templates/Localizable.strings
295295
296296
297297
298
298
299299
300300
301
301
302302
303303
304
305
304
305
306306
307
308
307
308
309309
310
311
310
311
312312
313
314
313
314
315315
316
317
316
317
318318
319
320
319
320
321321
322322
323323
// ----------------------------------------------------------------------------
"Crs1_title" = "CSR_ALLOW_UNTRUSTED_KEXTS";
"Crs1_title" = "CRS_ALLOW_UNTRUSTED_KEXTS";
"Crs1_description" = "Kext signing: Introduced in 10.9, enhanced in 10.10 (kext signing required for all kexts), now become part of rootless(SIP).";
"Crs2_title" = "CSR_ALLOW_UNRESTRICTED_FS";
"Crs2_title" = "CRS_ALLOW_UNRESTRICTED_FS";
"Crs2_description" = "Filesystem protection: Important system files are protected and cannot be modified.";
"Crs4_title" = "CSR_ALLOW_TASK_FOR_PID";
"Crs4_description" = "Disable CSR_ALLOW_TASK_FOR_PID";
"Crs4_title" = "CRS_ALLOW_TASK_FOR_PID";
"Crs4_description" = "Disable CRS_ALLOW_TASK_FOR_PID";
"Crs8_title" = "CSR_ALLOW_KERNEL_DEBUGGER";
"Crs8_description" = "Disable CSR_ALLOW_KERNEL_DEBUGGER";
"Crs8_title" = "CRS_ALLOW_KERNEL_DEBUGGER";
"Crs8_description" = "Disable CRS_ALLOW_KERNEL_DEBUGGER";
"Crs16_title" = "CSR_ALLOW_APPLE_INTERNAL";
"Crs16_description" = "Disable CSR_ALLOW_APPLE_INTERNAL";
"Crs16_title" = "CRS_ALLOW_APPLE_INTERNAL";
"Crs16_description" = "Disable CRS_ALLOW_APPLE_INTERNAL";
"Crs32_title" = "CSR_ALLOW_UNRESTRICTED_DTRACE";
"Crs32_description" = "Disable CSR_ALLOW_UNRESTRICTED_DTRACE";
"Crs32_title" = "CRS_ALLOW_UNRESTRICTED_DTRACE";
"Crs32_description" = "Disable CRS_ALLOW_UNRESTRICTED_DTRACE";
"Crs64_title" = "CSR_ALLOW_UNRESTRICTED_NVRAM";
"Crs64_description" = "Disable CSR_ALLOW_UNRESTRICTED_NVRAM";
"Crs64_title" = "CRS_ALLOW_UNRESTRICTED_NVRAM";
"Crs64_description" = "Disable CRS_ALLOW_UNRESTRICTED_NVRAM";
"Crs128_title" = "CSR_ALLOW_DEVICE_CONFIGURATION";
"Crs128_description" = "Disable CSR_ALLOW_DEVICE_CONFIGURATION";
"Crs128_title" = "CRS_ALLOW_DEVICE_CONFIGURATION";
"Crs128_description" = "Disable CRS_ALLOW_DEVICE_CONFIGURATION";
// ----------------------------------------------------------------------------
trunk/package/buildpkg.sh
6666
6767
6868
69
69
7070
7171
7272
......
7777
7878
7979
80
81
80
81
82
83
8284
8385
84
86
8587
8688
8789
......
9496
9597
9698
99
100
101
102
97103
98104
99105
......
102108
103109
104110
111
112
105113
106114
107115
......
262270
263271
264272
273
274
265275
266276
267277
......
271281
272282
273283
284
285
274286
275287
288
289
276290
277291
278292
279293
280294
295
296
297
298
281299
282300
283
284
285
286
287301
288
302
289303
290
304
291305
292
306
307
308
309
310
311
312
313
314
293315
294
316
295317
296318
297319
......
330352
331353
332354
355
356
333357
358
359
334360
335361
336362
......
340366
341367
342368
369
370
343371
344372
345373
......
347375
348376
349377
378
379
350380
351381
382
352383
353384
354385
386
387
388
389
355390
356391
357392
358393
359394
360395
361
396
397
398
399
400
401
402
403
404
405
406
362407
363408
364409
......
371416
372417
373418
374
419
375420
376421
377422
......
390435
391436
392437
438
439
393440
394441
395442
......
398445
399446
400447
448
401449
402450
403451
......
564612
565613
566614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
567696
568697
569698
......
11161245
11171246
11181247
1119
1248
11201249
11211250
11221251
......
12031332
12041333
12051334
1335
1336
12061337
12071338
12081339
1340
1341
12091342
12101343
12111344
......
12671400
12681401
12691402
1403
12701404
12711405
12721406
......
12941428
12951429
12961430
1297
1431
12981432
12991433
13001434
......
13521486
13531487
13541488
1489
1490
1491
1492
# stage
CHAMELEON_STAGE=${CHAMELEON_VERSION##*-}
CHAMELEON_STAGE=${CHAMELEON_STAGE/RC/Release Candidate }
CHAMELEON_STAGE=${CHAMELEON_STAGE/FINAL/2.1 Final}
CHAMELEON_STAGE=${CHAMELEON_STAGE/FINAL/2.3 Final}
declare -r CHAMELEON_STAGE
declare -r CHAMELEON_REVISION=$( grep I386BOOT_CHAMELEONREVISION vers.h | awk '{ print $3 }' | tr -d '\"' )
declare -r CHAMELEON_DEVELOP=$(awk "NR==6{print;exit}" ${PKGROOT}/../CREDITS)
declare -r CHAMELEON_CREDITS=$(awk "NR==10{print;exit}" ${PKGROOT}/../CREDITS)
declare -r CHAMELEON_PKGDEV=$(awk "NR==14{print;exit}" ${PKGROOT}/../CREDITS)
declare -r CHAMELEON_CPRYEAR=$(awk "NR==18{print;exit}" ${PKGROOT}/../CREDITS)"-"$( date +"%Y" )
if [[ $(whoami | awk '{print $1}' | cut -d ":" -f3) == "admin" ]];then
declare -r CHAMELEON_CPRYEAR=$(awk "NR==18{print;exit}" ${PKGROOT}/../CREDITS)"-"$( date +"%Y" )
whoami=$(whoami | awk '{print $1}' | cut -d ":" -f3)
if [[ "$whoami" == "admin" ]];then
declare -r CHAMELEON_WHOBUILD="VoodooLabs BuildBot"
else
declare -r CHAMELEON_WHOBUILD=$(whoami | awk '{print $1}' | cut -d ":" -f3)
declare -r CHAMELEON_WHOBUILD="$whoami"
fi
# ====== GLOBAL VARIABLES ======
declare -a pkgrefs
declare -a choice_key
declare -a choice_options
declare -a choice_selected
declare -a choice_force_selected
declare -a choice_title
declare -a choive_description
declare -a choice_pkgrefs
declare -a choice_parent_group_index
declare -a choice_group_items
# Init Main Group
choice_key[0]=""
choice_options[0]=""
choice_title[0]=""
choice_description[0]=""
choices_pkgrefs[0]=""
choice_group_items[0]=""
choice_group_exclusive[0]=""
# Add a new choice
addChoice () {
# Optional arguments:
# --title=<title> : Force the title
# --description=<description> : Force the description
# --group=<group> : Group Choice Id
# --start-selected=<javascript code> : Specifies whether this choice is initially selected or unselected
# --start-enabled=<javascript code> : Specifies the initial enabled state of this choice
# $1 Choice Id
local option
local title=""
local description=""
local groupChoice=""
local choiceOptions=""
local choiceSelected=""
local choiceForceSelected=""
local pkgrefs=""
# Check the arguments.
for option in "${@}";do
case "$option" in
--title=*)
shift; title="${option#*=}" ;;
--description=*)
shift; description="${option#*=}" ;;
--group=*)
shift; groupChoice=${option#*=} ;;
--selected=*)
shift; choiceOptions="$choiceOptions selected=\"${option#*=}\"" ;;
--enabled=*)
shift; choiceOptions="$choiceOptions enabled=\"${option#*=}\"" ;;
--start-selected=*)
shift; choiceOptions="$choiceOptions start_selected=\"${option#*=}\"" ;;
shift; choiceOptions="$choiceOptions start_selected=\"${option#*=}\"" ;;
--start-enabled=*)
shift; choiceOptions="$choiceOptions start_enabled=\"${option#*=}\"" ;;
shift; choiceOptions="$choiceOptions start_enabled=\"${option#*=}\"" ;;
--start-visible=*)
shift; choiceOptions="$choiceOptions start_visible=\"${option#*=}\"" ;;
shift; choiceOptions="$choiceOptions start_visible=\"${option#*=}\"" ;;
--enabled=*)
shift; choiceOptions="$choiceOptions enabled=\"${option#*=}\"" ;;
--selected=*)
shift; choiceSelected="${option#*=}" ;;
--force-selected=*)
shift; choiceForceSelected="${option#*=}" ;;
--visible=*)
shift; choiceOptions="$choiceOptions visible=\"${option#*=}\"" ;;
--pkg-refs=*)
shift; pkgrefs=${option#*=} ;;
shift; pkgrefs=${option#*=} ;;
-*)
echo "Unrecognized addChoice option '$option'" >&2
exit 1
# Record new node
choice_key[$idx]="$choiceId"
choice_title[$idx]="${title:-${choiceId}_title}"
choice_description[$idx]="${description:-${choiceId}_description}"
choice_options[$idx]=$(trim "${choiceOptions}") # Removing leading and trailing whitespace(s)
choice_selected[$idx]=$(trim "${choiceSelected}") # Removing leading and trailing whitespace(s)
choice_force_selected[$idx]=$(trim "${choiceForceSelected}") # Removing leading and trailing whitespace(s)
choice_parent_group_index[$idx]=$idx_group
choice_pkgrefs[$idx]="$pkgrefs"
# Add a group choice
addGroupChoices() {
# Optional arguments:
# --title=<title> : Force the title
# --description=<description> : Force the description
# --parent=<parent> : parent group choice id
# --exclusive_zero_or_one_choice : only zero or one choice can be selected in the group
# --exclusive_one_choice : only one choice can be selected in the group
# $1 Choice Id
local option
local title=""
local description=""
local groupChoice=""
local exclusive_function=""
local choiceOptions=
for option in "${@}";do
case "$option" in
--title=*)
shift; title="${option#*=}" ;;
--description=*)
shift; description="${option#*=}" ;;
--exclusive_zero_or_one_choice)
shift; exclusive_function="exclusive_zero_or_one_choice" ;;
--exclusive_one_choice)
shift; exclusive_function="exclusive_one_choice" ;;
--parent=*)
shift; groupChoice=${option#*=} ;;
-*)
--start-selected=*)
shift; choiceOptions+=("--start-selected=${option#*=}") ;;
--start-enabled=*)
shift; choiceOptions+=("--start-enabled=${option#*=}") ;;
--start-visible=*)
shift; choiceOptions+=("--start-visible=${option#*=}") ;;
--enabled=*)
shift; choiceOptions+=("--enabled=${option#*=}") ;;
--selected=*)
shift; choiceOptions+=("--selected=${option#*=}") ;;
-*)
echo "Unrecognized addGroupChoices option '$option'" >&2
exit 1
;;
exit 1
fi
addChoice --group="$groupChoice" "${1}"
addChoice --group="$groupChoice" --title="$title" --description="$description" ${choiceOptions[*]} "${1}"
local idx=$? # index of the new created choice
choice_group_exclusive[$idx]="$exclusive_function"
done
if [[ -n "$result" ]];then
echo "!(${result%$separator})"
else
echo "choices['$myChoice'].selected"
fi
}
# $2..$n Others choice(s) (ie: "test2" "test3"). Current can or can't be in the others choices
local myChoice="${1}"
local result;
local exclusive_one_choice_code="$(exclusive_one_choice ${@})"
echo "(my.choice.selected &amp;&amp; $(exclusive_one_choice ${@}))"
}
# End build Chameleon package
# build Patches packages
addGroupChoices "Patches"
# ------------------------------------------------------
# parse Patches folder to find files of patches options.
# ------------------------------------------------------
KernelSettingsFolder="${PKGROOT}/Patches"
while IFS= read -r -d '' OptionsFile; do
# Take filename and strip .txt from end and path from front
builtKPsList=${OptionsFile%.txt}
builtKPsList=${builtKPsList##*/}
packagesidentity="${chameleon_package_identity}.kernel.$builtKPsList"
echo "================= $builtKPsList ================="
# ------------------------------------------------------
# Read kernel patcher option file into an array.
# ------------------------------------------------------
availableOptions=() # array to hold the list of patches options, per 'section'.
exclusiveFlag="" # used to indicate list has exclusive options
while read textLine; do
# ignore lines in the file beginning with a #
[[ $textLine = \#* ]] && continue
local optionName="" key="" value=""
case "$textLine" in
Exclusive=[Tt][Rr][Uu][Ee]) exclusiveFlag="--exclusive_zero_or_one_choice" ;;
Exclusive=*) continue ;;
*@*:*=*)
availableOptions[${#availableOptions[*]}]="$textLine" ;;
*) echo "Error: invalid line '$textLine' in file '$OptionsFile'" >&2
exit 1
;;
esac
done < "$OptionsFile"
addGroupChoices --parent="Patches" $exclusiveFlag "${builtKPsList}"
# ------------------------------------------------------
# Loop through options in array and process each in turn
# ------------------------------------------------------
for textLine in "${availableOptions[@]}"; do
# split line - taking all before ':' as option name
# and all after ':' as key/value
type=$( echo "${textLine%%@*}" | tr '[:upper:]' '[:lower:]' )
tmp=${textLine#*@}
optionName=${tmp%%:*}
keyValue=${tmp##*:}
key=${keyValue%%=*}
value=${keyValue#*=}
# create folders required for each boot option
mkdir -p "${PKG_BUILD_DIR}/$optionName/Root/"
case "$type" in
bool) startSelected="check_kernel_bool_option('$key','$value')" ;;
text) startSelected="check_kernel_text_option('$key','$value')" ;;
list) startSelected="check_kernel_list_option('$key','$value')" ;;
*) echo "Error: invalid type '$type' in line '$textLine' in '$OptionsFile'" >&2
exit 1
;;
esac
recordChameleonOption "$type" "$key" "$value"
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/$optionName" \
--subst="optionType=$type" \
--subst="optionKey=$key" \
--subst="optionValue=$value" \
AddKernelOption
packageRefId=$(getPackageRefId "${packagesidentity}" "${optionName}")
buildpackage "$packageRefId" "${optionName}" "${PKG_BUILD_DIR}/${optionName}" "/"
addChoice --group="${builtKPsList}" \
--start-selected="$startSelected" \
--pkg-refs="$packageRefId" "${optionName}"
done
done < <( find "${KernelSettingsFolder}" -depth 1 -type f -name '*.txt' -print0 )
# End build Patches packages
if [[ "${CONFIG_MODULES}" == 'y' ]];then
# build Modules package
echo "================= Modules ================="
echo -e "\t[BUILD] ${packageName}"
find "${packagePath}" -name '.DS_Store' -delete
find "${packagePath}" \( -name '.DS_Store' -o -name '.svn' \) -print0 | xargs -0 rm -rf
local filecount=$( find "${packagePath}/Root" | wc -l )
if [ "${packageSize}" ]; then
local installedsize="${packageSize}"
for (( idx=1; idx < ${#choice_key[*]} ; idx++)); do
local choiceId=${choice_key[$idx]}
local choiceTitle=${choice_title[$idx]}
local choiceDescription=${choice_description[$idx]}
local choiceOptions=${choice_options[$idx]}
local choiceParentGroupIndex=${choice_parent_group_index[$idx]}
set +u; local group_exclusive=${choice_group_exclusive[$choiceParentGroupIndex]}; set -u
local selected_option="${choice_selected[$idx]}"
local exclusive_option=""
# Create the node and standard attributes
local choiceNode="\t<choice\n\t\tid=\"${choiceId}\"\n\t\ttitle=\"${choiceId}_title\"\n\t\tdescription=\"${choiceId}_description\""
# Create the Distribution file
ditto --noextattr --noqtn "${PKGROOT}/Distribution" "${PKG_BUILD_DIR}/${packagename}/Distribution"
makeSubstitutions "${PKG_BUILD_DIR}/${packagename}/Distribution"
local start_indent_level=2
echo -e "\n\t<choices-outline>" >> "${PKG_BUILD_DIR}/${packagename}/Distribution"
bin/po4a/po4a \
--package-name 'Chameleon' \
--package-version "${CHAMELEON_VERSION}-r${CHAMELEON_REVISION}" \
--msgmerge-opt '--lang=$lang' \
--msgmerge-opt '--lang=$lang --previous --width=79' \
--variable PODIR="po" \
--variable TEMPLATES_DIR="Resources/templates" \
--variable OUTPUT_DIR="${PKG_BUILD_DIR}/${packagename}/Resources" \
# build meta package
makedistribution
# Remove package stuff
rm -rf "${SYMROOT}/package"
# End
trunk/package/po/ar.po
77
88
99
10
10
1111
1212
1313
......
12431243
12441244
12451245
1246
1246
12471247
12481248
12491249
......
12551255
12561256
12571257
1258
1258
12591259
12601260
12611261
......
12671267
12681268
12691269
1270
1270
12711271
12721272
12731273
12741274
12751275
1276
1276
12771277
12781278
12791279
12801280
12811281
1282
1282
12831283
12841284
12851285
12861286
12871287
1288
1288
12891289
12901290
12911291
12921292
12931293
1294
1294
12951295
12961296
12971297
12981298
12991299
1300
1300
13011301
13021302
13031303
13041304
13051305
1306
1306
13071307
13081308
13091309
13101310
13111311
1312
1312
13131313
13141314
13151315
13161316
13171317
1318
1318
13191319
13201320
13211321
13221322
13231323
1324
1324
13251325
13261326
13271327
13281328
13291329
1330
1330
13311331
13321332
13331333
13341334
13351335
1336
1336
13371337
13381338
13391339
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-02-13 19:44-0000\n"
"Last-Translator: magnifico <cparisi2@gmail.com>\n"
"Language-Team: ar <ar@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/en.po
1717
1818
1919
20
20
2121
2222
2323
......
12731273
12741274
12751275
1276
1277
1276
1277
12781278
12791279
12801280
......
12851285
12861286
12871287
1288
1289
1288
1289
12901290
12911291
12921292
......
12971297
12981298
12991299
1300
1301
1300
1301
13021302
13031303
13041304
13051305
1306
1307
1306
1307
13081308
13091309
13101310
13111311
1312
1313
1312
1313
13141314
13151315
13161316
13171317
1318
1319
1318
1319
13201320
13211321
13221322
13231323
1324
1325
1324
1325
13261326
13271327
13281328
13291329
1330
1331
1330
1331
13321332
13331333
13341334
13351335
1336
1337
1336
1337
13381338
13391339
13401340
13411341
1342
1343
1342
1343
13441344
13451345
13461346
13471347
1348
1349
1348
1349
13501350
13511351
13521352
13531353
1354
1355
1354
1355
13561356
13571357
13581358
13591359
1360
1361
1360
1361
13621362
13631363
13641364
13651365
1366
1367
1366
1367
13681368
13691369
13701370
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.5.0-rc1\n"
"X-POOTLE-MTIME: 1443126331.0\n"
"X-POOTLE-MTIME: 1388319263.0\n"
#. type: Content of: <html><body><div><p>
#: Resources/templates/Welcome.html:22
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgstr "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr "CRS_ALLOW_UNTRUSTED_KEXTS"
#. type: "Crs1_description"
#: Resources/templates/Localizable.strings:299
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgstr "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr "CRS_ALLOW_UNRESTRICTED_FS"
#. type: "Crs2_description"
#: Resources/templates/Localizable.strings:302
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgstr "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr "CRS_ALLOW_TASK_FOR_PID"
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgstr "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr "Disable CRS_ALLOW_TASK_FOR_PID"
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgstr "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr "CRS_ALLOW_KERNEL_DEBUGGER"
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgstr "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr "Disable CRS_ALLOW_KERNEL_DEBUGGER"
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgstr "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr "CRS_ALLOW_APPLE_INTERNAL"
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgstr "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr "Disable CRS_ALLOW_APPLE_INTERNAL"
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgstr "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr "CRS_ALLOW_UNRESTRICTED_DTRACE"
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgstr "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgstr "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr "CRS_ALLOW_UNRESTRICTED_NVRAM"
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgstr "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgstr "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr "CRS_ALLOW_DEVICE_CONFIGURATION"
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgstr "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
#. type: "HDAULayoutIDx01_title"
#: Resources/templates/Localizable.strings:324
trunk/package/po/bs.po
77
88
99
10
10
1111
1212
1313
......
12511251
12521252
12531253
1254
1254
12551255
12561256
12571257
......
12631263
12641264
12651265
1266
1266
12671267
12681268
12691269
......
12751275
12761276
12771277
1278
1278
12791279
12801280
12811281
12821282
12831283
1284
1284
12851285
12861286
12871287
12881288
12891289
1290
1290
12911291
12921292
12931293
12941294
12951295
1296
1296
12971297
12981298
12991299
13001300
13011301
1302
1302
13031303
13041304
13051305
13061306
13071307
1308
1308
13091309
13101310
13111311
13121312
13131313
1314
1314
13151315
13161316
13171317
13181318
13191319
1320
1320
13211321
13221322
13231323
13241324
13251325
1326
1326
13271327
13281328
13291329
13301330
13311331
1332
1332
13331333
13341334
13351335
13361336
13371337
1338
1338
13391339
13401340
13411341
13421342
13431343
1344
1344
13451345
13461346
13471347
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-02-13 18:17-0000\n"
"Last-Translator: ErmaC\n"
"Language-Team: bs <bs@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/cs.po
66
77
88
9
9
1010
1111
1212
......
12621262
12631263
12641264
1265
1265
12661266
12671267
12681268
......
12741274
12751275
12761276
1277
1277
12781278
12791279
12801280
......
12861286
12871287
12881288
1289
1289
12901290
12911291
12921292
12931293
12941294
1295
1295
12961296
12971297
12981298
12991299
13001300
1301
1301
13021302
13031303
13041304
13051305
13061306
1307
1307
13081308
13091309
13101310
13111311
13121312
1313
1313
13141314
13151315
13161316
13171317
13181318
1319
1319
13201320
13211321
13221322
13231323
13241324
1325
1325
13261326
13271327
13281328
13291329
13301330
1331
1331
13321332
13331333
13341334
13351335
13361336
1337
1337
13381338
13391339
13401340
13411341
13421342
1343
1343
13441344
13451345
13461346
13471347
13481348
1349
1349
13501350
13511351
13521352
13531353
13541354
1355
1355
13561356
13571357
13581358
msgid ""
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-02-13 18:19-0000\n"
"Last-Translator: ErmaC <ErmaC@insanelymac.com>\n"
"Language-Team: cs <cs@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/mk.po
77
88
99
10
10
1111
1212
1313
......
12491249
12501250
12511251
1252
1252
12531253
12541254
12551255
......
12611261
12621262
12631263
1264
1264
12651265
12661266
12671267
......
12731273
12741274
12751275
1276
1276
12771277
12781278
12791279
12801280
12811281
1282
1282
12831283
12841284
12851285
12861286
12871287
1288
1288
12891289
12901290
12911291
12921292
12931293
1294
1294
12951295
12961296
12971297
12981298
12991299
1300
1300
13011301
13021302
13031303
13041304
13051305
1306
1306
13071307
13081308
13091309
13101310
13111311
1312
1312
13131313
13141314
13151315
13161316
13171317
1318
1318
13191319
13201320
13211321
13221322
13231323
1324
1324
13251325
13261326
13271327
13281328
13291329
1330
1330
13311331
13321332
13331333
13341334
13351335
1336
1336
13371337
13381338
13391339
13401340
13411341
1342
1342
13431343
13441344
13451345
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-02-13 18:32-0000\n"
"Last-Translator: ErmaC\n"
"Language-Team: mk <mk@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/es.po
77
88
99
10
10
1111
1212
1313
......
12861286
12871287
12881288
1289
1289
12901290
12911291
12921292
......
12981298
12991299
13001300
1301
1301
13021302
13031303
13041304
......
13101310
13111311
13121312
1313
1313
13141314
13151315
13161316
13171317
13181318
1319
1319
13201320
13211321
13221322
13231323
13241324
1325
1325
13261326
13271327
13281328
13291329
13301330
1331
1331
13321332
13331333
13341334
13351335
13361336
1337
1337
13381338
13391339
13401340
13411341
13421342
1343
1343
13441344
13451345
13461346
13471347
13481348
1349
1349
13501350
13511351
13521352
13531353
13541354
1355
1355
13561356
13571357
13581358
13591359
13601360
1361
1361
13621362
13631363
13641364
13651365
13661366
1367
1367
13681368
13691369
13701370
13711371
13721372
1373
1373
13741374
13751375
13761376
13771377
13781378
1379
1379
13801380
13811381
13821382
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-08-12 13:38+0000\n"
"Last-Translator: FurtiF <msntchat@hotmail.fr>\n"
"Language-Team: es <es@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/fr.po
77
88
99
10
10
1111
1212
1313
......
12901290
12911291
12921292
1293
1293
12941294
12951295
12961296
......
13021302
13031303
13041304
1305
1305
13061306
13071307
13081308
......
13141314
13151315
13161316
1317
1317
13181318
13191319
13201320
13211321
13221322
1323
1323
13241324
13251325
13261326
13271327
13281328
1329
1329
13301330
13311331
13321332
13331333
13341334
1335
1335
13361336
13371337
13381338
13391339
13401340
1341
1341
13421342
13431343
13441344
13451345
13461346
1347
1347
13481348
13491349
13501350
13511351
13521352
1353
1353
13541354
13551355
13561356
13571357
13581358
1359
1359
13601360
13611361
13621362
13631363
13641364
1365
1365
13661366
13671367
13681368
13691369
13701370
1371
1371
13721372
13731373
13741374
13751375
13761376
1377
1377
13781378
13791379
13801380
13811381
13821382
1383
1383
13841384
13851385
13861386
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-08-12 13:33+0000\n"
"Last-Translator: FurtiF <msntchat@hotmail.fr>\n"
"Language-Team: fr <fr@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/nl.po
77
88
99
10
10
1111
1212
1313
......
12811281
12821282
12831283
1284
1284
12851285
12861286
12871287
......
12931293
12941294
12951295
1296
1296
12971297
12981298
12991299
......
13051305
13061306
13071307
1308
1308
13091309
13101310
13111311
13121312
13131313
1314
1314
13151315
13161316
13171317
13181318
13191319
1320
1320
13211321
13221322
13231323
13241324
13251325
1326
1326
13271327
13281328
13291329
13301330
13311331
1332
1332
13331333
13341334
13351335
13361336
13371337
1338
1338
13391339
13401340
13411341
13421342
13431343
1344
1344
13451345
13461346
13471347
13481348
13491349
1350
1350
13511351
13521352
13531353
13541354
13551355
1356
1356
13571357
13581358
13591359
13601360
13611361
1362
1362
13631363
13641364
13651365
13661366
13671367
1368
1368
13691369
13701370
13711371
13721372
13731373
1374
1374
13751375
13761376
13771377
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-02-13 18:32-0000\n"
"Last-Translator: beta992 <beta992@gmail.com>\n"
"Language-Team: nl <nl@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs16_description"
#: Resources/templates/Localizable.strings:311
#, no-wrap
msgid "Disable CSR_ALLOW_APPLE_INTERNAL"
msgid "Disable CRS_ALLOW_APPLE_INTERNAL"
msgstr ""
#. type: "Crs32_title"
#: Resources/templates/Localizable.strings:313
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs32_description"
#: Resources/templates/Localizable.strings:314
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_DTRACE"
msgid "Disable CRS_ALLOW_UNRESTRICTED_DTRACE"
msgstr ""
#. type: "Crs64_title"
#: Resources/templates/Localizable.strings:316
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs64_description"
#: Resources/templates/Localizable.strings:317
#, no-wrap
msgid "Disable CSR_ALLOW_UNRESTRICTED_NVRAM"
msgid "Disable CRS_ALLOW_UNRESTRICTED_NVRAM"
msgstr ""
#. type: "Crs128_title"
#: Resources/templates/Localizable.strings:319
#, no-wrap
msgid "CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "Crs128_description"
#: Resources/templates/Localizable.strings:320
#, no-wrap
msgid "Disable CSR_ALLOW_DEVICE_CONFIGURATION"
msgid "Disable CRS_ALLOW_DEVICE_CONFIGURATION"
msgstr ""
#. type: "HDAULayoutIDx01_title"
trunk/package/po/ko.po
66
77
88
9
9
1010
1111
1212
......
12651265
12661266
12671267
1268
1268
12691269
12701270
12711271
......
12771277
12781278
12791279
1280
1280
12811281
12821282
12831283
......
12891289
12901290
12911291
1292
1292
12931293
12941294
12951295
12961296
12971297
1298
1298
12991299
13001300
13011301
13021302
13031303
1304
1304
13051305
13061306
13071307
13081308
13091309
1310
1310
13111311
13121312
13131313
13141314
13151315
1316
1316
13171317
13181318
13191319
13201320
13211321
1322
1322
13231323
13241324
13251325
13261326
13271327
1328
1328
13291329
13301330
13311331
13321332
13331333
1334
1334
13351335
13361336
13371337
13381338
13391339
1340
1340
13411341
13421342
13431343
13441344
13451345
1346
1346
13471347
13481348
13491349
13501350
13511351
1352
1352
13531353
13541354
13551355
13561356
13571357
1358
1358
13591359
13601360
13611361
msgstr ""
"Project-Id-Version: Chameleon 2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-12 19:02+0200\n"
"POT-Creation-Date: 2015-11-02 15:03+0000\n"
"PO-Revision-Date: 2015-02-13 18:31-0000\n"
"Last-Translator: Mill <ceruns@ymail.com>\n"
"Language-Team: ko <ko@li.org>\n"
#. type: "Crs1_title"
#: Resources/templates/Localizable.strings:298
#, no-wrap
msgid "CSR_ALLOW_UNTRUSTED_KEXTS"
msgid "CRS_ALLOW_UNTRUSTED_KEXTS"
msgstr ""
#. type: "Crs1_description"
#. type: "Crs2_title"
#: Resources/templates/Localizable.strings:301
#, no-wrap
msgid "CSR_ALLOW_UNRESTRICTED_FS"
msgid "CRS_ALLOW_UNRESTRICTED_FS"
msgstr ""
#. type: "Crs2_description"
#. type: "Crs4_title"
#: Resources/templates/Localizable.strings:304
#, no-wrap
msgid "CSR_ALLOW_TASK_FOR_PID"
msgid "CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs4_description"
#: Resources/templates/Localizable.strings:305
#, no-wrap
msgid "Disable CSR_ALLOW_TASK_FOR_PID"
msgid "Disable CRS_ALLOW_TASK_FOR_PID"
msgstr ""
#. type: "Crs8_title"
#: Resources/templates/Localizable.strings:307
#, no-wrap
msgid "CSR_ALLOW_KERNEL_DEBUGGER"
msgid "CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs8_description"
#: Resources/templates/Localizable.strings:308
#, no-wrap
msgid "Disable CSR_ALLOW_KERNEL_DEBUGGER"
msgid "Disable CRS_ALLOW_KERNEL_DEBUGGER"
msgstr ""
#. type: "Crs16_title"
#: Resources/templates/Localizable.strings:310
#, no-wrap
msgid "CSR_ALLOW_APPLE_INTERNAL"
msgid "CRS_ALLOW_APPLE_INTERNAL"
msgstr ""