#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# mkmsg.pl -- generate message file content for strings that
# originate in audit_record_attr and audit_event
#
# mkmsg.pl domain po_file_name
require 5.005;
use strict;
use vars qw(
use locale;
unless ($#ARGV == 1) {
print STDERR "usage: $0 domain_name file_name\n";
exit (1);
}
# Set message locale
my %options;
my $label;
my $errString;
$eventDescription =~ s/\(\w+\)//;
}
}
# in auditrecord.pl, _either_ $description _or_ $eventDescription
# is used. Both are put into the message file so that this script
# doesn't have logic dependent on auditrecord.pl
my $case;
# [1] # token id (a name list)
my $comment;
}
} else {
addToMsgFile($note);
}
}
}
exit (0);
sub addToMsgFile {
my @text = @_;
my $text;
next if ($text =~ /^$/);
}
}
# ids in the .po file must be quoted; since the messages themselves
# contain quotes, quotes must be escaped
sub writeMsgFile {
my $domain = shift;
my $file = shift;
my $text;
open(Message, ">$file") or
die "Failed to open $file: $!\n";
print Message "# File:audit_record_attr: textdomain(\"$domain\")\n";
foreach $text (sort keys %translateText) {
$text =~ s/"/\\"/g;
print Message "msgid \"$text\"\nmsgstr\n";
}
close Message;
}