--- /dev/null
+#!usr/bin/perl -w
+use strict;
+
+system 'clear';
+
+# determine mapped ChEBI molecules listed in arabidopsis but not in rice,
+# and vice-versa
+
+my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/ara_rice_exclusive_sets/";
+my @rice;
+my @ara;
+
+open(IN_FILE, $dir . "Rice_ReferenceNameToChEBIId.txt") or die;
+while (<IN_FILE>) {
+ my $line = $_;
+ chomp $line;
+ push(@rice,$line);
+}
+close IN_FILE;
+
+open(IN_FILE, $dir . "Ara_ReferenceNameToChEBIId.txt") or die;
+while (<IN_FILE>) {
+ my $line = $_;
+ chomp $line;
+ push(@ara,$line);
+}
+close IN_FILE;
+
+my %ara_seen; # lookup tbl
+my @rice_only; #exclusive to rice
+
+# build lookup tbl
+@ara_seen{@ara} = ();
+
+foreach my $item (@rice) {
+ push(@rice_only, $item) unless exists $ara_seen{$item};
+}
+
+my %rice_seen; # lookup tbl
+my @ara_only; #exclusive to rice
+
+# build lookup tbl
+@rice_seen{@rice} = ();
+
+foreach my $item (@ara) {
+ push(@ara_only, $item) unless exists $rice_seen{$item};
+}
+
+my $exc_rice_count = 0;
+print "-- [EXCLUSIVE RICE MOLECULES] --\n";
+foreach my $item (@rice_only) {
+ $exc_rice_count++;
+ print "$exc_rice_count: $item\n";
+}
+
+#print "$exc_rice_count\n\n";
+
+my $exc_ara_count = 0;
+print "-- [EXCLUSIVE ARABIDOPSIS MOLECULES] --\n";
+foreach my $item (@ara_only) {
+ $exc_ara_count++;
+ print "$exc_ara_count: $item\n";
+}
+
+print "$exc_ara_count\n\n";
+
+# clean up
+exit;
--- /dev/null
+#!usr/bin/perl -w
+use strict;
+
+system 'clear';
+
+# temp script used to fix <bp:AUTHORS> elements that mistakenly refer to years in
+# parentheses. replaces those elements with <bp:YEAR>.
+
+my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/aracyc_data/";
+
+open(in_file, $dir . "aracyc_v8_0_biopax-level2_STOIdouble.owl");
+open(out_file, ">>" . $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR.owl");
+
+my $i = 0; # limiter for testing
+
+while (<in_file>)
+{
+ $i++;
+
+ # read the next line of the file
+ my $line = $_;
+ chomp $line;
+
+ # is it a bad author?
+ if ($line =~ /<bp:AUTHORS rdf:datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">\(/)
+ {
+ print "$i: $line\n";
+ # change the line to a well-formatted year tag
+ $line =~ s/AUTHORS/YEAR/g;
+ $line =~ s/\(//;
+ $line =~ s/\)//;
+ $line =~ s/string/int/;
+ print "$i: $line\n";
+ }
+ print out_file "$line\n";
+
+ #last if $i > 1000; # let's test w/ low numbers for now
+}
+
+close in_file;
+close out_file;
+
+# clean up
+exit;
--- /dev/null
+#!usr/bin/perl -w
+use strict;
+
+system 'clear';
+
+# temp script used to fix <bp:STEP-INTERACTION> elements that mistakenly refer to years in
+# parentheses. replaces those elements with <bp:YEAR>.
+# Example:
+# BEFORE: <bp:STEP-INTERACTIONS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">catalysis42055</bp:STEP-INTERACTIONS>
+# AFTER: <bp:STEP-INTERACTIONS rdf:resource="#catalysis42055"/>
+
+my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/aracyc_data/";
+
+open(in_file, $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR.owl");
+open(out_file, ">>" . $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR_STEPINT.owl");
+
+my $i = 0; # limiter for testing
+
+while (<in_file>)
+{
+ $i++;
+
+ # read the next line of the file
+ my $line = $_;
+ chomp $line;
+
+ # is it a bad step interaction?
+ if ($line =~ /<bp:STEP-INTERACTIONS rdf:datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">/)
+ {
+ print "$i: $line\n";
+ # change the line to a well-formatted STEP-INTERACTION tag
+ $line =~ s/datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">/resource="\#/g;
+ $line =~ s/<\/bp:STEP-INTERACTIONS>/"\/>/;
+ print "$i: $line\n";
+ }
+ print out_file "$line\n";
+
+ #last if $i > 1000; # let's test w/ low numbers for now
+}
+
+close in_file;
+close out_file;
+
+# clean up
+exit;
--- /dev/null
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+Pathway Gene Swapper
+
+=head1 VERSION
+
+0.2
+
+=head1 DESCRIPTION
+
+Swap out one set of genes (or gene representations) for another in an
+existing PathVisio GPML file. Optionally removes literature references.
+
+If multiple replacement genes map to a single original gene,
+multiple PathVisio boxes will be drawn in place of the
+original.
+
+If a group associating multiple gene boxes already existed,
+that group will extend to any replacement genes. If no group
+existed previously, and multiple replacement gene boxes are required,
+a new group will be created.
+
+If an original gene had multiple instances (homologs) displayed on the pathway
+diagram, each instance will be subjected to the replacement process. There
+is a "heat-map" option avaliable to help highlight homolog sets.
+
+There is also an option to read in an extra column of gene symbols, if the
+user wishes to provide their own. Otherwise, the application will
+continue to use the label prefix and auto-numbering suffix settings.
+
+The replacement gene symbols can be prefixed to separate them from the
+original, and an ordinal suffix ('-#') will be added to a group of
+replacement genes.
+
+Any new gene boxes may be painted with a custom color and border, and
+will be stacked and offset for ease of visualization (much like a deck
+of cards).
+
+=head1 FUTURE CHANGES
+
+Add a legend for the heat map (upper right-hand corner).
+
+Add a comment containing the NCBI species id of the new homolog (for
+the purpose of multi-species pathway comparison or host-pathogen
+interaction diagrams).
+
+=head1 USAGE
+
+pathway_gene_swapper.pl -i INPUT_FILE -g GENE_MAPPING_FILE -c CONFIG_FILE -o OUTPUT_FILE [-shLvGd]
+
+=head1 OPTIONS
+
+ -i Name of input GPML file.
+ -g CSV file containing the genes to swap
+ -c config file containing color, label, and placement preferences
+ -o Name of output GPML file.
+ (NOTE: if no path supplied for input files,
+ current working directory is assumed)
+ -s use provided gene symbols instead of config file's LabelPrefix
+ -h apply a heat-map to any multi-mapped set of homologs
+ (NOTE: precludes custom box-coloring for homologs)
+ -L Remove literature references.
+ -v View verbose information
+ -G Display GPML input/output documents
+ -d View debugging information
+
+=head1 DEPENDENCIES and PREREQUISITES
+
+ - Non-standard Perl modules: Switch, Data::Dumper, XML::DOM
+ - The input file must be a valid GPML file
+ - The CSV file must have a single-line column header.
+
+ The first column must have one and only one gene -- the
+ "original" gene.
+
+ The second column may have one and only one gene variant or
+ homolog -- the "replacement" gene(s).
+
+ An optional "gene symbol" column may be placed between the
+ first two columns, if the user would prefer to use a list of
+ symbols for the new homologous genes.
+
+ - The config file may have any or all of the following entries,
+ in addition to the required fields (in any order):
+
+ Source= (required)
+ Database= (required)
+ Version= (required)
+ Title=
+ Author=
+ Maintainer=
+ Organism=
+ CommentPrefix= (will precede back-reference to prior source,
+ default: "Previously labeled as: ")
+ LabelPrefix= (precedes current gene label)
+ BoxBorder= (RRGGBB hex, default: black)
+ BoxColor= (RRGGBB hex, default: white)
+ BoxWidth= (integer, in px, default: 60)
+ X-Offset= (integer, in px, default: 5px)
+ Y-Offset= (integer, in px, default: 4px)
+
+=head1 AUTHORS
+
+Justin Preece and Mamatha Hanumappa
+ Faculty Research Assistants
+ Jaiswal Lab, Botany & Plant Pathology
+ Oregon State University
+ L<mailto:preecej@science.oregonstate.edu>
+ L<mailto:hanumapm@science.oregonstate.edu>
+
+=cut
+
+# ---------------------------------------------------------------------------
+# modules
+# ---------------------------------------------------------------------------
+
+# general
+use strict;
+use Cwd;
+use Switch;
+use Getopt::Std;
+use Data::Dumper;
+
+# specific
+use Graphics::ColorUtils qw( :gradients );
+use XML::DOM;
+
+# ---------------------------------------------------------------------------
+# declarations
+# ---------------------------------------------------------------------------
+
+# command-line options
+my %opts; # arg options
+my $input_gpml_file;
+my $input_gene_file;
+my $input_config_file;
+my $output_file;
+my $apply_homolog_heat = 0;
+my $remove_lit = 0; # flag to remove literature and lit references
+my $use_symbols = 0; # flag to indicate use of provided gene symbols
+my $verbose = 0; # flag for verbose output
+my $doc_mode = 0; # flag for extra GPML doc output
+my $debug = 0; # debugging switch
+
+# global data containers
+my %configs; # configuration settings
+my %swap_genes; # original and swapped genes
+my $gpml_doc; # imported GPML data for manipulation and output
+my %unmapped_genes; # original genes not mapped to homologs
+my %gradient; # blue-red gradient used for opt. heat map box-coloring
+my $max_homolog_count = 0; # count for heat map calibration
+
+$Data::Dumper::Pad = "... ";
+
+# ---------------------------------------------------------------------------
+=head1 FUNCTIONS
+
+=over
+
+=cut
+# ---------------------------------------------------------------------------
+
+
+# ---------------------------------------------------------------------------
+=item B<hash config($file_path)>
+Accepts a config file path.
+Reads a configuration file and sets config values.
+Returns a hash with config values set.
+=cut
+# ---------------------------------------------------------------------------
+sub config($)
+{
+
+ print "Opening configuration file and reading data...\n\n";
+ my %local_config_hash;
+
+ open(CONFIG_FILE, $_[0]) or die("Could not open $_[0]");
+
+ while (<CONFIG_FILE>)
+ {
+ my $line = $_;
+ chomp $line;
+ my @line_ary = split('=',$line);
+ my $data_field = $line_ary[0];
+ my $data_val = $line_ary[1];
+
+ if ($data_val)
+ {
+ $local_config_hash{$data_field} = $data_val;
+ }
+ }
+
+ close(CONFIG_FILE);
+
+ # check for required settings
+ if (!$local_config_hash{"Source"}) {
+ die("You are required to provide a Source for your new data.\n"
+ . "Run \"perldoc pathway_gene_swapper.pl\" for more information.\n\n"); }
+ if (!$local_config_hash{"Database"}) {
+ die("You are required to identify a Database for your new data.\n"
+ . "Run \"perldoc pathway_gene_swapper.pl\" for more information.\n\n"); }
+ if (!$local_config_hash{"Version"}) {
+ die("You are required to provide a Version idenifier for your new data.\n"
+ . "Run \"perldoc pathway_gene_swapper.pl\" for more information.\n\n"); }
+
+ # set defaults, if none declared
+ if (!$local_config_hash{"CommentPrefix"}) {
+ $local_config_hash{"CommentPrefix"} = "Previously labeled as: ";
+ }
+ if (!$local_config_hash{"BoxWidth"}) {
+ $local_config_hash{"BoxWidth"} = 60;
+ }
+ if (!$local_config_hash{"X-Offset"}) {
+ $local_config_hash{"X-Offset"} = 4;
+ }
+ if (!$local_config_hash{"Y-Offset"}) {
+ $local_config_hash{"Y-Offset"} = 3;
+ }
+
+ return %local_config_hash;
+}
+
+
+# ---------------------------------------------------------------------------
+=item B<void init()>
+Reads in command-line values, calls for config settings, and begins
+screen output.
+=cut
+# ---------------------------------------------------------------------------
+sub init
+{
+ # read and set options
+ getopts('i:g:c:o:hLsvGd', \%opts);
+
+ foreach my $key (keys %opts) {
+ my $value = $opts{$key};
+ switch ($key) {
+ case "i" {
+ if ($value =~ /\//) { # assume path
+ $input_gpml_file = $value;
+ } else {
+ $input_gpml_file = getcwd() . "\/$value";
+ }
+ }
+ case "g" {
+ if ($value =~ /\//) { # assume path
+ $input_gene_file = $value;
+ } else {
+ $input_gene_file = getcwd() . "\/$value";
+ }
+ }
+ case "c" {
+ if ($value =~ /\//) { # assume path
+ $input_config_file = $value;
+ } else {
+ $input_config_file = getcwd() . "\/$value";
+ }
+ }
+ case "o" {
+ if ($value =~ /\//) { # assume path
+ $output_file = $value;
+ } else {
+ $output_file = getcwd() . "\/$value";
+ }
+ }
+ case "s" { $use_symbols = 1; }
+ case "h" { $apply_homolog_heat = 1; }
+ case "L" { $remove_lit = 1; }
+ case "v" { $verbose = 1; }
+ case "G" { $doc_mode = 1; }
+ case "d" { $debug = 1; }
+ }
+ }
+
+ system "clear";
+ print "\n"
+ . "------------------------------------------------------------\n"
+ . "------------------ Pathway Gene Swapper --------------------\n"
+ . "------------------------------------------------------------\n"
+ . "\n"
+ . "Input Files:\n"
+ . " - PathVisio File (GPML): $input_gpml_file\n"
+ . " - Gene List (CSV): $input_gene_file\n"
+ . " - Configuration settings: $input_config_file\n"
+ . "\n"
+ . "Output File: $output_file\n"
+ . "\n"
+ . "Use provided gene symbols? " . ($use_symbols ? "Yes" : "No") . "\n"
+ . "Provide homolog heat-map? " . ($apply_homolog_heat ? "Yes" : "No") . "\n"
+ . "Remove literature references? " . ($remove_lit ? "Yes" : "No") . "\n"
+ . "Running in verbose mode? " . ($verbose ? "Yes" : "No") . "\n"
+ . "Running in document mode? " . ($doc_mode ? "Yes" : "No") . "\n"
+ . "Running in debug mode? " . ($debug ? "Yes" : "No") . "\n"
+ . "\n"
+ . "------------------------------------------------------------\n"
+ . "------------------------------------------------------------\n"
+ . "------------------------------------------------------------\n"
+ . "\n";
+
+ %configs = config($input_config_file);
+}
+
+
+# ---------------------------------------------------------------------------
+=item B<hash set_gradient(int $max_homolog_count)>
+Accepts: The maximum number of homologs for one gene in this data set
+Creates a blue-red gradient and stores it in a hash.
+Returns: A hash of RRGGBB color values, keyed to the number set of
+possible homologs (1..n).
+=cut
+# ---------------------------------------------------------------------------
+sub set_gradient($)
+{
+ my @blue_red_array;
+
+ for (my $i=0; $i<256; $i++) {
+ push @blue_red_array, [$i, 0, (255-$i)];
+ }
+
+ register_gradient("blue_red",\@blue_red_array);
+
+ my %blue_red_gradient;
+ my $max_grad = $_[0];
+ my $inc = sprintf("%.2f", 1/$max_grad);
+ my $count = 1;
+
+ for (my $i=$inc; $i<=0.99; $i=$i+$inc) {
+ my $tmp_hex = grad2rgb("blue_red",$i);
+ $tmp_hex =~ s/\#//;
+ $blue_red_gradient{$count} = $tmp_hex;
+ $count++;
+ }
+
+ return %blue_red_gradient;
+}
+
+
+# ---------------------------------------------------------------------------
+=item B<void import_data()>
+Reads, parses, and stores gene mapping file and source GPML.
+=cut
+# ---------------------------------------------------------------------------
+sub import_data
+{
+ print "Opening gene mapping file and reading data...\n\n";
+
+ open(GENE_FILE, $input_gene_file) or die("Could not open $input_gene_file");
+
+ # used to generate total counts of each species' gene list; sanity check
+ my $original_gene_count = 0;
+ my $replacement_homolog_count = 0;
+
+ my $orig_data_item;
+ my $new_symbol = "";
+ my $new_data_item;
+
+ # ignore header
+ my $line = <GENE_FILE>;
+
+ while (<GENE_FILE>)
+ {
+ $line = $_;
+ chomp $line;
+ my @line_ary = split(',',$line);
+ my $orig_data_item = $line_ary[0];
+
+ if ($use_symbols) {
+ if (scalar(@line_ary) != 3) {
+ die("If you specify that your gene-mapping file includes "
+ . "symbols, then your CSV input file must have three "
+ . "columns of data (in this order): "
+ . "old gene, new symbol, new gene\n");
+ }
+ $new_symbol = $line_ary[1];
+ $new_data_item = $line_ary[2];
+ }
+ else
+ {
+ $new_data_item = $line_ary[1];
+ }
+
+ #Does ath_gene exist?
+ if (!exists $swap_genes{$orig_data_item})
+ {
+ $original_gene_count++;
+ }
+ $replacement_homolog_count++; # count this every time
+
+ # add new gene to hash value (array) for old gene hash key
+ push @{$swap_genes{$orig_data_item}},
+ { "symbol"=>$new_symbol, "new_item"=>$new_data_item };
+
+ $new_symbol = ""; # reset for next iter.
+ }
+
+ # determine the original gene(s) with the highest # of homologs in the new
+ # gene set
+ my @most_popular_genes; # identity of the gene(s) with the highest number of homologs
+ foreach my $orig_gene_key (keys %swap_genes)
+ {
+ if ($max_homolog_count < scalar(@{$swap_genes{$orig_gene_key}}))
+ {
+ $max_homolog_count = scalar(@{$swap_genes{$orig_gene_key}});
+ @most_popular_genes = (); # new max; refresh
+ push @most_popular_genes, $orig_gene_key;
+ }
+ else
+ {
+ if ($max_homolog_count == scalar(@{$swap_genes{$orig_gene_key}}))
+ {
+ push @most_popular_genes, $orig_gene_key;
+ }
+ }
+ }
+
+ if ($verbose) # give add'l stats on gene and homolog counts
+ {
+ print "[Total number of original genes and homologs]\n"
+ . "Original gene count: " . $original_gene_count . "\n"
+ . "Replacement homolog count: $replacement_homolog_count\n\n";
+
+ print "[Highest number of homologs per gene]\n";
+ print "Number of homologs: $max_homolog_count\n";
+ print "Gene(s): @most_popular_genes\n\n";
+
+ print "[Number of homologs per original gene]\n";
+ foreach my $orig_gene_key (keys %swap_genes)
+ {
+ print "$orig_gene_key: " . scalar(@{$swap_genes{$orig_gene_key}}) . "\n";
+ }
+ print "\n";
+ }
+
+ close(GENE_FILE);
+
+ # initialize the blue-red gradient for heat mapping
+ if ($apply_homolog_heat)
+ {
+ %gradient = set_gradient($max_homolog_count);
+ }
+
+ print "Opening GPML pathway file and reading data...\n\n";
+
+ my $parser = new XML::DOM::Parser;
+ $gpml_doc = $parser->parsefile($input_gpml_file);
+}
+
+
+# ---------------------------------------------------------------------------
+=item B<void show_input()>
+Spits out the data to make sure you've read in the files correctly.
+Verbose only.
+=cut
+# ---------------------------------------------------------------------------
+sub show_input
+{
+ if ($verbose)
+ {
+ print "[Configuration Settings]\n";
+ print Dumper(\%configs) . "\n\n";
+ print "\n";
+
+ print "[Gene Mappings]\n";
+ print Dumper(\%swap_genes) . "\n\n";
+ print "\n";
+ }
+ if ($doc_mode)
+ {
+ print "[Source GPML]\n";
+ print $gpml_doc->toString;
+ print "\n";
+ }
+}
+
+# ---------------------------------------------------------------------------
+=item B<string create_unique_hex_id($hash_ref, $string_id_type)>
+Accepts a reference to a hash of existing hex ids and a string as
+the "type" of ID (e.g. "Group.GraphId"). The latter is currently for
+documentary purposes only.
+Generates a "random" 5-digit hexadecimal id, checks to see if it
+already exists in the hex list, and if not, adds it to the list
+of hex ids already present in the GPML doc. Otherwise, generates
+another "random" id and repeats the process until a new unique id
+is identified.
+Returns a string containing the new hex id.
+=cut
+# ---------------------------------------------------------------------------
+sub create_unique_hex_id($$)
+{
+ # NOTE: This algorithm breaks down at VERY large scale (100K genes+). The
+ # larger the number of original genes, groups, and new homologs you need to
+ # create, the more inefficient it becomes to make sure your "random" 5-digit
+ # hex number is not already present in your "existing ids" list via
+ # recursion. However, for a few hundred or thousand genes, it should be ok.
+
+ my $first_digit; # limited to a..f
+ my $last_four_digits; # 0..f
+
+ $first_digit = (('a'..'f')[rand(6)]);
+ $last_four_digits .= ((0..9,'a'..'f')[rand(16)]) for 1..4;
+
+ my $candidate_id = $first_digit . $last_four_digits;
+
+ # recurse if you haven't generated a unique id yet
+ if (exists ${$_[0]}{$candidate_id})
+ {
+ # print "not unique...\n"; # TEST
+ # the '&' suppresses prototype checking and avoids a runtime warning
+ # since this is a recursive call
+ $candidate_id = &create_unique_hex_id($_[0],$_[1]);
+ }
+ else
+ {
+ # print "unique!\n"; # TEST
+ ${$_[0]}{$candidate_id} = $_[1];
+ }
+
+ return $candidate_id;
+}
+
+# ---------------------------------------------------------------------------
+=item B<void swap_genes()>
+Substitutes gene data.
+=cut
+# ---------------------------------------------------------------------------
+sub swap_genes
+{
+ print "Swapping gene data and making other document modifications...\n\n";
+
+ my $pathway_node = ($gpml_doc->getElementsByTagName("Pathway"))[0];
+
+ # change Pathway header info to config settings
+ if ($configs{"Title"}) {
+ $pathway_node->setAttribute("Name",$configs{"Title"}); }
+ if ($configs{"Author"}) {
+ $pathway_node->setAttribute("Author",$configs{"Author"}); }
+ if ($configs{"Maintainer"}) {
+ $pathway_node->setAttribute("Maintainer",$configs{"Maintainer"}); }
+ if ($configs{"Version"}) {
+ $pathway_node->setAttribute("Version",$configs{"Version"}); }
+ if ($configs{"Organism"}) {
+ $pathway_node->setAttribute("Organism",$configs{"Organism"}); }
+
+ # get all "gene box" data nodes
+ my $data_nodes = $pathway_node->getElementsByTagName("DataNode");
+ # print $data_nodes->getLength . "\n"; # TEST
+
+ # remove all <BiopaxRef> and <bp:PublicationXref> elements and children
+ if ($remove_lit)
+ {
+ print "Removing literature references...\n\n";
+ my $biopax_node = ($pathway_node->getElementsByTagName("Biopax"))[0];
+ $pathway_node->removeChild($biopax_node);
+
+ for (@$data_nodes)
+ {
+ my $curr_datanode = $_;
+ my $biopaxref_nodes = $curr_datanode->getElementsByTagName("BiopaxRef");
+ for (@$biopaxref_nodes)
+ {
+ # print $_->getTagName . "\n"; # TEST
+ $curr_datanode->removeChild($_);
+ }
+ }
+ }
+
+ # will hold a convenient nested hash of data node references in the gpml doc,
+ # indexed by the id of the gene located in the <Xref> element for each
+ # node, and sub-indexed by the GraphId of each corresponding node
+ my %data_nodes_by_gene_id;
+
+ if ($verbose) {
+ print "[Original genes]\n";
+ }
+
+ # create a hash of all 5-digit hex ids in the gpml doc (this is the black list)
+ # one list of DataNode.GraphId, Group.GroupId, and Group.GraphId
+ my %existing_hex_ids;
+ for (@$data_nodes)
+ {
+ # print $_ . "\n"; # TEST
+
+ if ($_->getAttributeNode("GraphId"))
+ {
+ $existing_hex_ids{$_->getAttributeNode("GraphId")->getValue}
+ = $_->getTagName . ".GraphId";
+ }
+
+ # also build a data node hash to make lookup easier in the next section
+ my $curr_xref_id = ($_->getElementsByTagName("Xref"))[0]
+ ->getAttributeNode("ID")->getValue;
+ my $curr_graph_id = $_->getAttributeNode("GraphId")->getValue;
+
+ $curr_xref_id =~ s/\s+$//; # rtrim whitespace
+ $curr_xref_id =~ s/^\s+//; # ltrim whitespace
+
+ if ($verbose) {
+ my $curr_text_label = $_->getAttributeNode('TextLabel')->getValue;
+ $curr_text_label =~ s/^\s+|\s+$//; # trim whitespace
+ print "$curr_text_label\t$curr_xref_id\n";
+ }
+
+ if (length($curr_xref_id) > 0)
+ {
+ #if ($curr_xref_id eq "AT3G12810") { print "** hit on AT3G12810\n"; } # TEST
+ $data_nodes_by_gene_id{$curr_xref_id}{$curr_graph_id} = $_;
+ }
+ else
+ {
+ if ($verbose) {
+ print "WARNING: Found DataNode (TextLabel: "
+ . $_->getAttributeNode('TextLabel')->getValue . ") "
+ . "with missing Xref ID.\n"
+ }
+ }
+ }
+ print "\n";
+
+ if ($debug) {
+ print "...<DEBUG: \%data_nodes_by_gene_id>\n";
+ foreach my $tmp_gene (keys %data_nodes_by_gene_id) {
+ foreach my $tmp_node (keys %{$data_nodes_by_gene_id{$tmp_gene}}) {
+ print "... $tmp_gene => $tmp_node => $data_nodes_by_gene_id{$tmp_gene}{$tmp_node}\n";
+ #if ($tmp_gene eq "AT3G12810") { print "** hit on AT3G12810 node\n"; } # TEST
+ }
+ }
+ print "\n";
+ }
+
+ my $group_nodes = $pathway_node->getElementsByTagName("Group");
+ for (@$group_nodes)
+ {
+ if ($_->getAttributeNode("GroupId"))
+ {
+ $existing_hex_ids{$_->getAttributeNode("GroupId")->getValue}
+ = $_->getTagName . ".GroupId";
+ }
+ if ($_->getAttributeNode("GraphId"))
+ {
+ $existing_hex_ids{$_->getAttributeNode("GraphId")->getValue}
+ = $_->getTagName . ".GraphId";
+ }
+ }
+
+ if ($debug) { print "...<DEBUG: \%existing_hex_ids>\n"
+ . Dumper(\%existing_hex_ids) . "\n\n"; }
+
+ # iterate through gene mappings from csv file
+ foreach my $old_gene (keys %swap_genes)
+ {
+ # print $old_gene . "\n"; # TEST
+
+ # find curr old gene nodes in doc
+ if (exists $data_nodes_by_gene_id{$old_gene})
+ {
+ # iterate through each node by its GraphId
+ foreach my $curr_old_genes_by_hex_id (keys %{$data_nodes_by_gene_id{$old_gene}})
+ {
+ my $curr_old_gene_node = $data_nodes_by_gene_id{$old_gene}{$curr_old_genes_by_hex_id};
+ # print $curr_old_gene_node . "\n"; # TEST
+
+ # holds list of newly-created nodes, used to replace old node
+ my @new_nodes_map;
+
+ # iterate through new gene replacements
+ for (@{$swap_genes{$old_gene}})
+ {
+ # copy the curr old gene node
+ my $new_node = $curr_old_gene_node->cloneNode("deep");
+
+ # print "[$_]\n$new_node->toString\n\n"; # TEST
+
+ # add to new nodes ary
+ push @new_nodes_map, [$new_node, $_];
+ }
+ # print "@new_nodes_map\n"; # TEST
+
+ # if more than one new homolog exists, and the old gene doesn't
+ # already belong to a group, you'll need a new Group for multiple
+ # gene boxes
+ my $new_GroupId;
+
+ if (scalar(@new_nodes_map) > 1)
+ {
+ # if curr old gene does not belong to a group
+
+ # print $curr_old_gene_node->toString . "\n"; # TEST
+ # print $curr_old_gene_node->getAttribute("GroupRef"); # TEST
+
+ if (!$curr_old_gene_node->getAttribute("GroupRef"))
+ {
+ #print "no existing group ref\n"; # TEST
+
+ # generate a new GroupId and Group.GraphId hex ids not
+ # already in use
+ $new_GroupId = create_unique_hex_id(\%existing_hex_ids,"Group.GroupId");
+ # my $new_Group_GraphId = create_unique_hex_id(\%existing_hex_ids,"Group.GraphId");
+ #print "new group id: $new_GroupId\n"; # TEST
+ # print "$new_GroupId, $new_Group_GraphId\n"; # TEST
+
+ # create a new group node
+ my $new_group = $gpml_doc->createElement("Group");
+ $new_group->setAttribute("GroupId",$new_GroupId);
+ #$new_group->setAttribute("GraphId",$new_Group_GraphId);
+ $new_group->setAttribute("Style","Group");
+
+ # add to beginning of group nodes
+ $pathway_node->insertBefore($new_group,${$group_nodes}[0]);
+ }
+ }
+
+ # flag for determining if there are one or many replacement homologs
+ my $is_first_homolog = 1;
+
+ # makes sure each box is increasingly offset from the original
+ # (in all three dimensions)
+ my $offset_multiplier = 0;
+ my $gene_suffix_counter = 0; # used to affix numbers to multiple new gene symbols
+
+ # for new nodes ary
+ for (@new_nodes_map)
+ {
+ if (scalar(@new_nodes_map) > 1)
+ {
+ $gene_suffix_counter++;
+ }
+
+ my $curr_new_node = $$_[0];
+ my $curr_symbol = ${$$_[1]}{"symbol"};
+ my $curr_homolog = ${$$_[1]}{"new_item"};
+
+ #print "$_: $curr_new_node, $curr_symbol, $curr_homolog\n"; # TEST
+ #print "[Curr New Node before editing...]\n" . $curr_new_node->toString . "\n\n"; # TEST
+
+ # update all new nodes w/ attributes...
+
+ # grab original text label
+ my $old_label = $curr_new_node->getAttributeNode("TextLabel")->getValue;
+
+ # rename TextLabel...
+ if ($use_symbols && length($curr_symbol) > 0) # apply the provided gene symbol
+ {
+ $curr_new_node->setAttribute("TextLabel", $curr_symbol);
+ }
+ else # prefix (from config), suffix: new '-#' for multiple homologs
+ {
+ $curr_new_node->setAttribute("TextLabel",
+ (($configs{"LabelPrefix"}) ? $configs{"LabelPrefix"} : "")
+ . $curr_new_node->getAttributeNode("TextLabel")->getValue
+ . (($gene_suffix_counter > 0) ? "-$gene_suffix_counter" : ""));
+ }
+
+ # add new GroupRef if necessary
+ if ($new_GroupId)
+ {
+ $curr_new_node->setAttribute("GroupRef",$new_GroupId);
+ }
+
+ # add Comment back-referencing TAIR locus id (use "source" attribute)
+ # NOTE: order is important in GPML; the <Comment> tags are first
+ my $new_comment = $gpml_doc->createElement("Comment");
+ $new_comment->setAttribute("Source",$configs{"Source"});
+ $new_comment->addText($configs{"CommentPrefix"} . " $old_gene ($old_label).");
+ $curr_new_node->insertBefore($new_comment,$curr_new_node->getFirstChild); # assumes other child nodes
+
+ # edit <Xref Database="JGI" ID="Egrandis..." />
+ my $curr_xref = ($curr_new_node->getElementsByTagName("Xref"))[0];
+ $curr_xref->setAttribute("Database",$configs{"Database"});
+ $curr_xref->setAttribute("ID",$curr_homolog);
+
+ # change box width and colors (<Graphics...Color="4488ff" ... />)
+ my $curr_graphics = ($curr_new_node->getElementsByTagName("Graphics"))[0];
+ $curr_graphics->setAttribute("Width",$configs{"BoxWidth"});
+
+ # add "heat" to genes with multiple homologs
+ if ($apply_homolog_heat && ($gene_suffix_counter > 0))
+ {
+ $curr_graphics->setAttribute("FillColor", $gradient{scalar(@new_nodes_map)});
+ $curr_graphics->setAttribute("Color","8888ff");
+ }
+ else
+ {
+ if ($configs{"BoxColor"}) {
+ $curr_graphics->setAttribute("FillColor",$configs{"BoxColor"}); }
+ if ($configs{"BoxBorder"}) {
+ $curr_graphics->setAttribute("Color",$configs{"BoxBorder"}); }
+ }
+
+ if ($is_first_homolog)
+ {
+ # print "that was the first homolog...\n"; # TEST
+ $is_first_homolog = 0; # first homolog complete
+ }
+ else # add'l homologs required
+ {
+ $offset_multiplier++;
+
+ # print "that was an add'l homolog, change more attrs...\n"; # TEST
+ # update add'l nodes w/ special attributes...
+
+ # generate a new DataNode GraphId not already in use
+ my $new_GraphId =
+ create_unique_hex_id(\%existing_hex_ids,"DataNode.GraphId");
+ # print $new_GraphId . "\n"; # TEST
+ $curr_new_node->setAttribute("GraphId",$new_GraphId);
+
+ # decrement the Z-order
+ $curr_graphics->setAttribute("ZOrder",
+ $curr_graphics->getAttributeNode("ZOrder")->getValue
+ - $offset_multiplier);
+ # stagger the extra boxes by decrementing the coords
+ $curr_graphics->setAttribute("CenterX",
+ $curr_graphics->getAttributeNode("CenterX")->getValue
+ - ($configs{"X-Offset"} * $offset_multiplier));
+ $curr_graphics->setAttribute("CenterY",
+ $curr_graphics->getAttributeNode("CenterY")->getValue
+ - ($configs{"Y-Offset"} * $offset_multiplier));
+ }
+ }
+ undef $new_GroupId; # clear this out so we can test against its existence next time
+
+ # replace old node w/ new node(s)
+ for (@new_nodes_map) {
+ # add all the new nodes...
+ $pathway_node->insertBefore($$_[0],$curr_old_gene_node);
+ }
+ # ...and remove the original node
+ $pathway_node->removeChild($curr_old_gene_node);
+ }
+ # once mapped, remove the old gene so we are left with a list of
+ # unmapped original genes (for show_ouput())
+ delete($data_nodes_by_gene_id{$old_gene});
+ }
+ else
+ {
+ print "ALERT: Gene identifier $old_gene is not present in this "
+ . "PathVisio GPML document.\n";
+ }
+ }
+ %unmapped_genes = %data_nodes_by_gene_id; # whatever is left over
+}
+
+# ---------------------------------------------------------------------------
+=item B<void show_output()>
+Displays the transformed data. Verbose only.
+=cut
+# ---------------------------------------------------------------------------
+sub show_output
+{
+ if ($verbose) {
+ print "[Unmapped original genes]\n";
+ my $count = 0;
+ foreach my $tmp_gene (keys %unmapped_genes)
+ {
+ foreach my $tmp_node (keys %{$unmapped_genes{$tmp_gene}})
+ {
+ $count++;
+ print $unmapped_genes{$tmp_gene}{$tmp_node}
+ ->getAttributeNode("TextLabel")->getValue
+ . "\t($tmp_gene)\n";
+ }
+ }
+ print "\nTotal unmapped genes: $count\n";
+ }
+ if ($doc_mode)
+ {
+ print "\n[Modified GPML Output]\n";
+ print $gpml_doc->toString;
+ print "\n";
+ }
+}
+
+# ---------------------------------------------------------------------------
+=item B<void export_data()>
+Writes the transformed GPML doc out to the specified output file.
+=cut
+# ---------------------------------------------------------------------------
+sub export_data
+{
+ print "\nWriting GPML to output file...\n\n";
+
+ # ensures utf-8 encoding (for accent marks, etc.)
+ open my $out_file_handle, ">:utf8", "$output_file" or die $!;
+
+ $gpml_doc->print($out_file_handle);
+}
+
+=back
+=cut
+
+# ---------------------------------------------------------------------------
+# main
+# ---------------------------------------------------------------------------
+
+init;
+import_data;
+show_input;
+swap_genes();
+show_output;
+export_data;
+
+$gpml_doc->dispose; # cleanup
+exit;
+
+# ---------------------------------------------------------------------------
+# end
+# ---------------------------------------------------------------------------
+
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+
+# ---------------------------------------------------------------------------
+# Reactome - CHEBI Ontology Mapping Script
+#
+# Justin Preece, 10/06/10
+# v1.0: 10/13/10 (svn rev. 66)
+# v1.1: 10/20/10 (svn rev. 70)
+# v1.2: 02/07/11 (svn rev. 86)
+#
+# Purpose: Map CHEBI ontology terms onto the Reactome database.
+#
+# Inputs:
+#
+# CHEBI OBO file (preset)
+#
+# Reactome file (preset, provided by Guanming Wu)
+# (Header) [ReactomeID] [Compound_Name] [CAS] [LIGAND] [Cyc]
+# (Row) 923893 S-adenosyl-L-methionine 29908-03-0 C00019 S-ADENOSYLMETHIONINE ** the '-' (dash) symbol will be applied to any empty columns
+#
+# Outputs: tab-del mapping file (reactome_chebi_mapping_complete_sorted.txt)
+#
+# [ReactomeID] [CHEBI] [XREF_Type] [XREF_ID]
+# 923893 15414 CAS 29908-03-0
+# 923893 15414 LIGAND C00019
+# 923893 15414 CompoundTerm S-ADENOSYLMETHIONINE
+# 923893 15414 CompoundSynonym s-AdenosylMethionine
+# 923893 15414 CycTerm S-ADENOSYLMETHIONINE ** optional
+# 923893 15414 CycSynonym s-adenosylmethionine ** optional
+# ---------------------------------------------------------------------------
+
+
+# ---------------------------------------------------------------------------
+# modules
+# ---------------------------------------------------------------------------
+
+use GO::Parser;
+
+# ---------------------------------------------------------------------------
+# declarations
+# ---------------------------------------------------------------------------
+
+# set paths to data files
+my $data_path = "/home/preecej/Documents/projects/reactome/reactome_to_chebi_mapping/AraCyc/gk_central_041811/no_synonyms/";
+my $chebi_obo_file = "../../chebi_v78.obo";
+my $reactome_file = "AraReferenceMolecules.txt";
+my $mapped_output_file = "1.2_reactome_chebi_mapping_complete.txt";
+my $sorted_output_file = "1.2_reactome_chebi_mapping_complete_sorted.txt";
+my $unique_mappings = "1.2_reactome_unique_mappings.txt";
+my $sorted_no_match_file = "1.2_reactome_entries_with_no_chebi_match.txt";
+
+# options
+my $allow_obsolete_terms = 1;
+my $allow_cyc = 0;
+my $allow_synonyms = 0;
+
+my $ont; # chebi ontology
+
+my %reactome_CompoundName; # reactome Compound Name hash
+my %reactome_CAS; # reactome CAS hash
+my %reactome_LIGAND; # reactome LIGAND hash
+my %reactome_Cyc; # reactome Cyc hash
+
+my @map_results = (); # successful mappings between chebi and reactome
+
+
+# ---------------------------------------------------------------------------
+# functions
+# ---------------------------------------------------------------------------
+
+
+# setup chebi parser and reactome data
+# ---------------------------------------------------------------------------
+sub init
+{
+ # init ontology parser and ontology
+ my $parser = GO::Parser->new({handler=>'obj'});
+ $parser->parse($data_path . $chebi_obo_file);
+ $ont = $parser->handler->graph;
+
+ # read reactome file into 3 separate hashes
+ open(REACTOME_FILE,$data_path . $reactome_file);
+
+ my $line = <REACTOME_FILE>; # skip the header
+ my $reactome_count = 0;
+
+ while (<REACTOME_FILE>)
+ {
+ $line = $_;
+ chomp $line;
+ $reactome_count++;
+ my @reactome_entry = split(/\t/, $line); # break up our tab-del line
+
+ # load up this reactome entry's Compound_Name, ID, CAS, LIGAND, and Cyc values
+ my $reactome_id = $reactome_entry[0];
+ my $compound_name = uc $reactome_entry[1]; # for case-insensitivity
+
+ # strips off "AN " and "A " indefinite articles
+ $compound_name =~ s/^ //;
+ $compound_name =~ s/^AN //;
+ $compound_name =~ s/^A //;
+
+ my $CAS_id = $reactome_entry[2];
+ my $LIGAND_id = $reactome_entry[3];
+ my $Cyc_term = uc $reactome_entry[4]; # for case-insensitivity
+
+ # There is a possibility that a single CAS, LIGAND, or Cyc
+ # identifier may appear in more than one reactome entry. This
+ # temp array allows each matched hash value to hold more than
+ # one ReactomeID, if necessary.
+
+ # --CAS Hash Load--
+ if ($CAS_id ne "-") { # keep those "-" placeholders out
+ # build the CAS hash; each value may hold 1...n reactome
+ # ids (as an array)
+ push @{$reactome_CAS{$CAS_id}}, $reactome_id;
+ }
+
+ # similarly...
+
+ # --LIGAND Hash Load--
+ if ($LIGAND_id ne "-") {
+ push @{$reactome_LIGAND{$LIGAND_id}}, $reactome_id;
+ }
+
+ # --CompoundName Hash Load--
+ if ($compound_name ne "-") {
+ push @{$reactome_CompoundName{"$compound_name"}}, $reactome_id;
+ }
+
+ # --Cyc Hash Load--
+ if ($allow_cyc)
+ {
+ if ($Cyc_term ne "-") {
+ push @{$reactome_Cyc{"$Cyc_term"}}, $reactome_id;
+ }
+
+ }
+ }
+ close REACTOME_FILE;
+
+ print "\n[Reactome Stats]",
+ "\nTotal Reactome Entries: $reactome_count\n";
+
+}
+
+
+# spit out some data to make sure you've read in the files correctly
+# ---------------------------------------------------------------------------
+sub test_inputs
+{
+ # basic ontology info
+ print "[Node Count]: " . $ont->node_count . "\n";
+
+ # get all chebi terms in the ontology
+ my $terms = $ont->get_all_nodes;
+
+ # output contents of parsed ontology
+ foreach my $term (@$terms)
+ {
+ print "\n" . $term->acc . " " . $term->name . "\n[SYNONYMS]\n";
+
+ my $synonyms = $term->synonym_list;
+ foreach my $synonym (@$synonyms) {
+ print $synonym . "\n";
+ }
+
+ print "[XREFS]\n";
+ my $xrefs = $term->dbxref_list;
+ foreach my $xref (@$xrefs) {
+ print $xref->xref_key . ",",
+ $xref->xref_keytype . ",",
+ $xref->xref_dbname . ",",
+ $xref->xref_desc . "\n";
+ }
+ print "\n";
+ }
+
+ # show dupes in reactome hashes - give data to Pankaj;
+ # this is important b/c the duplicates may represent erroneous data in
+ # the Reactome dataset
+ my $k; my @v;
+ print "\n[Reactome Hashes - Dupes]\n";
+ print "\n--CAS Hash--\n";
+ for $k (keys %reactome_CAS) {
+ if (@{$reactome_CAS{$k}} > 1) {
+ print "$k: @{$reactome_CAS{$k}}\n";
+ }
+ }
+ print "\n--LIGAND Hash--\n";
+ for $k (keys %reactome_LIGAND) {
+ if (@{$reactome_LIGAND{$k}} > 1) {
+ print "$k: @{$reactome_LIGAND{$k}}\n";
+ }
+ }
+ print "\n--CompoundName Hash--\n";
+ for $k (keys %reactome_CompoundName) {
+ if (@{$reactome_CompoundName{$k}} > 1) {
+ print "$k: @{$reactome_CompoundName{$k}}\n";
+ }
+ }
+ if ($allow_cyc)
+ {
+ print "\n--Cyc Hash--\n";
+ for $k (keys %reactome_Cyc) {
+ if (@{$reactome_Cyc{$k}} > 1) {
+ print "$k: @{$reactome_Cyc{$k}}\n";
+ }
+ }
+ }
+}
+
+
+# map the chebi terms to the reactome entries
+# ---------------------------------------------------------------------------
+sub perform_map
+{
+ my $chebi_obo_terms = $ont->get_all_nodes;
+
+ # vars for mapping stats
+ my $attempted_mappings = 0;
+ my $successful_mappings = 0;
+ my $attempted_CAS_mappings = 0;
+ my $successful_CAS_mappings = 0;
+ my $attempted_LIGAND_mappings = 0;
+ my $successful_LIGAND_mappings = 0;
+ my $attempted_name_mappings = 0;
+ my $successful_name_mappings = 0;
+ my $attempted_synonym_mappings = 0;
+ my $successful_synonym_mappings = 0;
+
+ # loop through each chebi term
+ foreach my $term (@$chebi_obo_terms)
+ {
+ # eliminate "typedef" nodes (non-CHEBI terms), also check for obsolete
+ # terms and whether to allow them
+ if (($term->acc =~ m/^CHEBI:/)
+ && (!$term->is_obsolete || ($term->is_obsolete && $allow_obsolete_terms)))
+ {
+ # attempt CHEBI match on CAS and LIGAND ID's
+ $attempted_mappings++;
+ my $xrefs = $term->dbxref_list;
+ foreach my $xref (@$xrefs)
+ {
+ $attempted_CAS_mappings++;
+ $attempted_LIGAND_mappings++;
+
+ # temp-foo to skirt an interpolation problem
+ my $tmp_key = $xref->xref_key;
+
+ if (defined($reactome_CAS{"$tmp_key"}))
+ {
+ foreach my $tmp_reactome_id (@{$reactome_CAS{$tmp_key}})
+ {
+ $successful_CAS_mappings++;
+ push (@map_results, "$tmp_reactome_id\t" .
+ $term->acc . "\t" .
+ "CAS\t" .
+ $tmp_key);
+ }
+ }
+
+ if (defined($reactome_LIGAND{"$tmp_key"}))
+ {
+ foreach my $tmp_reactome_id (@{$reactome_LIGAND{$tmp_key}})
+ {
+ $successful_LIGAND_mappings++;
+ push (@map_results, "$tmp_reactome_id\t" .
+ $term->acc . "\t" .
+ "LIGAND\t" .
+ $tmp_key);
+ }
+ }
+ }
+
+ # attempt CHEBI match on Reactome Compound Names (and optional Cyc names/synonyms)...
+ $attempted_name_mappings++;
+
+ # more temp-foo to skirt said interpolation problem
+ my $tmp_name = uc $term->name;
+
+ # reactome compound names...
+ if (defined($reactome_CompoundName{"$tmp_name"}))
+ {
+ foreach my $tmp_reactome_id (@{$reactome_CompoundName{$tmp_name}})
+ {
+ $successful_name_mappings++;
+ push (@map_results, "$tmp_reactome_id\t" .
+ $term->acc . "\t" .
+ "CompoundTerm\t" .
+ $term->name);
+ }
+ }
+ # ...and synonyms (optional)
+ if ($allow_synonyms)
+ {
+ my $synonyms = $term->synonym_list;
+ foreach my $synonym (@$synonyms)
+ {
+ $attempted_synonym_mappings++;
+
+ # yet more temp-foo to skirt interpolation problem
+ my $tmp_syn = "\U$synonym";
+
+ if (defined($reactome_CompoundName{$tmp_syn}))
+ {
+ foreach my $tmp_reactome_id (@{$reactome_CompoundName{$tmp_syn}})
+ {
+ $successful_synonym_mappings++;
+ push (@map_results, "$tmp_reactome_id\t" .
+ $term->acc . "\t" .
+ "CompoundSynonym\t" .
+ $synonym);
+ }
+ }
+ }
+ }
+
+ # Cyc names...
+ if ($allow_cyc)
+ {
+ if (defined($reactome_Cyc{"$tmp_name"}))
+ {
+ foreach my $tmp_reactome_id (@{$reactome_Cyc{$tmp_name}})
+ {
+ $successful_name_mappings++;
+ push (@map_results, "$tmp_reactome_id\t" .
+ $term->acc . "\t" .
+ "CycTerm\t" .
+ $term->name);
+ }
+ }
+ # ...and synonyms (optional)
+ if ($allow_synonyms)
+ {
+ my $synonyms = $term->synonym_list;
+ foreach my $synonym (@$synonyms)
+ {
+ $attempted_synonym_mappings++;
+
+ # yet more temp-foo to skirt interpolation problem
+ my $tmp_syn = "\U$synonym";
+
+ if (defined($reactome_Cyc{$tmp_syn}))
+ {
+ foreach my $tmp_reactome_id (@{$reactome_Cyc{$tmp_syn}})
+ {
+ $successful_synonym_mappings++;
+ push (@map_results, "$tmp_reactome_id\t" .
+ $term->acc . "\t" .
+ "CycSynonym\t" .
+ $synonym);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ # send up some stats on the mapping process
+ $successful_mappings =
+ + $successful_CAS_mappings
+ + $successful_LIGAND_mappings
+ + $successful_name_mappings
+ + $successful_synonym_mappings;
+
+ print "\n[ChEBI Stats]",
+ "\nNodes in File: " . $ont->node_count,
+ "\nTotal Attempted Mappings (with usable ChEBI terms): " . $attempted_mappings,
+ "\nTotal Successful Mappings: " . $successful_mappings . "\n";
+
+ print "\n[Mapping Breakdown by Type]",
+ "\nCAS (matches/attempts): ",
+ "$successful_CAS_mappings/$attempted_CAS_mappings ",
+ "(note: can include ChemIDplus and KEGG COMPUND db duplicates)",
+ "\nLIGAND: ",
+ "$successful_LIGAND_mappings/$attempted_LIGAND_mappings",
+ "\nTerm Names " . ($allow_cyc ? "includes Cyc terms and synonyms" : "") . ": ",
+ "$successful_name_mappings/$attempted_name_mappings";
+ if ($allow_synonyms)
+ {
+ print "\nTerm Synonyms: ",
+ "$successful_synonym_mappings/$attempted_synonym_mappings";
+ }
+ print "\n\n";
+}
+
+
+# put the results in the mapped output file
+# ---------------------------------------------------------------------------
+sub create_mapfile
+{
+ if (@map_results > 0)
+ {
+ # add a header to the results array
+ unshift (@map_results, "ReactomeID\tCHEBI\tXREF_Type\tXREF_ID");
+
+ # setup output file
+ open(OUTPUT_FILE,">" . $data_path . $mapped_output_file);
+
+ #format results for file output
+ print OUTPUT_FILE "$_\n" foreach @map_results;
+
+ close OUTPUT_FILE;
+
+ # sort on all cols (keep the header at the top), remove exact dupes
+ system "awk 'NR == 1; NR > 1 {print \$0 | \"sort\"}' $data_path$mapped_output_file | uniq > $data_path$sorted_output_file";
+
+ # also produce files listing unique Reactome entries having a match...and those without a match
+ system "awk 'NR == 1; NR > 1 {print \$1}' $data_path$sorted_output_file | uniq > $data_path$unique_mappings";
+ system "cat $data_path$reactome_file | grep -vf $data_path$unique_mappings | sort > $data_path$sorted_no_match_file";
+ } else {
+ print "\n\nSorry, there are no mapped results.\n\n";
+ }
+}
+
+
+# ---------------------------------------------------------------------------
+# main
+# ---------------------------------------------------------------------------
+
+init;
+#test_inputs;
+perform_map;
+create_mapfile;
+
+exit;
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+use Data::Dumper;
+
+my $CoGe_genes_file_name = $ARGV[0];
+my $assoc_file_name = $ARGV[1];
+
+# read in CoGe file (arg 0), build hash of gene model ids to symbols/gene names
+
+open(IN_FILE, $CoGe_genes_file_name);
+
+my %classical_genes_by_gene_model;
+
+my $line = <IN_FILE>;
+
+while (<IN_FILE>)
+{
+ $line = $_;
+ chomp $line;
+
+ my @curr_line = split(',',$line);
+
+ my $gene_symbol = $curr_line[0];
+ $gene_symbol =~ tr/"//d;
+ my $gene_name = $curr_line[2];
+ $gene_name =~ tr/"//d;
+ my $gene_model_id = $curr_line[8];
+ $gene_model_id =~ tr/"//d;
+
+ #print $gene_symbol . "\|" . $gene_name . "\|" . $gene_model_id . "\n";
+
+ my $gene_model_expr = "^(GRMZM)";
+ if ($gene_model_id =~ $gene_model_expr) {
+ $classical_genes_by_gene_model{$gene_model_id} = [ $gene_symbol, $gene_name ];
+ }
+}
+
+close (IN_FILE);
+
+#print Dumper(\%classical_genes_by_gene_model) . "\n\n";
+
+# read in assoc file (arg 1)
+
+open(ASSOC_IN_FILE, $ARGV[1]);
+
+open(OUT_FILE,">" . (split('\.',$assoc_file_name))[0] . "_named.assoc");
+
+while (<ASSOC_IN_FILE>)
+{
+ $line = $_;
+ chomp $line;
+
+ if (length($line) > 0) {
+
+ #print $line. "\n";
+
+ my @curr_line = split('\t',$line);
+
+ # look for each annotation's hashed gene model id
+ if (defined $classical_genes_by_gene_model{$curr_line[1]}) {
+ # add/replace the appropriate cols
+ $curr_line[2] = ${$classical_genes_by_gene_model{$curr_line[1]}}[0];
+ $curr_line[9] = ${$classical_genes_by_gene_model{$curr_line[1]}}[1];
+
+ }
+ # output to new assoc file with appended name
+ #print join("\t", @curr_line) . "\n";
+ print OUT_FILE join("\t", @curr_line) . "\n";
+ }
+}
+
+close (ASSOC_IN_FILE);
+close (OUT_FILE);
+exit;
--- /dev/null
+<?php
+// JSON web service for PO terms: autocomplete and search methods
+
+/* require the user as the parameter */
+if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
+
+ $arr_field_names = array('name','acc');
+
+ /* read the params and/or set our own */
+ $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
+
+ // security measures; helps to avoid SQL injection attacks
+ $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
+ ? $_GET['field']
+ : die('"field" is a required parameter and must match an available data field.');
+
+ $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
+ if ($number_of_terms > 50) { $number_of_terms = 50; }
+
+ $qval = $_GET['qval'];
+
+ $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
+ ? strtolower($_GET['qval'])
+ : die('Please provide a searchable value');
+
+ $format = strtolower($_GET['format']) != 'json'
+ ? strtolower($_GET['format'])
+ : 'json'; //json is the default
+
+ /* connect to the db */
+ $link = mysql_connect($_SERVER['mysql_host'], $_SERVER['mysql_user'], $_SERVER['mysql_pw']) or die('Cannot connect to the DB');
+ mysql_select_db($_SERVER['mysql_db'],$link) or die('Cannot select the DB');
+
+ switch ($type) {
+ case 'autocomplete':
+ /* grab the terms from the db */
+ $query = "SELECT t.$field FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.$field LIKE '%$qval%'"
+ . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY name LIMIT $number_of_terms";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ $terms[] = array('term'=>$term[$field]);
+ }
+ }
+
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('PO_term_lookup_response'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+
+ case 'term_detail':
+ /* grab the ontology data from the db */
+ $query = "SELECT DISTINCT t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
+ . " FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.name = '$qval'"
+ . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY t.name LIMIT 1";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ $terms[] = array(
+ 'accession_id'=>$term['acc'],
+ 'aspect'=>$term['type'] == "plant_anatomy" ? "Plant Anatomy" : "Plant Growth and Development Stage",
+ 'definition'=>$term['definition'],
+ 'comment'=>$term['comment']);
+ }
+ }
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('PO_term_detail_response'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+ default:
+ die('Sorry, this web service method is not available.');
+ }
+ /* disconnect from the db */
+ @mysql_close($link);
+}
+else { die('Not authorized.'); }
+?>
+
--- /dev/null
+<?php
+
+print "test start\n";
+
+$doc = new DOMDocument();
+$doc->load('/home/preecej/Documents/projects/pathvisio/Ath_scratch.gpml');
+
+$entry = $doc->getElementsByTagName("Pathway");
+$author = $entry->item(0)->getAttribute("Author");
+print "Author:$author\n";
+
+print "test over\n";
+
+?>
--- /dev/null
+use gk_central_042211;
+/* query to id fully-qualified EC numbers in poorly-named A.th. reactions */
+select e2n.name, d.identifier from ReactionlikeEvent r
+join Event_2_crossReference e2c on e2c.DB_ID = r.DB_ID
+join Event_2_name e2n on e2n.DB_ID = r.DB_ID
+join DatabaseIdentifier d on d.DB_ID = e2c.crossReference
+join Event_2_species e on e.DB_ID = r.DB_ID
+join Species s on s.DB_ID = e.species
+join Taxon_2_name t on t.DB_ID = s.DB_ID
+where t.name like 'Arabidopsis%'
+and d.referenceDatabase = 4
+and e2n.name like '%->%'
+and d.identifier not like '%-%'
+order by e2n.name;
+
+use test;
+/* load in PJ's EC nums and names file */
+/* mysqlimport -u root -p -v --local --ignore-lines=12 test ./EC_reaction_names.txt */
+
+/* scratch queries */
+select * from Taxon_2_name
+where name like '%Ara%';
+
+select * from Species s
+join Taxon_2_name t on t.DB_ID = s.DB_ID
+where t.name like '%Arabi%';
+
+select * from Event_2_crossReference;
+
+select * from DatabaseIdentifier;
+
+select * from ReferenceDatabase;
\ No newline at end of file
--- /dev/null
+__NOTOC__
+=== Welcome to the Planteome Annotation Wiki, a resource for annotated plant genotypes and phenotypes on the semantic web! ===
+
+We host annotations from a variety of published data sources. You are free to browse these annotations and search for specific genes, synonyms, EC numbers, cross-references, and references to publications, as well as many other types of data.
+
+You may also add information of your own. If you would like to create your own annotations or add more data to existing annotations, please click [[special:UserLogin|here]] to establish a new curator account.
+
+If you already have a curator account, just [[Special:UserLogin|log in]] and begin annotating!
+
+Search for existing annotations (or data therein): (search box)
+
+[[Special:FormEdit/Annotation|Add a new gene annotation.]]
+
+=== What is semantic data, and how can it enhance my research? ===
+
+examples...
+
+=== Our Collaborators ===
+
+* Gramene...
+* The Plant Ontology...
+
+=== Credits and Thanks ===
+
+* Jaiswal Lab (and the Planteome portal)...
+* OSU...
+* POC
+* NSF...
+* etc...
+
+<!--
+== Getting started ==
+* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
+* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
+* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
+-->
+
--- /dev/null
+=== A list of reference species for use on this wiki ===
+{{#show:{{PAGENAME}}
+ | format=table
+ | mainlabel=-
+ | ?Has Reference Taxon
+}}
+
+{{#set:Has Reference Taxon=Aquilegia coerulea}}
+{{#set:Has Reference Taxon=Arabidopsis lyrata}}
+{{#set:Has Reference Taxon=Arabidopsis thaliana}}
+{{#set:Has Reference Taxon=Brachypodium dystachyon}}
+{{#set:Has Reference Taxon=Carica papaya}}
+{{#set:Has Reference Taxon=Chlamydomonas reinhardtii}}
+{{#set:Has Reference Taxon=Citrus clementina}}
+{{#set:Has Reference Taxon=Citrus cinensis}}
+{{#set:Has Reference Taxon=Cucumis sativus}}
+{{#set:Has Reference Taxon=Eucalyptus grandis}}
+{{#set:Has Reference Taxon=Fragaria vesca}}
+{{#set:Has Reference Taxon=Glycine max}}
+{{#set:Has Reference Taxon=Manihot esculenta}}
+{{#set:Has Reference Taxon=Medicago trunculata}}
+{{#set:Has Reference Taxon=Mimulus guttatus}}
+{{#set:Has Reference Taxon=Oryza sativa}}
+{{#set:Has Reference Taxon=Physcomitrella patens}}
+{{#set:Has Reference Taxon=Populus trichocarpa}}
+{{#set:Has Reference Taxon=Prunus persica}}
+{{#set:Has Reference Taxon=Ricinus communis}}
+{{#set:Has Reference Taxon=Selaginella moellendorffii}}
+{{#set:Has Reference Taxon=Setaria italica}}
+{{#set:Has Reference Taxon=Sorghum bicolor}}
+{{#set:Has Reference Taxon=Vitis vinifera}}
+{{#set:Has Reference Taxon=Volvox carteri}}
+{{#set:Has Reference Taxon=Zea mays}}
+
--- /dev/null
+The license text below "----" applies to all files within this distribution, other
+than those that are in a directory which contains files named "LICENSE" or
+"COPYING", or a subdirectory thereof. For those files, the license text contained in
+said file overrides any license information contained in directories of smaller depth.
+Alternative licenses are typically used for software that is provided by external
+parties, and merely packaged with the Data Transfer release for convenience.
+----
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null
+<?php
+/**
+ * Global functions and constants for the Data Transfer extension.
+ *
+ * @author Yaron Koren
+ * modified by Justin Preece, 05/23/11
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) die();
+
+define( 'DATA_TRANSFER_VERSION', '0.3.8' );
+
+// constants for special properties
+define( 'DT_HAS_XML_GROUPING', 1 );
+define( 'DT_IS_EXCLUDED_FROM_XML', 2 );
+
+$wgExtensionCredits['specialpage'][] = array(
+ 'path' => __FILE__,
+ 'name' => 'Data Transfer',
+ 'version' => DATA_TRANSFER_VERSION,
+ 'author' => 'Yaron Koren',
+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Data_Transfer',
+ 'descriptionmsg' => 'datatransfer-desc',
+);
+
+###
+# This is the path to your installation of Semantic Forms as
+# seen on your local filesystem. Used against some PHP file path
+# issues.
+##
+$dtgIP = dirname( __FILE__ );
+##
+
+// register all special pages and other classes
+$wgAutoloadClasses['DTUtils'] = $dtgIP . '/includes/DT_Utils.php';
+$wgSpecialPages['ViewXML'] = 'DTViewXML';
+$wgAutoloadClasses['DTViewXML'] = $dtgIP . '/specials/DT_ViewXML.php';
+$wgSpecialPages['ImportXML'] = 'DTImportXML';
+$wgAutoloadClasses['DTImportXML'] = $dtgIP . '/specials/DT_ImportXML.php';
+$wgSpecialPages['ImportCSV'] = 'DTImportCSV';
+$wgAutoloadClasses['DTImportCSV'] = $dtgIP . '/specials/DT_ImportCSV.php';
+$wgJobClasses['dtImport'] = 'DTImportJob';
+$wgAutoloadClasses['DTImportJob'] = $dtgIP . '/includes/DT_ImportJob.php';
+$wgAutoloadClasses['DTXMLParser'] = $dtgIP . '/includes/DT_XMLParser.php';
+$wgHooks['AdminLinks'][] = 'dtfAddToAdminLinks';
+$wgHooks['smwInitProperties'][] = 'dtfInitProperties';
+
+###
+# This is the path to your installation of the Data Transfer extension as
+# seen from the web. Change it if required ($wgScriptPath is the
+# path to the base directory of your wiki). No final slash.
+##
+$dtgScriptPath = $wgScriptPath . '/extensions/DataTransfer_PS';
+##
+
+###
+# Permission to import files
+###
+$wgGroupPermissions['sysop']['datatransferimport'] = true;
+$wgAvailableRights[] = 'datatransferimport';
+
+// initialize content language
+require_once($dtgIP . '/languages/DT_Language.php');
+global $wgLanguageCode;
+dtfInitContentLanguage($wgLanguageCode);
+
+$wgExtensionMessagesFiles['DataTransfer'] = $dtgIP . '/languages/DT_Messages.php';
+$wgExtensionAliasesFiles['DataTransfer'] = $dtgIP . '/languages/DT_Aliases.php';
+
+/**********************************************/
+/***** language settings *****/
+/**********************************************/
+
+/**
+ * Initialise a global language object for content language. This
+ * must happen early on, even before user language is known, to
+ * determine labels for additional namespaces. In contrast, messages
+ * can be initialised much later when they are actually needed.
+ */
+function dtfInitContentLanguage( $langcode ) {
+ global $dtgIP, $dtgContLang;
+
+ if ( !empty( $dtgContLang ) ) { return; }
+
+ $dtContLangClass = 'DT_Language' . str_replace( '-', '_', ucfirst( $langcode ) );
+
+ if ( file_exists( $dtgIP . '/languages/' . $dtContLangClass . '.php' ) ) {
+ include_once( $dtgIP . '/languages/' . $dtContLangClass . '.php' );
+ }
+
+ // fallback if language not supported
+ if ( !class_exists( $dtContLangClass ) ) {
+ include_once( $dtgIP . '/languages/DT_LanguageEn.php' );
+ $dtContLangClass = 'DT_LanguageEn';
+ }
+
+ $dtgContLang = new $dtContLangClass();
+}
+
+/**
+ * Initialise the global language object for user language. This
+ * must happen after the content language was initialised, since
+ * this language is used as a fallback.
+ */
+function dtfInitUserLanguage( $langcode ) {
+ global $dtgIP, $dtgLang;
+
+ if ( !empty( $dtgLang ) ) { return; }
+
+ $dtLangClass = 'DT_Language' . str_replace( '-', '_', ucfirst( $langcode ) );
+
+ if ( file_exists( $dtgIP . '/languages/' . $dtLangClass . '.php' ) ) {
+ include_once( $dtgIP . '/languages/' . $dtLangClass . '.php' );
+ }
+
+ // fallback if language not supported
+ if ( !class_exists( $dtLangClass ) ) {
+ global $dtgContLang;
+ $dtgLang = $dtgContLang;
+ } else {
+ $dtgLang = new $dtLangClass();
+ }
+}
+
+/**********************************************/
+/***** other global helpers *****/
+/**********************************************/
+
+function dtfInitProperties() {
+ global $dtgContLang;
+ $dt_props = $dtgContLang->getPropertyLabels();
+ SMWPropertyValue::registerProperty( '_DT_XG', '_str', $dt_props[DT_HAS_XML_GROUPING], true );
+ // TODO - this should set a "backup" English value as well,
+ // so that the phrase "Has XML grouping" works in all languages
+ return true;
+}
+
+/**
+ * Add links to the 'AdminLinks' special page, defined by the Admin Links
+ * extension
+ */
+function dtfAddToAdminLinks( $admin_links_tree ) {
+ $import_export_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_importexport' ) );
+ $main_row = $import_export_section->getRow( 'main' );
+ $main_row->addItem( ALItem::newFromSpecialPage( 'ViewXML' ) );
+ $main_row->addItem( ALItem::newFromSpecialPage( 'ImportXML' ) );
+ $main_row->addItem( ALItem::newFromSpecialPage( 'ImportCSV' ) );
+ return true;
+}
--- /dev/null
+[[Data Transfer 0.3.8]]
+
+Contents:
+* Disclaimer
+* Requirements
+* Installation
+* Contact
+
+== Disclaimer ==
+
+For a proper legal disclaimer, see the file "COPYING".
+
+== Requirements ==
+
+The extension can make use of, but does not require, an install of
+Semantic MediaWiki. If Semantic MediaWiki is used, it must be of
+version 1.0 or greater. For more details, see Semantic MediaWiki's
+own installation requirements.
+
+== Installation ==
+
+(1) Extract the archive to obtain the directory "DataTransfer"
+ that contains all relevant files. Copy this directory (or
+ extract/download it) to "[wikipath]/extensions/".
+(2) Insert the following line into the file "[wikipath]/LocalSettings.php":
+ include_once('extensions/DataTransfer/DataTransfer.php');
+
+== Contact ==
+
+If you have any issues or questions, please send them to
+yaron57@gmail.com.
--- /dev/null
+== About ==
+
+Data Transfer is an extension to MediaWiki that both exports XML
+based on the current contents of pages in a wiki, and imports pages
+in both XML format (using the same structure as the XML export) and
+CSV format. Both the XML and CSV formats use template calls, and
+the fields within them, to define the data structure. Any text that
+is not within a template calls gets placed into one or more "free
+text" fields.
+
+For more information on Data Transfer, see the extension
+homepage at
+http://www.mediawiki.org/wiki/Extension:Data_Transfer
+
+Notes on installing Data Transfer can be found in the file INSTALL.
+
+== Credits ==
+
+Data Transfer was written by Yaron Koren.
+
+== Contact ==
+
+Comments, questions, suggestions and bug reports should be
+sent to Yaron at yaron57@gmail.com.
--- /dev/null
+<?php
+
+/**
+ * Background job to import a page into the wiki, for use by Data Transfer
+ *
+ * @author Yaron Koren
+ */
+class DTImportJob extends Job {
+
+ function __construct( $title, $params = '', $id = 0 ) {
+ parent::__construct( 'dtImport', $title, $params, $id );
+ }
+
+ /**
+ * Run a dtImport job
+ * @return boolean success
+ */
+ function run() {
+ wfProfileIn( __METHOD__ );
+
+ if ( is_null( $this->title ) ) {
+ $this->error = "dtImport: Invalid title";
+ wfProfileOut( __METHOD__ );
+ return false;
+ }
+
+ $article = new Article( $this->title );
+ if ( !$article ) {
+ $this->error = 'dtImport: Article not found "' . $this->title->getPrefixedDBkey() . '"';
+ wfProfileOut( __METHOD__ );
+ return false;
+ }
+ $for_pages_that_exist = $this->params['for_pages_that_exist'];
+ if ( $for_pages_that_exist == 'skip' && $this->title->exists() ) {
+ return true;
+ }
+
+ // change global $wgUser variable to the one specified by
+ // the job only for the extent of this import
+ global $wgUser;
+ $actual_user = $wgUser;
+ $wgUser = User::newFromId( $this->params['user_id'] );
+ $text = $this->params['text'];
+ if ( $for_pages_that_exist == 'append' && $this->title->exists() ) {
+ $text = $article->getContent() . "\n" . $text;
+ }
+ $edit_summary = $this->params['edit_summary'];
+ $article->doEdit( $text, $edit_summary );
+ $wgUser = $actual_user;
+ wfProfileOut( __METHOD__ );
+ return true;
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * Utility functions for the Data Transfer extension.
+ *
+ * @author Yaron Koren
+ */
+class DTUtils {
+
+ /*
+ * Loads messages only for MediaWiki versions that need it (< 1.16)
+ */
+ public static function loadMessages() {
+ global $wgVersion;
+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
+ wfLoadExtensionMessages( 'SemanticForms' );
+ }
+ }
+
+ static function printImportingMessage() {
+ return "\t" . Xml::element( 'p', null, wfMsg( 'dt_import_importing' ) ) . "\n";
+ }
+
+ static function printFileSelector( $fileType ) {
+ $text = "\n\t" . Xml::element( 'p', null, wfMsg( 'dt_import_selectfile', $fileType ) ) . "\n";
+ $text .= <<<END
+ <p><input type="file" name="file_name" size="25" /></p>
+
+END;
+ $text .= "\t" . '<hr style="margin: 10px 0 10px 0" />' . "\n";
+ return $text;
+ }
+
+ static function printExistingPagesHandling() {
+ $text = "\t" . Xml::element( 'p', null, wfMsg( 'dt_import_forexisting' ) ) . "\n";
+ $existingPagesText = "\n\t" .
+ Xml::element( 'input',
+ array(
+ 'type' => 'radio',
+ 'name' => 'pagesThatExist',
+ 'value' => 'overwrite',
+ 'checked' => 'checked'
+ ) ) . "\n" .
+ "\t" . wfMsg( 'dt_import_overwriteexisting' ) . "<br />" . "\n" .
+ "\t" . Xml::element( 'input',
+ array(
+ 'type' => 'radio',
+ 'name' => 'pagesThatExist',
+ 'value' => 'skip',
+ ) ) . "\n" .
+ "\t" . wfMsg( 'dt_import_skipexisting' ) . "<br />" . "\n" .
+ "\t" . Xml::element( 'input',
+ array(
+ 'type' => 'radio',
+ 'name' => 'pagesThatExist',
+ 'value' => 'append',
+ ) ) . "\n" .
+ "\t" . wfMsg( 'dt_import_appendtoexisting' ) . "<br />" . "\n\t";
+ $text .= "\t" . Xml::tags( 'p', null, $existingPagesText ) . "\n";
+ $text .= "\t" . '<hr style="margin: 10px 0 10px 0" />' . "\n";
+ return $text;
+ }
+
+ static function printImportSummaryInput( $fileType ) {
+ $importSummaryText = "\t" . Xml::element( 'input',
+ array(
+ 'type' => 'text',
+ 'id' => 'wpSummary', // ID is necessary for CSS formatting
+ 'class' => 'mw-summary',
+ 'name' => 'import_summary',
+ 'value' => wfMsgForContent( 'dt_import_editsummary', $fileType )
+ )
+ ) . "\n";
+ return "\t" . Xml::tags( 'p', null,
+ wfMsg( 'dt_import_summarydesc' ) . "\n" .
+ $importSummaryText ) . "\n";
+ }
+
+ static function printSubmitButton() {
+ $formSubmitText = Xml::element( 'input',
+ array(
+ 'type' => 'submit',
+ 'name' => 'import_file',
+ 'value' => wfMsg( 'import-interwiki-submit' )
+ )
+ );
+ return "\t" . Xml::tags( 'p', null, $formSubmitText ) . "\n";
+ }
+}
--- /dev/null
+<?php
+/**
+ * Classes for parsing XML representing wiki pages and their template calls
+ *
+ * @author Yaron Koren
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) die();
+
+class DTWikiTemplate {
+ private $mName = null;
+ private $mFields = array();
+
+ public function DTWikiTemplate( $name ) {
+ $this->mName = $name;
+ }
+
+ function addField( $name, $value ) {
+ $this->mFields[$name] = $value;
+ }
+
+ function createText() {
+ $multi_line_template = false;
+ $text = '{{' . $this->mName;
+ foreach ( $this->mFields as $field_name => $field_val ) {
+ if ( is_numeric( $field_name ) ) {
+ $text .= "|$field_val";
+ } else {
+ $text .= "\n|$field_name=$field_val";
+ $multi_line_template = true;
+ }
+ }
+ if ( $multi_line_template )
+ $text .= "\n";
+ $text .= '}}' . "\n";
+ return $text;
+ }
+}
+
+class DTWikiPage {
+ private $mPageName = null;
+ private $mElements = array();
+
+ public function DTWikiPage( $name ) {
+ $this->mPageName = $name;
+ }
+
+ function getName() {
+ return $this->mPageName;
+ }
+
+ function addTemplate( $template ) {
+ $this->mElements[] = $template;
+ }
+
+ function addFreeText( $free_text ) {
+ $this->mElements[] = $free_text;
+ }
+
+ function createText() {
+ $text = "";
+ foreach ( $this->mElements as $elem ) {
+ if ( $elem instanceof DTWikiTemplate ) {
+ $text .= $elem->createText();
+ } else {
+ $text .= $elem;
+ }
+ }
+ return $text;
+ }
+}
+
+class DTXMLParser {
+ var $mDebug = false;
+ var $mSource = null;
+ var $mCurFieldName = null;
+ var $mCurFieldValue = '';
+ var $mCurTemplate = null;
+ var $mCurPage = null; // new DTWikiPage();
+ var $mPages = array();
+
+ function __construct( $source ) {
+ $this->mSource = $source;
+ }
+
+ function debug( $text ) {
+ // print "$text. ";
+ }
+
+ function throwXMLerror( $text ) {
+ print htmlspecialchars( $text );
+ }
+
+ function doParse() {
+ $parser = xml_parser_create( "UTF-8" );
+
+ # case folding violates XML standard, turn it off
+ xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
+
+ xml_set_object( $parser, $this );
+ xml_set_element_handler( $parser, "in_start", "" );
+
+ $offset = 0; // for context extraction on error reporting
+ do {
+ $chunk = $this->mSource->readChunk();
+ if ( !xml_parse( $parser, $chunk, $this->mSource->atEnd() ) ) {
+ wfDebug( "WikiImporter::doImport encountered XML parsing error\n" );
+ // return new WikiXmlError( $parser, wfMsgHtml( 'import-parse-failure' ), $chunk, $offset );
+ }
+ $offset += strlen( $chunk );
+ } while ( $chunk !== false && !$this->mSource->atEnd() );
+ xml_parser_free( $parser );
+ }
+
+ function donothing( $parser, $x, $y = "" ) {
+ # $this->debug( "donothing" );
+ }
+
+
+ function in_start( $parser, $name, $attribs ) {
+ // $this->debug( "in_start $name" );
+ $pages_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_pages' ) );
+ if ( $name != $pages_str ) {
+ print( "Expected '$pages_str', got '$name'" );
+ }
+ xml_set_element_handler( $parser, "in_pages", "out_pages" );
+ }
+
+ function in_pages( $parser, $name, $attribs ) {
+ $this->debug( "in_pages $name" );
+ $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
+ if ( $name == $page_str ) {
+ $title_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_title' ) );
+ if ( array_key_exists( $title_str, $attribs ) ) {
+ $this->mCurPage = new DTWikiPage( $attribs[$title_str] );
+ xml_set_element_handler( $parser, "in_page", "out_page" );
+ } else {
+ return $this->throwXMLerror( "'$title_str' attribute missing for page" );
+ }
+ } else {
+ return $this->throwXMLerror( "Expected <$page_str>, got <$name>" );
+ }
+ }
+
+ function out_pages( $parser, $name ) {
+ $this->debug( "out_pages $name" );
+ $pages_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_pages' ) );
+/*
+ if( $name != $pages_str ) {
+ return $this->throwXMLerror( "Expected </pages>, got </$name>" );
+ }
+*/
+ xml_set_element_handler( $parser, "donothing", "donothing" );
+ }
+
+ function in_category( $parser, $name, $attribs ) {
+ $this->debug( "in_category $name" );
+ $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
+ if ( $name == $page_str ) {
+ if ( array_key_exists( $title_str, $attribs ) ) {
+ $this->mCurPage = new DTWikiPage( $attribs[$title_str] );
+ xml_set_element_handler( $parser, "in_page", "out_page" );
+ } else {
+ return $this->throwXMLerror( "'$title_str' attribute missing for page" );
+ }
+ } else {
+ return $this->throwXMLerror( "Expected <$page_str>, got <$name>" );
+ }
+ }
+
+ function out_category( $parser, $name ) {
+ $this->debug( "out_category $name" );
+ if ( $name != "category" ) {
+ return $this->throwXMLerror( "Expected </category>, got </$name>" );
+ }
+ xml_set_element_handler( $parser, "donothing", "donothing" );
+ }
+
+ function in_page( $parser, $name, $attribs ) {
+ $this->debug( "in_page $name" );
+ $template_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_template' ) );
+ $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
+ $free_text_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_freetext' ) );
+ if ( $name == $template_str ) {
+ if ( array_key_exists( $name_str, $attribs ) ) {
+ $this->mCurTemplate = new DTWikiTemplate( $attribs[$name_str] );
+ xml_set_element_handler( $parser, "in_template", "out_template" );
+ } else {
+ return $this->throwXMLerror( "'$name_str' attribute missing for template" );
+ }
+ } elseif ( $name == $free_text_str ) {
+ xml_set_element_handler( $parser, "in_freetext", "out_freetext" );
+ xml_set_character_data_handler( $parser, "freetext_value" );
+ } else {
+ return $this->throwXMLerror( "Expected <$template_str>, got <$name>" );
+ }
+ }
+
+ function out_page( $parser, $name ) {
+ $this->debug( "out_page $name" );
+ $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
+ if ( $name != $page_str ) {
+ return $this->throwXMLerror( "Expected </$page_str>, got </$name>" );
+ }
+ $this->mPages[] = $this->mCurPage;
+ xml_set_element_handler( $parser, "in_pages", "out_pages" );
+ }
+
+ function in_template( $parser, $name, $attribs ) {
+ $this->debug( "in_template $name" );
+ $field_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_field' ) );
+ if ( $name == $field_str ) {
+ $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
+ if ( array_key_exists( $name_str, $attribs ) ) {
+ $this->mCurFieldName = $attribs[$name_str];
+ // $this->push( $name );
+ $this->workRevisionCount = 0;
+ $this->workSuccessCount = 0;
+ $this->uploadCount = 0;
+ $this->uploadSuccessCount = 0;
+ xml_set_element_handler( $parser, "in_field", "out_field" );
+ xml_set_character_data_handler( $parser, "field_value" );
+ } else {
+ return $this->throwXMLerror( "'$name_str' attribute missing for field" );
+ }
+ } else {
+ return $this->throwXMLerror( "Expected <$field_str>, got <$name>" );
+ }
+ }
+
+ function out_template( $parser, $name ) {
+ $this->debug( "out_template $name" );
+ $template_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_template' ) );
+ if ( $name != $template_str ) {
+ return $this->throwXMLerror( "Expected </$template_str>, got </$name>" );
+ }
+ $this->mCurPage->addTemplate( $this->mCurTemplate );
+ xml_set_element_handler( $parser, "in_page", "out_page" );
+ }
+
+ function in_field( $parser, $name, $attribs ) {
+ // xml_set_element_handler( $parser, "donothing", "donothing" );
+ }
+
+ function out_field( $parser, $name ) {
+ $this->debug( "out_field $name" );
+ $field_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_field' ) );
+ if ( $name == $field_str ) {
+ $this->mCurTemplate->addField( $this->mCurFieldName, $this->mCurFieldValue );
+ $this->mCurFieldValue = '';
+ } else {
+ return $this->throwXMLerror( "Expected </$field_str>, got </$name>" );
+ }
+ xml_set_element_handler( $parser, "in_template", "out_template" );
+ }
+
+ function field_value( $parser, $data ) {
+ $this->mCurFieldValue .= $data;
+ }
+
+ function in_freetext( $parser, $name, $attribs ) {
+ // xml_set_element_handler( $parser, "donothing", "donothing" );
+ }
+
+ function out_freetext( $parser, $name ) {
+ xml_set_element_handler( $parser, "in_page", "out_page" );
+ }
+
+ function freetext_value( $parser, $data ) {
+ $this->mCurPage->addFreeText( $data );
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Aliases for special pages
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$specialPageAliases = array();
+
+/** English (English) */
+$specialPageAliases['en'] = array(
+ 'ImportCSV' => array( 'ImportCSV' ),
+ 'ImportXML' => array( 'ImportXML' ),
+ 'ViewXML' => array( 'ViewXML' ),
+);
+
+/** Afrikaans (Afrikaans) */
+$specialPageAliases['af'] = array(
+ 'ViewXML' => array( 'WysXML' ),
+);
+
+/** Arabic (العربية) */
+$specialPageAliases['ar'] = array(
+ 'ViewXML' => array( 'عرض_إكس_إم_إل' ),
+);
+
+/** Egyptian Spoken Arabic (مصرى) */
+$specialPageAliases['arz'] = array(
+ 'ViewXML' => array( 'عرض_XML' ),
+);
+
+/** Breton (Brezhoneg) */
+$specialPageAliases['br'] = array(
+ 'ViewXML' => array( 'GweletXML' ),
+);
+
+/** Bosnian (Bosanski) */
+$specialPageAliases['bs'] = array(
+ 'ViewXML' => array( 'VidiXML' ),
+);
+
+/** German (Deutsch) */
+$specialPageAliases['de'] = array(
+ 'ImportCSV' => array( 'CSV_importieren' ),
+ 'ImportXML' => array( 'XML_importieren' ),
+ 'ViewXML' => array( 'XML_anzeigen' ),
+);
+
+/** Esperanto (Esperanto) */
+$specialPageAliases['eo'] = array(
+ 'ViewXML' => array( 'Montri_XML' ),
+);
+
+/** Spanish (Español) */
+$specialPageAliases['es'] = array(
+ 'ViewXML' => array( 'Ver_XML', 'VerXML' ),
+);
+
+/** Basque (Euskara) */
+$specialPageAliases['eu'] = array(
+ 'ViewXML' => array( 'XMLIkusi' ),
+);
+
+/** Persian (فارسی) */
+$specialPageAliases['fa'] = array(
+ 'ImportCSV' => array( 'درونریزی_سیاسوی' ),
+ 'ImportXML' => array( 'درونریزی_اکسامال' ),
+ 'ViewXML' => array( 'مشاهده_اکسامال' ),
+);
+
+/** Finnish (Suomi) */
+$specialPageAliases['fi'] = array(
+ 'ImportCSV' => array( 'Tuo_CSV' ),
+ 'ImportXML' => array( 'Tuo_XML' ),
+ 'ViewXML' => array( 'Näytä_XML' ),
+);
+
+/** French (Français) */
+$specialPageAliases['fr'] = array(
+ 'ImportCSV' => array( 'Importer_CVS', 'ImporterCVS' ),
+ 'ImportXML' => array( 'Importer_XML', 'ImporterXML' ),
+ 'ViewXML' => array( 'Voir_le_XML', 'Voir_XML', 'VoirXML' ),
+);
+
+/** Franco-Provençal (Arpetan) */
+$specialPageAliases['frp'] = array(
+ 'ViewXML' => array( 'Vêre_lo_XML', 'VêreLoXML' ),
+);
+
+/** Galician (Galego) */
+$specialPageAliases['gl'] = array(
+ 'ViewXML' => array( 'Ver XML' ),
+);
+
+/** Swiss German (Alemannisch) */
+$specialPageAliases['gsw'] = array(
+ 'ViewXML' => array( 'Lueg XML' ),
+);
+
+/** Gujarati (ગુજરાતી) */
+$specialPageAliases['gu'] = array(
+ 'ViewXML' => array( 'XMLજુઓ' ),
+);
+
+/** Hungarian (Magyar) */
+$specialPageAliases['hu'] = array(
+ 'ViewXML' => array( 'XML_megtekintése' ),
+);
+
+/** Interlingua (Interlingua) */
+$specialPageAliases['ia'] = array(
+ 'ImportCSV' => array( 'Importar_CSV' ),
+ 'ImportXML' => array( 'Importar_XML' ),
+ 'ViewXML' => array( 'Visualisar_XML' ),
+);
+
+/** Indonesian (Bahasa Indonesia) */
+$specialPageAliases['id'] = array(
+ 'ViewXML' => array( 'Lihat_XML', 'LihatXML' ),
+);
+
+/** Italian (Italiano) */
+$specialPageAliases['it'] = array(
+ 'ImportCSV' => array( 'ImportaCSV' ),
+ 'ImportXML' => array( 'ImportaXML' ),
+ 'ViewXML' => array( 'VediXML' ),
+);
+
+/** Japanese (日本語) */
+$specialPageAliases['ja'] = array(
+ 'ImportCSV' => array( 'CSVインポート' ),
+ 'ImportXML' => array( 'XMLインポート' ),
+ 'ViewXML' => array( 'XML表示', 'XML表示' ),
+);
+
+/** Khmer (ភាសាខ្មែរ) */
+$specialPageAliases['km'] = array(
+ 'ViewXML' => array( 'មើលXML' ),
+);
+
+/** Colognian (Ripoarisch) */
+$specialPageAliases['ksh'] = array(
+ 'ImportCSV' => array( 'CSV_Empotteere' ),
+ 'ImportXML' => array( 'XML_Empoteere' ),
+ 'ViewXML' => array( 'XML_beloore' ),
+);
+
+/** Ladino (Ladino) */
+$specialPageAliases['lad'] = array(
+ 'ImportCSV' => array( 'Aktarear_CSV_Ariento' ),
+ 'ImportXML' => array( 'Aktarear_XML_Ariento' ),
+ 'ViewXML' => array( 'Ver_XML' ),
+);
+
+/** Luxembourgish (Lëtzebuergesch) */
+$specialPageAliases['lb'] = array(
+ 'ImportCSV' => array( 'CSV_importéieren' ),
+ 'ImportXML' => array( 'XML_importéieren' ),
+ 'ViewXML' => array( 'XML_weisen' ),
+);
+
+/** Macedonian (Македонски) */
+$specialPageAliases['mk'] = array(
+ 'ViewXML' => array( 'ВидиXML' ),
+);
+
+/** Malayalam (മലയാളം) */
+$specialPageAliases['ml'] = array(
+ 'ImportCSV' => array( 'സി.എസ്.വി.ഇറക്കുമതി' ),
+ 'ImportXML' => array( 'എക്സ്.എം.എൽ.ഇറക്കുമതി' ),
+ 'ViewXML' => array( 'എക്സ്.എം.എൽ.കാണുക' ),
+);
+
+/** Marathi (मराठी) */
+$specialPageAliases['mr'] = array(
+ 'ViewXML' => array( 'XMLपहा' ),
+);
+
+/** Maltese (Malti) */
+$specialPageAliases['mt'] = array(
+ 'ViewXML' => array( 'UriXML' ),
+);
+
+/** Nedersaksisch (Nedersaksisch) */
+$specialPageAliases['nds-nl'] = array(
+ 'ViewXML' => array( 'XML_bekieken' ),
+);
+
+/** Dutch (Nederlands) */
+$specialPageAliases['nl'] = array(
+ 'ImportCSV' => array( 'CSVImporteren' ),
+ 'ImportXML' => array( 'XMLImporteren' ),
+ 'ViewXML' => array( 'XMLBekijken' ),
+);
+
+/** Norwegian (bokmål) (Norsk (bokmål)) */
+$specialPageAliases['no'] = array(
+ 'ViewXML' => array( 'Vis_XML' ),
+);
+
+/** Occitan (Occitan) */
+$specialPageAliases['oc'] = array(
+ 'ViewXML' => array( 'Veire_XML', 'VeireXML' ),
+);
+
+/** Polish (Polski) */
+$specialPageAliases['pl'] = array(
+ 'ViewXML' => array( 'XML' ),
+);
+
+/** Portuguese (Português) */
+$specialPageAliases['pt'] = array(
+ 'ViewXML' => array( 'Ver_XML' ),
+);
+
+/** Romanian (Română) */
+$specialPageAliases['ro'] = array(
+ 'ImportCSV' => array( 'Import_CSV', 'ImportCSV' ),
+ 'ImportXML' => array( 'Import_XML', 'ImportXML' ),
+ 'ViewXML' => array( 'Vizualizare_XML' ),
+);
+
+/** Sanskrit (संस्कृत) */
+$specialPageAliases['sa'] = array(
+ 'ViewXML' => array( 'XMLपश्यति' ),
+);
+
+/** Slovak (Slovenčina) */
+$specialPageAliases['sk'] = array(
+ 'ViewXML' => array( 'ZobraziťXML' ),
+);
+
+/** Albanian (Shqip) */
+$specialPageAliases['sq'] = array(
+ 'ViewXML' => array( 'ShihXML' ),
+);
+
+/** Swedish (Svenska) */
+$specialPageAliases['sv'] = array(
+ 'ViewXML' => array( 'Visa_XML' ),
+);
+
+/** Swahili (Kiswahili) */
+$specialPageAliases['sw'] = array(
+ 'ViewXML' => array( 'OnyeshaXML' ),
+);
+
+/** Tagalog (Tagalog) */
+$specialPageAliases['tl'] = array(
+ 'ViewXML' => array( 'Tingnan ang XML' ),
+);
+
+/** Turkish (Türkçe) */
+$specialPageAliases['tr'] = array(
+ 'ViewXML' => array( 'XMLGör' ),
+);
+
+/** Татарча (Татарча) */
+$specialPageAliases['tt-cyrl'] = array(
+ 'ImportCSV' => array( 'CSV_импорт' ),
+ 'ImportXML' => array( 'XML_импорт' ),
+ 'ViewXML' => array( 'XML_иттереп_ачу' ),
+);
+
+/** Vèneto (Vèneto) */
+$specialPageAliases['vec'] = array(
+ 'ViewXML' => array( 'VardaXML' ),
+);
+
+/**
+ * For backwards compatibility with MediaWiki 1.15 and earlier.
+ */
+$aliases =& $specialPageAliases;
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * @author Yaron Koren
+ */
+
+/**
+ * Base class for all language classes - heavily based on Semantic MediaWiki's
+ * 'SMW_Language' class
+ */
+abstract class DT_Language {
+
+ protected $m_SpecialProperties;
+
+ // By default, every language has English-language aliases for
+ // special properties
+ protected $m_SpecialPropertyAliases = array(
+ 'Has XML grouping' => DT_SP_HAS_XML_GROUPING,
+ 'Excluded from XML' => DT_SP_IS_EXCLUDED_FROM_XML,
+ );
+
+ /**
+ * Function that returns the labels for the special properties.
+ */
+ function getPropertyLabels() {
+ return $this->m_SpecialProperties;
+ }
+
+ /**
+ * Aliases for special properties, if any.
+ */
+ function getPropertyAliases() {
+ return $this->m_SpecialPropertyAliases;
+ }
+}
--- /dev/null
+<?php
+/**
+ * @author Yaron Koren
+ */
+
+class DT_LanguageEn extends DT_Language {
+
+/* private */ var $m_SpecialProperties = array(
+ DT_SP_HAS_XML_GROUPING => 'Has XML grouping',
+ DT_SP_IS_EXCLUDED_FROM_XML => 'Excluded from XML'
+);
+
+}
--- /dev/null
+<?php
+/**
+ * Internationalization file for the Data Transfer extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+/** English
+ * @author Yaron Koren
+ */
+$messages['en'] = array(
+ 'datatransfer-desc' => 'Allows for importing and exporting data contained in template calls',
+ 'viewxml' => 'View XML',
+ 'dt_viewxml_docu' => 'Please select among the following categories and namespaces to view in XML format.',
+ 'dt_viewxml_categories' => 'Categories',
+ 'dt_viewxml_namespaces' => 'Namespaces',
+ 'dt_viewxml_simplifiedformat' => 'Simplified format',
+ 'dt_xml_namespace' => 'Namespace',
+ 'dt_xml_pages' => 'Pages',
+ 'dt_xml_page' => 'Page',
+ 'dt_xml_template' => 'Template',
+ 'dt_xml_field' => 'Field',
+ 'dt_xml_name' => 'Name',
+ 'dt_xml_title' => 'Title',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Free Text',
+ 'importxml' => 'Import XML',
+ 'dt_import_selectfile' => 'Please select the $1 file to import:',
+ 'dt_import_encodingtype' => 'Encoding type:',
+ 'dt_import_forexisting' => 'For pages that already exist:',
+ 'dt_import_overwriteexisting' => 'Overwrite existing content',
+ 'dt_import_skipexisting' => 'Skip',
+ 'dt_import_appendtoexisting' => 'Append to existing content',
+ 'dt_import_summarydesc' => 'Summary of import:',
+ 'dt_import_editsummary' => '$1 import',
+ 'dt_import_importing' => 'Importing...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|page|pages}} will be created from the $2 file.',
+ 'importcsv' => 'Import CSV',
+ 'dt_importcsv_badheader' => "Error: the column $1 header, '$2', must be either '$3', '$4' or of the form 'template_name[field_name]'",
+ 'right-datatransferimport' => 'Import data',
+);
+
+/** Message documentation (Message documentation)
+ * @author EugeneZelenko
+ * @author Fryed-peach
+ * @author Jon Harald Søby
+ * @author Purodha
+ * @author Raymond
+ * @author Siebrand
+ */
+$messages['qqq'] = array(
+ 'datatransfer-desc' => 'Extension description displayed on [[Special:Version]].',
+ 'dt_viewxml_categories' => '{{Identical|Categories}}',
+ 'dt_viewxml_namespaces' => '{{Identical|Namespaces}}',
+ 'dt_xml_namespace' => '{{Identical|Namespace}}
+Used as XML tag name.',
+ 'dt_xml_pages' => '{{Identical|Pages}}
+
+Used as XML tag name.',
+ 'dt_xml_page' => '{{Identical|Page}}
+Used as XML tag name.',
+ 'dt_xml_template' => '{{Identical|Template}}
+Used as XML tag name.',
+ 'dt_xml_field' => '{{Identical|Field}}
+Used as XML tag name.',
+ 'dt_xml_name' => '{{Identical|Name}}
+
+Used as XML tag name.',
+ 'dt_xml_title' => '{{Identical|Title}}
+Used as XML tag name.',
+ 'dt_xml_id' => '{{Identical|ID}}
+
+Used as XML tag name.',
+ 'dt_xml_freetext' => '{{Identical|Free text}}
+Used as XML tag name.',
+ 'dt_import_selectfile' => '$1 is the file format: either CSV or XML',
+ 'dt_import_encodingtype' => 'The type of encoding for the file: either UTF-8 or UTF-16',
+ 'dt_import_skipexisting' => '{{Identical|Skip}}',
+ 'dt_import_editsummary' => '$1 is the file format: either CSV or XML',
+ 'dt_import_success' => 'Parameters:
+* $1 is the number of pages
+* $2 is the file format: either CSV or XML',
+ 'dt_importcsv_badheader' => 'The text "template_name[field_name]" can be translated.
+*$1 is a column number in the first row of the CVS file
+*$2 is the value found for the $1th colomn in the first line of the CSV file
+*$3 is the title label
+*$4 is a free text label',
+ 'right-datatransferimport' => '{{doc-right}}',
+);
+
+/** Faeag Rotuma (Faeag Rotuma)
+ * @author Jose77
+ */
+$messages['rtm'] = array(
+ 'dt_viewxml_categories' => 'Katekori',
+);
+
+/** Afrikaans (Afrikaans)
+ * @author Arnobarnard
+ * @author Naudefj
+ */
+$messages['af'] = array(
+ 'datatransfer-desc' => 'Maak die laai en ontlaai van gestruktureerde gegewens in sjabloonaanroepe moontlik',
+ 'viewxml' => 'Sien XML',
+ 'dt_viewxml_docu' => 'Kies een van die volgende kategorieë en naamruimtes om in XML-formaat te sien.',
+ 'dt_viewxml_categories' => 'Ketagorieë',
+ 'dt_viewxml_namespaces' => 'Naamruimtes',
+ 'dt_viewxml_simplifiedformat' => 'Vereenvoudigde formaat',
+ 'dt_xml_namespace' => 'Naamruimte',
+ 'dt_xml_pages' => 'Bladsye',
+ 'dt_xml_page' => 'Bladsy',
+ 'dt_xml_template' => 'Sjabloon',
+ 'dt_xml_field' => 'Veld',
+ 'dt_xml_name' => 'Naam',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Vrye teks',
+ 'importxml' => 'Laai XML',
+ 'dt_import_selectfile' => 'Kies die $1 lêer om te laai:',
+ 'dt_import_encodingtype' => 'Enkoderingstipe:',
+ 'dt_import_skipexisting' => 'Slaan oor',
+ 'dt_import_editsummary' => '$1-laai',
+ 'dt_import_importing' => 'Besig om te laai...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|bladsy|bladsye}} sal geskep word vanaf die lêer $2.',
+ 'importcsv' => 'Laai CSV',
+ 'dt_importcsv_badheader' => 'Fout: Die opskrif van kolom $1, "$2", moet "$3" of "$4" wees, of in die vorm "sjabloonnaam[veldnaam]" genoteer word.',
+ 'right-datatransferimport' => 'Laai data',
+);
+
+/** Gheg Albanian (Gegë)
+ * @author Mdupont
+ */
+$messages['aln'] = array(
+ 'datatransfer-desc' => 'Lejon për import dhe eksport të dhënave të përmbajtura në modelin e quan',
+ 'viewxml' => 'Shiko XML',
+ 'dt_viewxml_docu' => 'Ju lutem zgjidhni midis kategorive të mëposhtme dhe hapësira për të parë në formatin XML.',
+ 'dt_viewxml_categories' => 'Kategoritë',
+ 'dt_viewxml_namespaces' => 'Hapësira',
+ 'dt_viewxml_simplifiedformat' => 'Formati i thjeshtuar',
+ 'dt_xml_namespace' => 'Hapësira',
+ 'dt_xml_pages' => 'Faqet',
+ 'dt_xml_page' => 'Faqe',
+ 'dt_xml_template' => 'Shabllon',
+ 'dt_xml_field' => 'Fushë',
+ 'dt_xml_name' => 'Emër',
+ 'dt_xml_title' => 'Titull',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Free Tekst',
+ 'importxml' => 'Importi XML',
+ 'dt_import_selectfile' => 'Ju lutem përzgjidhni kartelën $1 për të importuar:',
+ 'dt_import_encodingtype' => 'Encoding lloj:',
+ 'dt_import_editsummary' => '$1 importit',
+ 'dt_import_importing' => 'Importimi ...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|faqe|faqe}} do të krijohet nga file $2.',
+ 'importcsv' => 'Importi CSV',
+ 'dt_importcsv_badheader' => "Gabim: $1 column header, '$2', duhet të jenë ose '$3', '$4' ose të formës 'template_name [field_name]'",
+ 'right-datatransferimport' => 'Të dhënat e importit',
+);
+
+/** Amharic (አማርኛ)
+ * @author Codex Sinaiticus
+ */
+$messages['am'] = array(
+ 'dt_viewxml_categories' => 'መደቦች',
+ 'dt_viewxml_namespaces' => 'ክፍለ-ዊኪዎች',
+ 'dt_xml_namespace' => 'ክፍለ-ዊኪ',
+ 'dt_xml_name' => 'ስም',
+ 'dt_xml_title' => 'አርዕስት',
+);
+
+/** Aragonese (Aragonés)
+ * @author Juanpabl
+ * @author Remember the dot
+ */
+$messages['an'] = array(
+ 'dt_viewxml_namespaces' => 'Espacios de nombres',
+ 'dt_xml_namespace' => 'Espacio de nombres',
+ 'dt_xml_page' => 'Pachina',
+ 'dt_xml_template' => 'Plantilla',
+ 'dt_xml_name' => 'Nombre',
+);
+
+/** Arabic (العربية)
+ * @author Meno25
+ * @author OsamaK
+ */
+$messages['ar'] = array(
+ 'datatransfer-desc' => 'يسمح باستيراد وتصدير بيانات محتواة في استدعاءات قالب',
+ 'viewxml' => 'عرض XML',
+ 'dt_viewxml_docu' => 'من فضلك اختر من بين التصنيفات والنطاقات التالية للعرض في صيغة XML.',
+ 'dt_viewxml_categories' => 'تصنيفات',
+ 'dt_viewxml_namespaces' => 'نطاقات',
+ 'dt_viewxml_simplifiedformat' => 'صيغة مبسطة',
+ 'dt_xml_namespace' => 'نطاق',
+ 'dt_xml_pages' => 'صفحات',
+ 'dt_xml_page' => 'صفحة',
+ 'dt_xml_template' => 'قالب',
+ 'dt_xml_field' => 'حقل',
+ 'dt_xml_name' => 'اسم',
+ 'dt_xml_title' => 'عنوان',
+ 'dt_xml_id' => 'رقم',
+ 'dt_xml_freetext' => 'نص حر',
+ 'importxml' => 'استيراد XML',
+ 'dt_import_selectfile' => 'من فضلك اختر ملف $1 للاستيراد:',
+ 'dt_import_encodingtype' => 'نوع الترميز:',
+ 'dt_import_editsummary' => 'استيراد $1',
+ 'dt_import_importing' => 'جاري الاستيراد...',
+ 'dt_import_success' => 'سوف تُنشأ {{PLURAL:$1||صفحة واحدة|صفحتين|$1 صفحات|$1 صفحة}} من ملف $2.',
+ 'importcsv' => 'استورد CSV',
+ 'dt_importcsv_badheader' => "خطأ: عنوان العامود $1، '$2'، يجب أن يكون إما '$3'، '$4' أو من الصيغة 'template_name[field_name]'",
+ 'right-datatransferimport' => 'استورد بيانات',
+);
+
+/** Aramaic (ܐܪܡܝܐ)
+ * @author Basharh
+ */
+$messages['arc'] = array(
+ 'dt_viewxml_categories' => 'ܣܕܪ̈ܐ',
+ 'dt_viewxml_namespaces' => 'ܚܩܠܬ̈ܐ',
+ 'dt_xml_namespace' => 'ܚܩܠܐ',
+ 'dt_xml_pages' => 'ܕ̈ܦܐ',
+ 'dt_xml_page' => 'ܕܦܐ',
+ 'dt_xml_template' => 'ܩܠܒܐ',
+ 'dt_xml_name' => 'ܫܡܐ',
+ 'dt_xml_title' => 'ܟܘܢܝܐ',
+ 'dt_xml_id' => 'ܗܝܝܘܬܐ',
+ 'dt_import_summarydesc' => 'ܦܣܝܩܬ̈ܐ ܕܡܥܠܢܘܬܐ:',
+ 'right-datatransferimport' => 'ܡܥܠܢܘܬܐ ܕܓܠܝܬ̈ܐ',
+);
+
+/** Araucanian (Mapudungun)
+ * @author Remember the dot
+ */
+$messages['arn'] = array(
+ 'dt_xml_page' => 'Pakina',
+);
+
+/** Egyptian Spoken Arabic (مصرى)
+ * @author Dudi
+ * @author Ghaly
+ * @author Meno25
+ */
+$messages['arz'] = array(
+ 'datatransfer-desc' => 'بيسمح بـ import و export للداتا اللى جوّا القالب',
+ 'viewxml' => 'شوف XML',
+ 'dt_viewxml_docu' => 'لو سمحت اختار من التصانيف و اسامى المساحات الجايه علشان العرض فى XML format.',
+ 'dt_viewxml_categories' => 'تصانيف',
+ 'dt_viewxml_namespaces' => 'مساحات اسامى',
+ 'dt_viewxml_simplifiedformat' => 'format متبسطه',
+ 'dt_xml_namespace' => 'اسم مساحه',
+ 'dt_xml_pages' => 'صفح',
+ 'dt_xml_page' => 'صفحه',
+ 'dt_xml_template' => 'قالب',
+ 'dt_xml_field' => 'حقل',
+ 'dt_xml_name' => 'اسم',
+ 'dt_xml_title' => 'عنوان',
+ 'dt_xml_id' => 'رقم',
+ 'dt_xml_freetext' => 'نص حر',
+ 'dt_import_selectfile' => 'لو سمحت اختار فايل $1 علشان تعمل import:',
+ 'dt_import_editsummary' => 'استوراد $1',
+ 'dt_import_success' => '$1 {{PLURAL:$1|صفحه|صفحه}} ح يتعملو من الفايل $2.',
+);
+
+/** Belarusian (Беларуская)
+ * @author Тест
+ */
+$messages['be'] = array(
+ 'dt_viewxml_categories' => 'Катэгорыі',
+ 'dt_xml_template' => 'Шаблон',
+);
+
+/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
+ * @author EugeneZelenko
+ * @author Jim-by
+ * @author Wizardist
+ */
+$messages['be-tarask'] = array(
+ 'datatransfer-desc' => 'Дазваляе імпартаваць і экспартаваць зьвесткі, якія ўтрымліваюцца ў выкліках шаблёнах',
+ 'viewxml' => 'Паказаць XML',
+ 'dt_viewxml_docu' => 'Калі ласка, выберыце што праглядаць у фармаце XML сярод наступных катэгорыяў і прастораў назваў.',
+ 'dt_viewxml_categories' => 'Катэгорыі',
+ 'dt_viewxml_namespaces' => 'Прасторы назваў',
+ 'dt_viewxml_simplifiedformat' => 'Спрошчаны фармат',
+ 'dt_xml_namespace' => 'Прастора назваў',
+ 'dt_xml_pages' => 'Старонкі',
+ 'dt_xml_page' => 'Старонка',
+ 'dt_xml_template' => 'Шаблён',
+ 'dt_xml_field' => 'Поле',
+ 'dt_xml_name' => 'Назва',
+ 'dt_xml_title' => 'Назва',
+ 'dt_xml_id' => 'Ідэнтыфікатар',
+ 'dt_xml_freetext' => 'Вольны тэкст',
+ 'importxml' => 'Імпарт XML',
+ 'dt_import_selectfile' => 'Калі ласка, выберыце файл у фармаце $1 для імпарту:',
+ 'dt_import_encodingtype' => 'Тып кадыроўкі:',
+ 'dt_import_forexisting' => 'Для старонак якія ўжо існуюць:',
+ 'dt_import_overwriteexisting' => 'Перазапісваць існуючы зьмест',
+ 'dt_import_skipexisting' => 'Прапускаць',
+ 'dt_import_appendtoexisting' => 'Далучаць да існуючага зьместу',
+ 'dt_import_summarydesc' => 'Кароткае апісаньне імпарту:',
+ 'dt_import_editsummary' => 'імпарт $1',
+ 'dt_import_importing' => 'Імпартаваньне...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|старонка будзе|старонкі будуць|старонак будзе}} створана з файла ў фармаце $2.',
+ 'importcsv' => 'Імпарт CSV',
+ 'dt_importcsv_badheader' => "Памылка: загаловак слупка $1, '$2', павінен быць адным з '$3', '$4' альбо у форме 'назва_шаблёну[назва_поля]'",
+ 'right-datatransferimport' => 'імпарт зьвестак',
+);
+
+/** Bulgarian (Български)
+ * @author DCLXVI
+ */
+$messages['bg'] = array(
+ 'viewxml' => 'Преглед на XML',
+ 'dt_viewxml_categories' => 'Категории',
+ 'dt_viewxml_namespaces' => 'Именни пространства',
+ 'dt_viewxml_simplifiedformat' => 'Опростен формат',
+ 'dt_xml_namespace' => 'Именно пространство',
+ 'dt_xml_pages' => 'Страници',
+ 'dt_xml_page' => 'Страница',
+ 'dt_xml_template' => 'Шаблон',
+ 'dt_xml_field' => 'Поле',
+ 'dt_xml_name' => 'Име',
+ 'dt_xml_title' => 'Заглавие',
+ 'dt_xml_id' => 'Номер',
+ 'dt_xml_freetext' => 'Свободен текст',
+ 'importxml' => 'Внасяне на XML',
+ 'dt_import_importing' => 'Внасяне...',
+ 'importcsv' => 'Внасяне на CSV',
+ 'right-datatransferimport' => 'Внасяне на данни',
+);
+
+/** Breton (Brezhoneg)
+ * @author Fohanno
+ * @author Fulup
+ * @author Gwendal
+ * @author Y-M D
+ */
+$messages['br'] = array(
+ 'datatransfer-desc' => 'Aotreañ a ra da enporzhiañ hag ezporzhiañ roadennoù eus galvoù patromoù',
+ 'viewxml' => 'Gwelet XML',
+ 'dt_viewxml_docu' => 'Dibabit e-touez ar rummadoù hag an esaouennoù anv da heul evit gwelet er furmad XML.',
+ 'dt_viewxml_categories' => 'Rummadoù',
+ 'dt_viewxml_namespaces' => 'Esaouennoù anv',
+ 'dt_viewxml_simplifiedformat' => 'Furmad eeunaet',
+ 'dt_xml_namespace' => 'Esaouenn anv',
+ 'dt_xml_pages' => 'Pajennoù',
+ 'dt_xml_page' => 'Pajenn',
+ 'dt_xml_template' => 'Patrom',
+ 'dt_xml_field' => 'Maezienn',
+ 'dt_xml_name' => 'Anv',
+ 'dt_xml_title' => 'Titl',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Testenn dieub',
+ 'importxml' => 'Enporzhiañ XML',
+ 'dt_import_selectfile' => 'Dibabit ar restr $1 da enporzhiañ :',
+ 'dt_import_encodingtype' => 'Seurt enkodadur :',
+ 'dt_import_forexisting' => 'Evit pajennoù zo anezho dija :',
+ 'dt_import_overwriteexisting' => "erlec'hiañ an endalc'had zo anezhañ dija",
+ 'dt_import_skipexisting' => 'Lezel a-gostez',
+ 'dt_import_appendtoexisting' => "Ouzhpennañ d'an endalc'had zo anezhañ dija",
+ 'dt_import_summarydesc' => 'Diverradenn an enporzh :',
+ 'dt_import_editsummary' => 'Enporzhiadur $1',
+ 'dt_import_importing' => "Oc'h enporzhiañ...",
+ 'dt_import_success' => '$1 {{PLURAL:$1|bajenn|pajenn}} a vo krouet diwar ar restr $2.',
+ 'importcsv' => 'Enporzh CSV',
+ 'dt_importcsv_badheader' => 'Fazi : titl ar bann $1, "$2", a rank bezañ "$3", "$4" pe gant ar stumm "anv_ar_patrom[anv_ar_vaezienn]"',
+ 'right-datatransferimport' => 'Enporzhiañ roadennoù',
+);
+
+/** Bosnian (Bosanski)
+ * @author CERminator
+ */
+$messages['bs'] = array(
+ 'datatransfer-desc' => 'Omogućuje uvoz i izvoz podataka koji su sadržani u pozivima šablona',
+ 'viewxml' => 'Pregledaj XML',
+ 'dt_viewxml_docu' => 'Molimo Vas odaberite unutar slijedećih kategorija i imenskih prostora za pregled u XML formatu.',
+ 'dt_viewxml_categories' => 'Kategorije',
+ 'dt_viewxml_namespaces' => 'Imenski prostori',
+ 'dt_viewxml_simplifiedformat' => 'Pojednostavljeni format',
+ 'dt_xml_namespace' => 'Imenski prostor',
+ 'dt_xml_pages' => 'Stranice',
+ 'dt_xml_page' => 'Stranica',
+ 'dt_xml_template' => 'Šablon',
+ 'dt_xml_field' => 'Polje',
+ 'dt_xml_name' => 'Naziv',
+ 'dt_xml_title' => 'Naslov',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Slobodni tekst',
+ 'importxml' => 'Uvezi XML',
+ 'dt_import_selectfile' => 'Molimo odaberite $1 datoteku za uvoz:',
+ 'dt_import_encodingtype' => 'Tip šifriranja:',
+ 'dt_import_forexisting' => 'Za stranice koje već postoje:',
+ 'dt_import_overwriteexisting' => 'Piši preko postojećeg sadržaja',
+ 'dt_import_skipexisting' => 'Preskoči',
+ 'dt_import_appendtoexisting' => 'Dodaj na postojeći sadržaj',
+ 'dt_import_summarydesc' => 'Sažetak uvoza:',
+ 'dt_import_editsummary' => '$1 uvoz',
+ 'dt_import_importing' => 'Uvoz...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|stranica|stranice|stranica}} će biti napravljeno iz $2 datoteke.',
+ 'importcsv' => 'Uvoz CSV',
+ 'dt_importcsv_badheader' => "Greška: zaglavlje $1 kolone, '$2', mora biti ili '$3', '$4' ili od obrasca 'template_name[field_name]'",
+ 'right-datatransferimport' => 'Uvoz podataka',
+);
+
+/** Catalan (Català)
+ * @author Jordi Roqué
+ * @author SMP
+ * @author Solde
+ * @author Toniher
+ */
+$messages['ca'] = array(
+ 'datatransfer-desc' => 'Permet importar i exportar les dades que contenen les crides de les plantilles',
+ 'viewxml' => "Visualitza l'XML",
+ 'dt_viewxml_docu' => "Seleccioneu d'entre les següents categories i espais de noms per a veure'l en format XML.",
+ 'dt_viewxml_categories' => 'Categories',
+ 'dt_viewxml_namespaces' => 'Espais de noms',
+ 'dt_viewxml_simplifiedformat' => 'Format simplificat',
+ 'dt_xml_namespace' => 'Espai de noms',
+ 'dt_xml_pages' => 'Pàgines',
+ 'dt_xml_page' => 'Pàgina',
+ 'dt_xml_template' => 'Plantilla',
+ 'dt_xml_field' => 'Camp',
+ 'dt_xml_name' => 'Nom',
+ 'dt_xml_title' => 'Títol',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Text lliure',
+ 'importxml' => 'Importa un XML',
+ 'dt_import_selectfile' => 'Seleccioneu el fitxer $1 per importar:',
+ 'dt_import_encodingtype' => 'Joc de caràcters:',
+ 'dt_import_summarydesc' => 'Resum de la importació:',
+ 'dt_import_editsummary' => 'Importació $1',
+ 'dt_import_importing' => "S'està important...",
+ 'dt_import_success' => '$1 {{PLURAL:$1|pàgina|pàgines}} es crearan des del fitxer $2.',
+ 'importcsv' => 'Importa un CSV',
+ 'dt_importcsv_badheader' => "Error: la capçalera de la columna $1, '$2', ha de ser o bé '$3', '$4' o bé de la forma 'template_name[field_name]'",
+ 'right-datatransferimport' => 'Importa les dades',
+);
+
+/** Chechen (Нохчийн)
+ * @author Sasan700
+ */
+$messages['ce'] = array(
+ 'dt_xml_template' => 'Куцкеп',
+);
+
+/** Czech (Česky)
+ * @author Jkjk
+ * @author Matěj Grabovský
+ */
+$messages['cs'] = array(
+ 'datatransfer-desc' => 'Umožňuje import a export strukturovaných údajů v buňkách šablon.',
+ 'viewxml' => 'Zobrazit XML',
+ 'dt_viewxml_categories' => 'Kategorie',
+ 'dt_viewxml_namespaces' => 'Jmenné prostory',
+ 'dt_viewxml_simplifiedformat' => 'Zjednodušený formát',
+ 'dt_xml_namespace' => 'Jmenný prostor',
+ 'dt_xml_pages' => 'Stránky',
+ 'dt_xml_page' => 'Stránka',
+ 'dt_xml_template' => 'Šablona',
+ 'dt_xml_field' => 'Pole',
+ 'dt_xml_name' => 'Název',
+ 'dt_xml_title' => 'Název',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Libovolný text',
+ 'importxml' => 'Importovat XML',
+ 'dt_import_selectfile' => 'Prosím vyberte $1 soubor k importu:',
+ 'dt_import_encodingtype' => 'Typ kódování:',
+ 'dt_import_summarydesc' => 'Shrnutí importu:',
+ 'dt_import_editsummary' => 'import $1',
+ 'dt_import_importing' => 'Probíhá import...',
+ 'dt_import_success' => ' $1 {{PLURAL:$1|stránky|stránky|stránek}} bude vytvořeno z $2 souboru.',
+ 'importcsv' => 'Import CSV',
+ 'right-datatransferimport' => 'Importovat data',
+);
+
+/** Danish (Dansk)
+ * @author Jon Harald Søby
+ */
+$messages['da'] = array(
+ 'dt_viewxml_categories' => 'Kategorier',
+ 'dt_xml_namespace' => 'Navnerum',
+ 'dt_xml_page' => 'Side',
+ 'dt_xml_name' => 'Navn',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+);
+
+/** German (Deutsch)
+ * @author Als-Holder
+ * @author Kghbln
+ * @author Krabina
+ * @author Revolus
+ * @author Umherirrender
+ */
+$messages['de'] = array(
+ 'datatransfer-desc' => 'Ermöglicht den Export von Daten im XML-Format sowie den Import von Daten im XML- und CSV-Format',
+ 'viewxml' => 'XML ansehen',
+ 'dt_viewxml_docu' => 'Bitte auswählen, welche Kategorien und Namensräume im XML-Format angezeigt werden sollen:',
+ 'dt_viewxml_categories' => 'Kategorien',
+ 'dt_viewxml_namespaces' => 'Namensräume',
+ 'dt_viewxml_simplifiedformat' => 'Vereinfachtes Format',
+ 'dt_xml_namespace' => 'Namensraum',
+ 'dt_xml_pages' => 'Seiten',
+ 'dt_xml_page' => 'Seite',
+ 'dt_xml_template' => 'Vorlage',
+ 'dt_xml_field' => 'Feld',
+ 'dt_xml_name' => 'Name',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Freitext',
+ 'importxml' => 'XML-Datei importieren',
+ 'dt_import_selectfile' => 'Bitte die zu importierende $1-Datei auswählen:',
+ 'dt_import_encodingtype' => 'Zeichenkodierung:',
+ 'dt_import_forexisting' => 'Im Fall von Seiten, die bereits vorhanden sind:',
+ 'dt_import_overwriteexisting' => 'Vorhandenen Inhalt überschreiben',
+ 'dt_import_skipexisting' => 'Seite nicht importieren',
+ 'dt_import_appendtoexisting' => 'Vorhandenen Inhalt ergänzen',
+ 'dt_import_summarydesc' => 'Zusammenfassung zum Import:',
+ 'dt_import_editsummary' => '$1-Import',
+ 'dt_import_importing' => 'Importiere …',
+ 'dt_import_success' => '$1 {{PLURAL:$1|Seite|Seiten}} werden aus der $2-Datei importiert.',
+ 'importcsv' => 'CSV-Datei importieren',
+ 'dt_importcsv_badheader' => "'''Fehler:''' Der Kopf der Spalte $1, „$2“, muss entweder „$3“, „$4“ oder im Format „Vorlagenname[Feldname]“ sein",
+ 'right-datatransferimport' => 'Daten importieren',
+);
+
+/** Lower Sorbian (Dolnoserbski)
+ * @author Michawiki
+ */
+$messages['dsb'] = array(
+ 'datatransfer-desc' => 'Zmóžnja importěrowanje a eksportěrowanje datow w zawołanjach pśedłogow',
+ 'viewxml' => 'XML se woglědaś',
+ 'dt_viewxml_docu' => 'Pšosym wubjeŕ, kótare slědujucych kategorijow a mjenjowych rumow maju se pokazaś w formaśe XML.',
+ 'dt_viewxml_categories' => 'Kategorije',
+ 'dt_viewxml_namespaces' => 'Mjenjowe rumy',
+ 'dt_viewxml_simplifiedformat' => 'Zjadnorjony format',
+ 'dt_xml_namespace' => 'Mjenjowy rum',
+ 'dt_xml_pages' => 'Boki',
+ 'dt_xml_page' => 'Bok',
+ 'dt_xml_template' => 'Pśedłoga',
+ 'dt_xml_field' => 'Pólo',
+ 'dt_xml_name' => 'Mě',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Lichy tekst',
+ 'importxml' => 'XML importěrowaś',
+ 'dt_import_selectfile' => 'Pšosym wubjeŕ dataju $1 za importěrowanje:',
+ 'dt_import_encodingtype' => 'Typ znamuškowego koda:',
+ 'dt_import_forexisting' => 'Za boki, kótarež južo ekistěruju:',
+ 'dt_import_overwriteexisting' => 'Eksistěrujuce wopśimjeśe pśepisaś',
+ 'dt_import_skipexisting' => 'Pśeskócyś',
+ 'dt_import_appendtoexisting' => 'K eksistěrujucemu wopśimjeśoju pśipowjesyś',
+ 'dt_import_summarydesc' => 'Zespominanje importa:',
+ 'dt_import_editsummary' => 'Importěrowanje $1',
+ 'dt_import_importing' => 'Importěrujo se...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|bok twóri|boka twóritej|boki twórje|bokow twóri}} se z dataje $2.',
+ 'importcsv' => 'Importěrowanje CSV',
+ 'dt_importcsv_badheader' => "Zmólka: głowa słupa $1, '$2', musy pak '$3', '$4' byś pak formu 'mě_pśedłogi[mě_póla]' měś",
+ 'right-datatransferimport' => 'Daty importěrowaś',
+);
+
+/** Ewe (Eʋegbe) */
+$messages['ee'] = array(
+ 'dt_xml_page' => 'Axa',
+);
+
+/** Greek (Ελληνικά)
+ * @author Consta
+ * @author Crazymadlover
+ * @author Omnipaedista
+ */
+$messages['el'] = array(
+ 'viewxml' => 'Προβολή XML',
+ 'dt_viewxml_categories' => 'Κατηγορίες',
+ 'dt_viewxml_namespaces' => 'Περιοχές ονομάτων',
+ 'dt_xml_namespace' => 'Περιοχή ονομάτων',
+ 'dt_xml_pages' => 'Σελίδες',
+ 'dt_xml_page' => 'Σελίδα',
+ 'dt_xml_template' => 'Πρότυπο',
+ 'dt_xml_field' => 'Πεδίο',
+ 'dt_xml_name' => 'Όνομα',
+ 'dt_xml_title' => 'Τίτλος',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Ελεύθερο Κείμενο',
+ 'importxml' => 'Εισαγωγή σε XML',
+ 'dt_import_encodingtype' => 'Τύπος κωδικοποίησης',
+ 'dt_import_editsummary' => 'Εισαγωγή $1',
+ 'dt_import_importing' => 'Εισάγεται...',
+ 'importcsv' => 'Εισαγωγή CSV',
+ 'right-datatransferimport' => 'Εισαγωγή δεδομένων',
+);
+
+/** Esperanto (Esperanto)
+ * @author Michawiki
+ * @author Yekrats
+ */
+$messages['eo'] = array(
+ 'datatransfer-desc' => 'Permesas importadon kaj eksportadon de datumoj enhave en ŝablonaj vokoj',
+ 'viewxml' => 'Rigardu XML-on',
+ 'dt_viewxml_docu' => 'Bonvolu elekti inter la subaj kategorioj kaj nomspacoj por rigardi en XML-formato.',
+ 'dt_viewxml_categories' => 'Kategorioj',
+ 'dt_viewxml_namespaces' => 'Nomspacoj',
+ 'dt_viewxml_simplifiedformat' => 'Simpligita formato',
+ 'dt_xml_namespace' => 'Nomspaco',
+ 'dt_xml_pages' => 'Paĝoj',
+ 'dt_xml_page' => 'Paĝo',
+ 'dt_xml_template' => 'Ŝablono',
+ 'dt_xml_field' => 'Kampo',
+ 'dt_xml_name' => 'Nomo',
+ 'dt_xml_title' => 'Titolo',
+ 'dt_xml_id' => 'identigo',
+ 'dt_xml_freetext' => 'Libera Teksto',
+ 'importxml' => 'Importi XML',
+ 'dt_import_editsummary' => '$1 importo',
+ 'dt_import_importing' => 'Importante...',
+ 'importcsv' => 'Importi CSV',
+ 'right-datatransferimport' => 'Importi datenojn',
+);
+
+/** Spanish (Español)
+ * @author Crazymadlover
+ * @author Imre
+ * @author Locos epraix
+ * @author Peter17
+ * @author Sanbec
+ * @author Translationista
+ */
+$messages['es'] = array(
+ 'datatransfer-desc' => 'Permite importar y exportar datos contenidos en llamadas de plantilla',
+ 'viewxml' => 'Ver XML',
+ 'dt_viewxml_docu' => 'Por favor seleccionar entre las siguientes categorías y nombres de espacio para ver en formato XML.',
+ 'dt_viewxml_categories' => 'Categorías',
+ 'dt_viewxml_namespaces' => 'Espacios de nombres',
+ 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
+ 'dt_xml_namespace' => 'Espacio de nombres',
+ 'dt_xml_pages' => 'Páginas',
+ 'dt_xml_page' => 'Página',
+ 'dt_xml_template' => 'Plantilla',
+ 'dt_xml_field' => 'Campo',
+ 'dt_xml_name' => 'Nombre',
+ 'dt_xml_title' => 'Título',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Texto libre',
+ 'importxml' => 'Importar XML',
+ 'dt_import_selectfile' => 'Por favor seleccione el archivo $1 a importar:',
+ 'dt_import_encodingtype' => 'Tipo de codificación:',
+ 'dt_import_summarydesc' => 'Resumen de importación:',
+ 'dt_import_editsummary' => '$1 importación',
+ 'dt_import_importing' => 'Importando...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|página|páginas}} serán creadas del archivo $2.',
+ 'importcsv' => 'Importar CSV',
+ 'dt_importcsv_badheader' => 'Error : el título de columna $1, "$2", tiene que ser "$3", "$4" o de la forma \'nombre_de_plantilla[nombre_del_campo]\'',
+ 'right-datatransferimport' => 'Importar datos',
+);
+
+/** Estonian (Eesti)
+ * @author Avjoska
+ * @author Pikne
+ */
+$messages['et'] = array(
+ 'dt_viewxml_categories' => 'Kategooriad',
+ 'dt_viewxml_namespaces' => 'Nimeruumid',
+ 'dt_viewxml_simplifiedformat' => 'Lihtsustatud vorming',
+ 'dt_xml_namespace' => 'Nimeruum',
+ 'dt_xml_pages' => 'Leheküljed',
+ 'dt_xml_page' => 'Lehekülg',
+ 'dt_xml_template' => 'Mall',
+ 'dt_xml_name' => 'Nimi',
+);
+
+/** Basque (Euskara)
+ * @author Kobazulo
+ */
+$messages['eu'] = array(
+ 'viewxml' => 'XML ikusi',
+ 'dt_viewxml_categories' => 'Kategoriak',
+ 'dt_xml_pages' => 'Orrialdeak',
+ 'dt_xml_page' => 'Orrialdea',
+ 'dt_xml_template' => 'Txantiloia',
+ 'dt_xml_field' => 'Eremua',
+ 'dt_xml_name' => 'Izena',
+ 'dt_xml_title' => 'Izenburua',
+ 'importxml' => 'XML inportatu',
+ 'dt_import_selectfile' => 'Mesedez, aukera ezazu inportatzeko $1 fitxategia:',
+ 'dt_import_editsummary' => '$1 inportatu',
+ 'dt_import_importing' => 'Inportatzen...',
+ 'importcsv' => 'CSV inportatu',
+ 'right-datatransferimport' => 'Datuak inportatu',
+);
+
+/** Persian (فارسی)
+ * @author Mjbmr
+ */
+$messages['fa'] = array(
+ 'dt_xml_template' => 'الگو',
+ 'dt_xml_name' => 'نام',
+ 'dt_xml_title' => 'عنوان',
+);
+
+/** Finnish (Suomi)
+ * @author Centerlink
+ * @author Crt
+ * @author Nike
+ * @author Str4nd
+ * @author Vililikku
+ */
+$messages['fi'] = array(
+ 'datatransfer-desc' => 'Mahdollistaa tuoda ja viedä dataa, joka on mallinekutsuissa.',
+ 'viewxml' => 'Näytä XML',
+ 'dt_viewxml_docu' => 'Valitse yksi seuraavista luokista ja nimiavaruuksista tarkasteltavaksi XML-muodossa.',
+ 'dt_viewxml_categories' => 'Luokat',
+ 'dt_viewxml_namespaces' => 'Nimiavaruudet',
+ 'dt_viewxml_simplifiedformat' => 'Yksinkertaistettu muoto',
+ 'dt_xml_namespace' => 'Nimiavaruus',
+ 'dt_xml_pages' => 'Sivut',
+ 'dt_xml_page' => 'Sivu',
+ 'dt_xml_template' => 'Malline',
+ 'dt_xml_field' => 'Kenttä',
+ 'dt_xml_name' => 'Nimi',
+ 'dt_xml_title' => 'Otsikko',
+ 'dt_xml_id' => 'Tunnus',
+ 'dt_xml_freetext' => 'Vapaa teksti',
+ 'importxml' => 'XML-tuonti',
+ 'dt_import_selectfile' => 'Valitse $1-tiedosto tuotavaksi:',
+ 'dt_import_encodingtype' => 'Merkistötyyppi:',
+ 'dt_import_skipexisting' => 'Ohita',
+ 'dt_import_summarydesc' => 'Tuonnin yhteenveto',
+ 'dt_import_editsummary' => '$1-tuonti',
+ 'dt_import_importing' => 'Tuodaan...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|sivu|sivua}} luodaan $2-tiedostosta.',
+ 'importcsv' => 'CSV-tuonti',
+ 'dt_importcsv_badheader' => "Virhe: sarake $1 otsake, '$2', on oltava joko '$3', '$4' tai muotoa 'mallinne_nimi[kenttä_nimi]'",
+ 'right-datatransferimport' => 'Tuoda tiedot',
+);
+
+/** French (Français)
+ * @author Crochet.david
+ * @author Grondin
+ * @author IAlex
+ * @author Peter17
+ * @author PieRRoMaN
+ * @author Zetud
+ */
+$messages['fr'] = array(
+ 'datatransfer-desc' => 'Permet l’import et l’export de données contenues dans des appels de modèles',
+ 'viewxml' => 'Voir XML',
+ 'dt_viewxml_docu' => 'Veuillez sélectionner parmi les catégories et les espaces de noms suivants afin de visionner au format XML.',
+ 'dt_viewxml_categories' => 'Catégories',
+ 'dt_viewxml_namespaces' => 'Espaces de noms',
+ 'dt_viewxml_simplifiedformat' => 'Format simplifié',
+ 'dt_xml_namespace' => 'Espace de noms',
+ 'dt_xml_pages' => 'Pages',
+ 'dt_xml_page' => 'Page',
+ 'dt_xml_template' => 'Modèle',
+ 'dt_xml_field' => 'Champ',
+ 'dt_xml_name' => 'Nom',
+ 'dt_xml_title' => 'Titre',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Texte libre',
+ 'importxml' => 'Import en XML',
+ 'dt_import_selectfile' => 'Veuillez sélectionner le fichier $1 à importer :',
+ 'dt_import_encodingtype' => 'Type d’encodage:',
+ 'dt_import_forexisting' => 'Pour les pages qui existent déjà :',
+ 'dt_import_overwriteexisting' => 'Remplacer le contenu existant',
+ 'dt_import_skipexisting' => 'Passer',
+ 'dt_import_appendtoexisting' => 'Ajouter au contenu existant',
+ 'dt_import_summarydesc' => 'Résumé de l’import :',
+ 'dt_import_editsummary' => 'Import de $1',
+ 'dt_import_importing' => 'Import en cours...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|page sera créée|pages seront créées}} depuis le fichier $2.',
+ 'importcsv' => 'Import CSV',
+ 'dt_importcsv_badheader' => 'Erreur : le titre de colonne $1, « $2 », doit être soit « $3 », « $4 » ou de la forme « nom_du_modèle[nom_du_champ] »',
+ 'right-datatransferimport' => 'Importer des données',
+);
+
+/** Franco-Provençal (Arpetan)
+ * @author Cedric31
+ */
+$messages['frp'] = array(
+ 'dt_viewxml_categories' => 'Catègories',
+ 'dt_viewxml_namespaces' => 'Èspâços de noms',
+ 'dt_xml_namespace' => 'Èspâço de noms',
+ 'dt_xml_pages' => 'Pâges',
+ 'dt_xml_page' => 'Pâge',
+ 'dt_xml_template' => 'Modèlo',
+);
+
+/** Western Frisian (Frysk)
+ * @author Snakesteuben
+ */
+$messages['fy'] = array(
+ 'dt_viewxml_namespaces' => 'Nammeromten',
+ 'dt_xml_page' => 'Side',
+ 'dt_xml_name' => 'Namme',
+);
+
+/** Irish (Gaeilge)
+ * @author Alison
+ */
+$messages['ga'] = array(
+ 'dt_xml_namespace' => 'Ainmspás',
+);
+
+/** Galician (Galego)
+ * @author Alma
+ * @author Toliño
+ */
+$messages['gl'] = array(
+ 'datatransfer-desc' => 'Permite importar e exportar datos contidos en chamadas de modelos',
+ 'viewxml' => 'Ver XML',
+ 'dt_viewxml_docu' => 'Por favor seleccione entre as seguintes categorías e espazos de nomes para ver en formato XML.',
+ 'dt_viewxml_categories' => 'Categorías',
+ 'dt_viewxml_namespaces' => 'Espazos de nomes',
+ 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
+ 'dt_xml_namespace' => 'Espazo de nomes',
+ 'dt_xml_pages' => 'Páxinas',
+ 'dt_xml_page' => 'Páxina',
+ 'dt_xml_template' => 'Modelo',
+ 'dt_xml_field' => 'Campo',
+ 'dt_xml_name' => 'Nome',
+ 'dt_xml_title' => 'Título',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Texto Libre',
+ 'importxml' => 'Importar XML',
+ 'dt_import_selectfile' => 'Por favor, seleccione o ficheiro $1 a importar:',
+ 'dt_import_encodingtype' => 'Tipo de codificación:',
+ 'dt_import_forexisting' => 'Para páxinas que xa existen:',
+ 'dt_import_overwriteexisting' => 'Sobrescribir o contido existente',
+ 'dt_import_skipexisting' => 'Saltar',
+ 'dt_import_appendtoexisting' => 'Engadir ao contido existente',
+ 'dt_import_summarydesc' => 'Resumo da importación:',
+ 'dt_import_editsummary' => 'Importación en $1',
+ 'dt_import_importing' => 'Importando...',
+ 'dt_import_success' => '{{PLURAL:$1|Unha páxina será creada|$1 páxinas serán creadas}} a partir do ficheiro $2.',
+ 'importcsv' => 'Importación en CSV',
+ 'dt_importcsv_badheader' => 'Erro: a cabeceira da columna $1, "$2", debe ser un "$3", "$4" ou do formulario "template_name[field_name]"',
+ 'right-datatransferimport' => 'Importar datos',
+);
+
+/** Gothic (Gothic)
+ * @author Jocke Pirat
+ */
+$messages['got'] = array(
+ 'dt_xml_namespace' => 'Seidofera',
+);
+
+/** Ancient Greek (Ἀρχαία ἑλληνικὴ)
+ * @author Crazymadlover
+ * @author Omnipaedista
+ */
+$messages['grc'] = array(
+ 'dt_viewxml_categories' => 'Κατηγορίαι',
+ 'dt_viewxml_namespaces' => 'Ὀνοματεῖα',
+ 'dt_xml_namespace' => 'Ὀνοματεῖον',
+ 'dt_xml_pages' => 'Δέλτοι',
+ 'dt_xml_page' => 'Δέλτος',
+ 'dt_xml_template' => 'Πρότυπον',
+ 'dt_xml_field' => 'Πεδίον',
+ 'dt_xml_name' => 'Ὄνομα',
+ 'dt_xml_title' => 'Ἐπιγραφή',
+ 'dt_xml_freetext' => 'Ἐλεύθερον κείμενον',
+);
+
+/** Swiss German (Alemannisch)
+ * @author Als-Holder
+ * @author J. 'mach' wust
+ */
+$messages['gsw'] = array(
+ 'datatransfer-desc' => 'Macht dr Import un dr Export vu strukturierte Date megli, wu in Ufrief vu Vorlage bruucht wäre.',
+ 'viewxml' => 'XML aaluege',
+ 'dt_viewxml_docu' => 'Bitte wehl uus, weli Kategorien un Namensryym im XML-Format solle aazeigt wäre.',
+ 'dt_viewxml_categories' => 'Kategorie',
+ 'dt_viewxml_namespaces' => 'Namensryym',
+ 'dt_viewxml_simplifiedformat' => 'Vereifacht Format',
+ 'dt_xml_namespace' => 'Namensruum',
+ 'dt_xml_pages' => 'Syte',
+ 'dt_xml_page' => 'Syte',
+ 'dt_xml_template' => 'Vorlag',
+ 'dt_xml_field' => 'Fäld',
+ 'dt_xml_name' => 'Name',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Freje Täxt',
+ 'importxml' => 'XML importiere',
+ 'dt_import_selectfile' => 'Bitte wehl d $1-Datei zum importiere uus:',
+ 'dt_import_encodingtype' => 'Verschlisseligstyp:',
+ 'dt_import_forexisting' => 'Im Fall vu Syte, wu s scho git:',
+ 'dt_import_overwriteexisting' => 'Vorhandene Inhalt iberschryybe',
+ 'dt_import_skipexisting' => 'Ibergumpe',
+ 'dt_import_appendtoexisting' => 'Vorhandene Inhalt ergänze',
+ 'dt_import_summarydesc' => 'Zämmefassig vum Import:',
+ 'dt_import_editsummary' => '$1-Import',
+ 'dt_import_importing' => 'Am Importiere ...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|Syte|Syte}} wäre us dr $2-Datei aagleit.',
+ 'importcsv' => 'CSV-Datei importiere',
+ 'dt_importcsv_badheader' => "Fähler: d Spalte $1 Iberschrift, '$2', muess entwäder '$3', '$4' syy oder us em Format 'template_name[field_name]'",
+ 'right-datatransferimport' => 'Date importiere',
+);
+
+/** Manx (Gaelg)
+ * @author MacTire02
+ */
+$messages['gv'] = array(
+ 'viewxml' => 'Jeeagh er XML',
+ 'dt_viewxml_categories' => 'Ronnaghyn',
+ 'dt_xml_page' => 'Duillag',
+ 'dt_xml_name' => 'Ennym',
+ 'dt_xml_title' => 'Ard-ennym',
+ 'dt_xml_freetext' => 'Teks seyr',
+);
+
+/** Hausa (هَوُسَ) */
+$messages['ha'] = array(
+ 'dt_xml_namespace' => 'Sararin suna',
+ 'dt_xml_page' => 'Shafi',
+);
+
+/** Hawaiian (Hawai`i)
+ * @author Singularity
+ */
+$messages['haw'] = array(
+ 'dt_xml_page' => '‘Ao‘ao',
+ 'dt_xml_name' => 'Inoa',
+);
+
+/** Hebrew (עברית)
+ * @author Amire80
+ * @author Rotemliss
+ * @author YaronSh
+ */
+$messages['he'] = array(
+ 'datatransfer-desc' => 'אפשרות לייבא ולייצא נתונים בתבניות',
+ 'viewxml' => 'הצגת XML',
+ 'dt_viewxml_docu' => 'אנא בחרו את מרחבי השם והקטגוריות אותם תרצו להציג בפורמט XML.',
+ 'dt_viewxml_categories' => 'קטגוריות',
+ 'dt_viewxml_namespaces' => 'מרחבי שם',
+ 'dt_viewxml_simplifiedformat' => 'מבנה מפושט',
+ 'dt_xml_namespace' => 'מרחב שם',
+ 'dt_xml_pages' => 'דפים',
+ 'dt_xml_page' => 'דף',
+ 'dt_xml_template' => 'תבנית',
+ 'dt_xml_field' => 'שדה',
+ 'dt_xml_name' => 'שם',
+ 'dt_xml_title' => 'כותרת',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'טקסט חופשי',
+ 'importxml' => 'יבוא XML',
+ 'dt_import_selectfile' => 'אנא בחרו את קובץ ה־$1 ליבוא:',
+ 'dt_import_encodingtype' => 'סוג הקידוד:',
+ 'dt_import_forexisting' => 'עבור הדפים שכבר קיימים:',
+ 'dt_import_overwriteexisting' => 'לדרוס את התוכן הקיים',
+ 'dt_import_skipexisting' => 'לדלג',
+ 'dt_import_appendtoexisting' => 'לצרף את התוכן הקיים',
+ 'dt_import_summarydesc' => 'תקציר היבוא:',
+ 'dt_import_editsummary' => 'יבוא $1',
+ 'dt_import_importing' => 'מתבצע יבוא...',
+ 'dt_import_success' => '{{PLURAL:$1|דף אחד ייוצר|$1 דפים ייוצרו}} מקובץ ה־$2.',
+ 'importcsv' => 'יבוא CSV',
+ 'dt_importcsv_badheader' => "שגיאה: כותרת העמודה $1, '$2', חייבת להיות או '$3', '$4' או מהצורה 'שם_התבנית[שם_השדה]'",
+ 'right-datatransferimport' => 'יבוא נתונים',
+);
+
+/** Hindi (हिन्दी)
+ * @author Kaustubh
+ */
+$messages['hi'] = array(
+ 'datatransfer-desc' => 'टेम्प्लेट कॉल में उपलब्ध डाटाकी आयात-निर्यात करने की अनुमति देता हैं',
+ 'viewxml' => 'XML देखें',
+ 'dt_viewxml_docu' => 'कॄपया XML में देखने के लिये श्रेणीयाँ और नामस्थान चुनें।',
+ 'dt_viewxml_categories' => 'श्रेणीयाँ',
+ 'dt_viewxml_namespaces' => 'नामस्थान',
+ 'dt_viewxml_simplifiedformat' => 'आसान फॉरमैट',
+ 'dt_xml_namespace' => 'नामस्थान',
+ 'dt_xml_page' => 'पन्ना',
+ 'dt_xml_field' => 'फिल्ड़',
+ 'dt_xml_name' => 'नाम',
+ 'dt_xml_title' => 'शीर्षक',
+ 'dt_xml_id' => 'आईडी',
+ 'dt_xml_freetext' => 'मुक्त पाठ',
+);
+
+/** Croatian (Hrvatski)
+ * @author Dalibor Bosits
+ */
+$messages['hr'] = array(
+ 'dt_viewxml_categories' => 'Kategorije',
+ 'dt_xml_namespace' => 'Imenski prostor',
+ 'dt_xml_page' => 'Stranica',
+);
+
+/** Upper Sorbian (Hornjoserbsce)
+ * @author Michawiki
+ */
+$messages['hsb'] = array(
+ 'datatransfer-desc' => 'Dowola importowanje a eksportowanje datow, kotrež su we wołanjach předłohow wobsahowane',
+ 'viewxml' => 'XML wobhladać',
+ 'dt_viewxml_docu' => 'Prošu wubjer ze slědowacych kategorijow a mjenowych rumow, zo by w XML-formaće wobhladał.',
+ 'dt_viewxml_categories' => 'Kategorije',
+ 'dt_viewxml_namespaces' => 'Mjenowe rumy',
+ 'dt_viewxml_simplifiedformat' => 'Zjednorjeny format',
+ 'dt_xml_namespace' => 'Mjenowy rum',
+ 'dt_xml_pages' => 'Strony',
+ 'dt_xml_page' => 'Strona',
+ 'dt_xml_template' => 'Předłoha',
+ 'dt_xml_field' => 'Polo',
+ 'dt_xml_name' => 'Mjeno',
+ 'dt_xml_title' => 'Titul',
+ 'dt_xml_id' => 'Id',
+ 'dt_xml_freetext' => 'Swobodny tekst',
+ 'importxml' => 'XML importować',
+ 'dt_import_selectfile' => 'Prošu wubjer dataju $1 za importowanje:',
+ 'dt_import_encodingtype' => 'Typ znamješkoweho koda:',
+ 'dt_import_forexisting' => 'Za strony, kotrež hižo eksistuja:',
+ 'dt_import_overwriteexisting' => 'Eksistowacy wobsah přepisać',
+ 'dt_import_skipexisting' => 'Přeskočić',
+ 'dt_import_appendtoexisting' => 'K eksistowacemu wobsahej připowěsnyć',
+ 'dt_import_summarydesc' => 'Zjeće importa:',
+ 'dt_import_editsummary' => 'Importowanje $1',
+ 'dt_import_importing' => 'Importuje so...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|strona so z dataje $2 twori|stronje so z dataje $2 tworitej|strony so z dataje $2 tworja|stronow so z dataje $2 twori}}.',
+ 'importcsv' => 'Importowanje CSV',
+ 'dt_importcsv_badheader' => "Zmylk: hłowa špalty $1, '$2', dyrbi pak '$3', '$4' być pak formu 'mjeno_předłohi[mjeno_pola]' měć",
+ 'right-datatransferimport' => 'Daty importować',
+);
+
+/** Hungarian (Magyar)
+ * @author Dani
+ * @author Glanthor Reviol
+ */
+$messages['hu'] = array(
+ 'datatransfer-desc' => 'Lehetővé teszi a sablonhívásokban található adatok importálását és exportálását',
+ 'viewxml' => 'XML megtekintése',
+ 'dt_viewxml_docu' => 'Válaszd ki a kategóriák és a névterek közül azt, amelyiket meg akarod tekinteni XML formátumban.',
+ 'dt_viewxml_categories' => 'Kategóriák',
+ 'dt_viewxml_namespaces' => 'Névterek',
+ 'dt_viewxml_simplifiedformat' => 'Egyszerűsített formátum',
+ 'dt_xml_namespace' => 'Névtér',
+ 'dt_xml_pages' => 'Lapok',
+ 'dt_xml_page' => 'Lap',
+ 'dt_xml_template' => 'Sablon',
+ 'dt_xml_field' => 'Mező',
+ 'dt_xml_name' => 'Név',
+ 'dt_xml_title' => 'Cím',
+ 'dt_xml_id' => 'Azonosító',
+ 'dt_xml_freetext' => 'Szabad szöveg',
+ 'importxml' => 'XML importálás',
+ 'dt_import_selectfile' => 'Kérlek válaszd ki az importálandó $1 fájlt:',
+ 'dt_import_encodingtype' => 'Kódolás típusa:',
+ 'dt_import_summarydesc' => 'Az importálás összefoglalója:',
+ 'dt_import_editsummary' => '$1 importálás',
+ 'dt_import_importing' => 'Importálás…',
+ 'dt_import_success' => '{{PLURAL:$1|egy|$1}} lap fog készülni a(z) $2 fájlból.',
+ 'importcsv' => 'CSV importálása',
+ 'dt_importcsv_badheader' => 'Hiba: a(z) $1 oszlop fejlécének („$2”) vagy „$3”, „$4”, vagy pedig „sablonnév[mezőnév]” formátumúnak kell lennie',
+ 'right-datatransferimport' => 'Adatok importálása',
+);
+
+/** Interlingua (Interlingua)
+ * @author McDutchie
+ */
+$messages['ia'] = array(
+ 'datatransfer-desc' => 'Permitte importar e exportar datos continite in appellos a patronos',
+ 'viewxml' => 'Vider XML',
+ 'dt_viewxml_docu' => 'Per favor selige inter le sequente categorias e spatios de nomines pro vider in formato XML.',
+ 'dt_viewxml_categories' => 'Categorias',
+ 'dt_viewxml_namespaces' => 'Spatios de nomines',
+ 'dt_viewxml_simplifiedformat' => 'Formato simplificate',
+ 'dt_xml_namespace' => 'Spatio de nomines',
+ 'dt_xml_pages' => 'Paginas',
+ 'dt_xml_page' => 'Pagina',
+ 'dt_xml_template' => 'Patrono',
+ 'dt_xml_field' => 'Campo',
+ 'dt_xml_name' => 'Nomine',
+ 'dt_xml_title' => 'Titulo',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Texto libere',
+ 'importxml' => 'Importar XML',
+ 'dt_import_selectfile' => 'Per favor selige le file $1 a importar:',
+ 'dt_import_encodingtype' => 'Typo de codification:',
+ 'dt_import_forexisting' => 'Pro paginas que ja existe:',
+ 'dt_import_overwriteexisting' => 'Superscriber le contento existente',
+ 'dt_import_skipexisting' => 'Saltar',
+ 'dt_import_appendtoexisting' => 'Adjunger al contento existente',
+ 'dt_import_summarydesc' => 'Summario de importation:',
+ 'dt_import_editsummary' => 'Importation de $1',
+ 'dt_import_importing' => 'Importation in curso…',
+ 'dt_import_success' => '$1 {{PLURAL:$1|pagina|paginas}} essera create ex le file $2.',
+ 'importcsv' => 'Importar CSV',
+ 'dt_importcsv_badheader' => "Error: le capite del columna $1, '$2', debe esser '$3', '$4' o in le forma 'nomine_de_patrono[nomine_de_campo]'",
+ 'right-datatransferimport' => 'Importar datos',
+);
+
+/** Indonesian (Bahasa Indonesia)
+ * @author Bennylin
+ * @author Farras
+ * @author Irwangatot
+ * @author IvanLanin
+ * @author Rex
+ */
+$messages['id'] = array(
+ 'datatransfer-desc' => 'Membolehkan untuk impor dan ekspor data diisikan pada pemangilan templat',
+ 'viewxml' => 'Tilik XML',
+ 'dt_viewxml_docu' => 'Silakan pilih di antara kategori dan ruang nama berikut untuk melihat dalam format XML',
+ 'dt_viewxml_categories' => 'Kategori',
+ 'dt_viewxml_namespaces' => 'Ruang nama',
+ 'dt_viewxml_simplifiedformat' => 'Penyederhanaan format',
+ 'dt_xml_namespace' => 'Ruang nama',
+ 'dt_xml_pages' => 'Halaman',
+ 'dt_xml_page' => 'Halaman',
+ 'dt_xml_template' => 'Templat',
+ 'dt_xml_field' => 'Ruas',
+ 'dt_xml_name' => 'Nama',
+ 'dt_xml_title' => 'Judul',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Teks Gratis',
+ 'importxml' => 'Impor XML',
+ 'dt_import_selectfile' => 'Pilih berkas $1 untuk di impor:',
+ 'dt_import_encodingtype' => 'Tipe penyandian:',
+ 'dt_import_forexisting' => 'Untuk halaman yang sudah ada:',
+ 'dt_import_overwriteexisting' => 'Menimpa konten yang ada',
+ 'dt_import_skipexisting' => 'Lewati',
+ 'dt_import_appendtoexisting' => 'Tambahkan kepada konten yang ada',
+ 'dt_import_summarydesc' => 'Ringkasan impor:',
+ 'dt_import_editsummary' => '$1 impor',
+ 'dt_import_importing' => 'Mengimpor...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|halaman|halaman}} akan di buat dari berkas $2.',
+ 'importcsv' => 'Impor CSV',
+ 'dt_importcsv_badheader' => "Kesalahan: kepala kolom $1, '$2', harus berupa '$3', '$4' atau bentuk 'template_name [field_name]'",
+ 'right-datatransferimport' => 'Impor data',
+);
+
+/** Igbo (Igbo)
+ * @author Ukabia
+ */
+$messages['ig'] = array(
+ 'dt_viewxml_categories' => 'Ébéanọr',
+ 'dt_xml_template' => 'Àtụ',
+);
+
+/** Ido (Ido)
+ * @author Malafaya
+ */
+$messages['io'] = array(
+ 'dt_xml_template' => 'Shablono',
+ 'dt_xml_name' => 'Nomo',
+ 'dt_xml_title' => 'Titulo',
+);
+
+/** Icelandic (Íslenska)
+ * @author S.Örvarr.S
+ */
+$messages['is'] = array(
+ 'dt_viewxml_namespaces' => 'Nafnrými',
+ 'dt_xml_page' => 'Síða',
+);
+
+/** Italian (Italiano)
+ * @author Beta16
+ * @author BrokenArrow
+ * @author Darth Kule
+ */
+$messages['it'] = array(
+ 'datatransfer-desc' => "Permette l'importazione e l'esportazione di dati strutturati contenuti in chiamate a template",
+ 'viewxml' => 'Vedi XML',
+ 'dt_viewxml_docu' => 'Selezionare tra le categorie e namespace indicati di seguito quelli da visualizzare in formato XML.',
+ 'dt_viewxml_categories' => 'Categorie',
+ 'dt_viewxml_namespaces' => 'Namespace',
+ 'dt_viewxml_simplifiedformat' => 'Formato semplificato',
+ 'dt_xml_namespace' => 'Namespace',
+ 'dt_xml_pages' => 'Pagine',
+ 'dt_xml_page' => 'Pagina',
+ 'dt_xml_template' => 'Template',
+ 'dt_xml_field' => 'Campo',
+ 'dt_xml_name' => 'Nome',
+ 'dt_xml_title' => 'Titolo',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Testo libero',
+ 'dt_import_encodingtype' => 'Tipo di codifica',
+ 'right-datatransferimport' => 'Importa dati',
+);
+
+/** Japanese (日本語)
+ * @author Aotake
+ * @author Fryed-peach
+ * @author JtFuruhata
+ * @author Ohgi
+ * @author 青子守歌
+ */
+$messages['ja'] = array(
+ 'datatransfer-desc' => 'テンプレート呼び出しに関わるデータのインポートおよびエクスポートを可能にする',
+ 'viewxml' => 'XML表示',
+ 'dt_viewxml_docu' => 'XML形式で表示するカテゴリや名前空間を以下から選択してください。',
+ 'dt_viewxml_categories' => 'カテゴリ',
+ 'dt_viewxml_namespaces' => '名前空間',
+ 'dt_viewxml_simplifiedformat' => '簡易形式',
+ 'dt_xml_namespace' => '名前空間',
+ 'dt_xml_pages' => 'ページ群',
+ 'dt_xml_page' => 'ページ',
+ 'dt_xml_template' => 'テンプレート',
+ 'dt_xml_field' => 'フィールド',
+ 'dt_xml_name' => '名前',
+ 'dt_xml_title' => 'タイトル',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => '自由形式テキスト',
+ 'importxml' => 'XMLインポート',
+ 'dt_import_selectfile' => 'インポートする $1 ファイルを選択してください:',
+ 'dt_import_encodingtype' => 'エンコーディング方式:',
+ 'dt_import_forexisting' => 'すでに存在するページの場合:',
+ 'dt_import_overwriteexisting' => '既存の内容に上書き',
+ 'dt_import_skipexisting' => 'スキップ',
+ 'dt_import_appendtoexisting' => '既存の内容に追加',
+ 'dt_import_summarydesc' => '移入の概要:',
+ 'dt_import_editsummary' => '$1 のインポート',
+ 'dt_import_importing' => 'インポート中…',
+ 'dt_import_success' => '$2ファイルから$1{{PLURAL:$1|ページ}}がインポートされます。',
+ 'importcsv' => 'CSVのインポート',
+ 'dt_importcsv_badheader' => 'エラー: 列 $1 のヘッダ「$2」は、「$3」もしくは「$4」であるか、または「テンプレート名[フィールド名]」という形式になっていなければなりません。',
+ 'right-datatransferimport' => 'データをインポートする',
+);
+
+/** Javanese (Basa Jawa)
+ * @author Meursault2004
+ */
+$messages['jv'] = array(
+ 'viewxml' => 'Ndeleng XML',
+ 'dt_viewxml_categories' => 'Kategori-kategori',
+ 'dt_viewxml_simplifiedformat' => 'Format prasaja',
+ 'dt_xml_namespace' => 'Bilik nama',
+ 'dt_xml_page' => 'Kaca',
+ 'dt_xml_name' => 'Jeneng',
+ 'dt_xml_title' => 'Irah-irahan (judhul)',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Tèks Bébas',
+);
+
+/** Khmer (ភាសាខ្មែរ)
+ * @author Chhorran
+ * @author Lovekhmer
+ * @author Thearith
+ * @author គីមស៊្រុន
+ * @author វ័ណថារិទ្ធ
+ */
+$messages['km'] = array(
+ 'viewxml' => 'មើល XML',
+ 'dt_viewxml_docu' => 'ជ្រើសយកក្នុងចំណោមចំណាត់ថ្នាក់ក្រុមនិងលំហឈ្មោះដើម្បីមើលជាទម្រង់ XML ។',
+ 'dt_viewxml_categories' => 'ចំណាត់ថ្នាក់ក្រុម',
+ 'dt_viewxml_namespaces' => 'ប្រភេទ',
+ 'dt_viewxml_simplifiedformat' => 'ទម្រង់សាមញ្ញ',
+ 'dt_xml_namespace' => 'ប្រភេទ',
+ 'dt_xml_pages' => 'ទំព័រ',
+ 'dt_xml_page' => 'ទំព័រ',
+ 'dt_xml_template' => 'ទំព័រគំរូ',
+ 'dt_xml_field' => 'ផ្នែក',
+ 'dt_xml_name' => 'ឈ្មោះ',
+ 'dt_xml_title' => 'ចំណងជើង',
+ 'dt_xml_id' => 'អត្តសញ្ញាណ',
+ 'dt_xml_freetext' => 'អត្ថបទសេរី',
+ 'importxml' => 'នាំចូល XML',
+ 'dt_import_selectfile' => 'សូមជ្រើសរើសឯកសារ $1 ដើម្បីនាំចូល៖',
+ 'dt_import_encodingtype' => 'ប្រភេទនៃការធ្វើកូដ៖',
+ 'dt_import_forexisting' => 'សំរាប់ទំព័រដែលមានរួចហើយ៖',
+ 'dt_import_overwriteexisting' => 'សរសេរជាន់ពីលើខ្លឹមសារដែលមានហើយ',
+ 'dt_import_skipexisting' => 'រំលង',
+ 'dt_import_appendtoexisting' => 'សរសេរបន្ថែមទៅលើខ្លឹមសារដែលមានហើយ',
+ 'dt_import_summarydesc' => 'ចំណារពន្យល់ស្ដីពីការនាំចូល៖',
+ 'dt_import_editsummary' => '$1 នាំចូល',
+ 'dt_import_importing' => 'កំពុងនាំចូល...',
+ 'dt_import_success' => 'ទំព័រចំនួន $1 នឹងត្រូវបានបង្កើតពីឯកសារ $2 នេះ។',
+ 'importcsv' => 'នាំចូល CSV',
+ 'right-datatransferimport' => 'នាំចូលទិន្នន័យ',
+);
+
+/** Kannada (ಕನ್ನಡ)
+ * @author Nayvik
+ */
+$messages['kn'] = array(
+ 'dt_viewxml_categories' => 'ವರ್ಗಗಳು',
+ 'dt_xml_namespace' => 'ನಾಮವರ್ಗ',
+ 'dt_xml_pages' => 'ಪುಟಗಳು',
+ 'dt_xml_page' => 'ಪುಟ',
+ 'dt_xml_template' => 'ಟೆಂಪ್ಲೇಟು',
+ 'dt_xml_name' => 'ಹೆಸರು',
+ 'dt_xml_title' => 'ಶೀರ್ಷಿಕೆ',
+);
+
+/** Kinaray-a (Kinaray-a)
+ * @author Jose77
+ */
+$messages['krj'] = array(
+ 'dt_viewxml_categories' => 'Manga Kategorya',
+ 'dt_xml_page' => 'Pahina',
+);
+
+/** Colognian (Ripoarisch)
+ * @author Purodha
+ */
+$messages['ksh'] = array(
+ 'datatransfer-desc' => 'Määt et müjjelesch, Date uß Schabloone ier Oproofe ze emporteere un ze exporteere.',
+ 'viewxml' => '<i lang="en">XML</i> beloore',
+ 'dt_viewxml_docu' => 'Don ußsöke, wat fö_n Saachjruppe un Appachtemangs De em <i lang="en">XML</i> Fommaat aanloore wells.',
+ 'dt_viewxml_categories' => 'Saachjroppe',
+ 'dt_viewxml_namespaces' => 'Appachtemangs',
+ 'dt_viewxml_simplifiedformat' => 'Em eijfachere Fommaat',
+ 'dt_xml_namespace' => 'Appachtemang',
+ 'dt_xml_pages' => 'Sigge',
+ 'dt_xml_page' => 'Sigg',
+ 'dt_xml_template' => 'Schablohn',
+ 'dt_xml_field' => 'Felldt',
+ 'dt_xml_name' => 'Name',
+ 'dt_xml_title' => 'Tėttel',
+ 'dt_xml_id' => 'Kännong',
+ 'dt_xml_freetext' => 'Freije Täx',
+ 'importxml' => '<i lang="en">XML</i> Empotteere',
+ 'dt_import_selectfile' => 'Söhk de <i lang="en">$1</i>-Dattei för zem Empotteere uß:',
+ 'dt_import_encodingtype' => 'Zoot Kodeerung för de Bohchshtahbe un Zeishe:',
+ 'dt_import_forexisting' => 'För Sigge, di et ald jitt:',
+ 'dt_import_overwriteexisting' => 'Övverschrieve, wat ald doh es',
+ 'dt_import_skipexisting' => 'Övverjonn',
+ 'dt_import_appendtoexisting' => 'An dat aanhange, wat ald doh es',
+ 'dt_import_summarydesc' => 'Zesammefassung vun däm Empoot:',
+ 'dt_import_editsummary' => 'uss ene <i lang="en">$1</i>-Datei empotteet',
+ 'dt_import_importing' => 'Ben aam Empotteere{{int:Ellipsis}}',
+ 'dt_import_success' => '{{PLURAL:$1|Ein Sigg weed_uß|$1 Sigge weede uß|Kein einzelne Sigg weed_uß}} dä <i lang="en">$2</i>-Dattei empotteet.',
+ 'importcsv' => '<i lang="en">CSV</i>-Dattei empoteere',
+ 'dt_importcsv_badheader' => 'Fähler: De Shpallde-Övverschreff för $1 es „$2“, mööt ävver „$3“ udder „$4“ sin, udder dat Fommaat „<code>Name_vun_ene_Schablohn[Name_vun_enem_Felldt]</code>“ han.',
+ 'right-datatransferimport' => 'Daate empoteere',
+);
+
+/** Kurdish (Latin) (Kurdî (Latin))
+ * @author George Animal
+ */
+$messages['ku-latn'] = array(
+ 'dt_xml_page' => 'Rûpel',
+ 'dt_xml_name' => 'Nav',
+ 'dt_xml_title' => 'Sernav',
+ 'dt_import_summarydesc' => 'Kurteya împortê:',
+);
+
+/** Cornish (Kernowek)
+ * @author Kernoweger
+ * @author Kw-Moon
+ */
+$messages['kw'] = array(
+ 'dt_viewxml_categories' => 'Classys',
+ 'dt_xml_page' => 'Folen',
+);
+
+/** Luxembourgish (Lëtzebuergesch)
+ * @author Robby
+ */
+$messages['lb'] = array(
+ 'datatransfer-desc' => "Erlaabt et Daten déi an Opruffer vu schabloune benotzt ginn z'importéieren an z'exportéieren",
+ 'viewxml' => 'XML weisen',
+ 'dt_viewxml_docu' => 'Wielt w.e.g. ënnert dëse Kategorien an Nimmraim fir am XML-Format unzeweisen.',
+ 'dt_viewxml_categories' => 'Kategorien',
+ 'dt_viewxml_namespaces' => 'Nummraim',
+ 'dt_viewxml_simplifiedformat' => 'Vereinfachte Format',
+ 'dt_xml_namespace' => 'Nummraum',
+ 'dt_xml_pages' => 'Säiten',
+ 'dt_xml_page' => 'Säit',
+ 'dt_xml_template' => 'Schabloun',
+ 'dt_xml_field' => 'Feld',
+ 'dt_xml_name' => 'Numm',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'Nummer',
+ 'dt_xml_freetext' => 'Fräien Text',
+ 'importxml' => 'XML importéieren',
+ 'dt_import_selectfile' => "Sicht de(n) $1-Fichier eraus fir z'importéieren:",
+ 'dt_import_encodingtype' => 'Encoding-Typ:',
+ 'dt_import_forexisting' => 'Fir Säiten déi et scho gëtt:',
+ 'dt_import_overwriteexisting' => 'Den Inhalt den et gëtt iwwerschreiwen',
+ 'dt_import_skipexisting' => 'Iwwersprangen',
+ 'dt_import_appendtoexisting' => 'Bäi den Inhalt deen et gëtt derbäisetzen',
+ 'dt_import_summarydesc' => 'Resumé vum Import:',
+ 'dt_import_editsummary' => '$1 importéieren',
+ 'dt_import_importing' => 'Import am gaang ...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|Säit gëtt|Säite ginn}} aus dem $2-Fichier ugeluecht.',
+ 'importcsv' => 'CSV importéieren',
+ 'dt_importcsv_badheader' => "Feeler: D'Iwwerschrëft vun der Kolonn $1, '$2', muss entweder '$3', '$4' oder am Format 'Numm_vun_der_Schabloun(Numm_vum_Feld)' sinn",
+ 'right-datatransferimport' => 'Donnéeën importéieren',
+);
+
+/** Limburgish (Limburgs)
+ * @author Aelske
+ * @author Remember the dot
+ */
+$messages['li'] = array(
+ 'dt_xml_page' => 'Pagina',
+);
+
+/** Lithuanian (Lietuvių)
+ * @author Tomasdd
+ */
+$messages['lt'] = array(
+ 'dt_viewxml_categories' => 'Kategorijos',
+);
+
+/** Latgalian (Latgaļu)
+ * @author Dark Eagle
+ */
+$messages['ltg'] = array(
+ 'dt_viewxml_namespaces' => 'Vuordu pluoti',
+ 'dt_xml_namespace' => 'Vuordu pluots',
+ 'dt_xml_pages' => 'Puslopys',
+);
+
+/** Latvian (Latviešu)
+ * @author GreenZeb
+ */
+$messages['lv'] = array(
+ 'dt_viewxml_categories' => 'Kategorijas',
+ 'dt_viewxml_namespaces' => 'Vārdtelpas',
+ 'dt_viewxml_simplifiedformat' => 'Vienkāršots formāts',
+ 'dt_xml_namespace' => 'Vārdtelpa',
+ 'dt_xml_pages' => 'Lapas',
+ 'dt_xml_page' => 'Lapa',
+ 'dt_xml_template' => 'Veidne',
+ 'dt_xml_field' => 'Lauks',
+ 'dt_xml_name' => 'Vārds',
+ 'dt_xml_title' => 'Nosaukums',
+ 'dt_xml_id' => 'ID',
+);
+
+/** Eastern Mari (Олык Марий)
+ * @author Сай
+ */
+$messages['mhr'] = array(
+ 'dt_xml_namespace' => 'Лӱм-влакын кумдыкышт',
+ 'dt_xml_page' => 'Лаштык',
+);
+
+/** Macedonian (Македонски)
+ * @author Bjankuloski06
+ */
+$messages['mk'] = array(
+ 'datatransfer-desc' => 'Овозможува увоз и извоз на податоци содржани во повикувањата на шаблоните',
+ 'viewxml' => 'Преглед на XML',
+ 'dt_viewxml_docu' => 'Одберете од следиве категории и именски простори за преглед во XML формат.',
+ 'dt_viewxml_categories' => 'Категории',
+ 'dt_viewxml_namespaces' => 'Именски простори',
+ 'dt_viewxml_simplifiedformat' => 'Упростен формат',
+ 'dt_xml_namespace' => 'Именски простор',
+ 'dt_xml_pages' => 'Страници',
+ 'dt_xml_page' => 'Страница',
+ 'dt_xml_template' => 'Шаблон',
+ 'dt_xml_field' => 'Поле',
+ 'dt_xml_name' => 'Име',
+ 'dt_xml_title' => 'Наслов',
+ 'dt_xml_id' => 'ид. бр.',
+ 'dt_xml_freetext' => 'Слободен текст',
+ 'importxml' => 'Увоз на XML',
+ 'dt_import_selectfile' => 'Одберете ја $1 податотеката за увоз:',
+ 'dt_import_encodingtype' => 'Тип на кодирање:',
+ 'dt_import_forexisting' => 'За страници што веќе постојат:',
+ 'dt_import_overwriteexisting' => 'Презапиши врз постоечките содржини',
+ 'dt_import_skipexisting' => 'Прескокни',
+ 'dt_import_appendtoexisting' => 'Додај во постоечката содржина',
+ 'dt_import_summarydesc' => 'Опис на увозот:',
+ 'dt_import_editsummary' => 'Увоз на $1',
+ 'dt_import_importing' => 'Увезувам...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|страница ќе биде создадена|страници ќе бидат создадени}} од $2 податотеката.',
+ 'importcsv' => 'Увоз на CSV',
+ 'dt_importcsv_badheader' => 'Грешка: насловот на колона $1, „$2“, мора да биде или „$3“, или „$4“, или пак од обликот „template_name[field_name]“',
+ 'right-datatransferimport' => 'Увезување податоци',
+);
+
+/** Malayalam (മലയാളം)
+ * @author Junaidpv
+ * @author Praveenp
+ * @author Shijualex
+ */
+$messages['ml'] = array(
+ 'viewxml' => 'XML കാണുക',
+ 'dt_viewxml_categories' => 'വർഗ്ഗങ്ങൾ',
+ 'dt_viewxml_namespaces' => 'നാമമേഖലകൾ',
+ 'dt_viewxml_simplifiedformat' => 'ലളിതവത്ക്കരിക്കപ്പെട്ട ഫോർമാറ്റ്',
+ 'dt_xml_namespace' => 'നാമമേഖല',
+ 'dt_xml_pages' => 'താളുകൾ',
+ 'dt_xml_page' => 'താൾ',
+ 'dt_xml_template' => 'ഫലകം',
+ 'dt_xml_field' => 'ഫീൽഡ്',
+ 'dt_xml_name' => 'പേര്',
+ 'dt_xml_title' => 'ശീർഷകം',
+ 'dt_xml_id' => 'ഐ.ഡി.',
+ 'dt_xml_freetext' => 'സ്വതന്ത്ര എഴുത്ത്',
+ 'importxml' => 'എക്സ്.എം.എൽ. ഇറക്കുമതി',
+ 'dt_import_selectfile' => 'ദയവായി ഇറക്കുമതിക്കായി $1 പ്രമാണം തിരഞ്ഞെടുക്കുക:',
+ 'dt_import_encodingtype' => 'എൻകോഡിങ് തരം:',
+ 'dt_import_forexisting' => 'നിലവിലുള്ള താളുകൾക്ക് വേണ്ടി:',
+ 'dt_import_appendtoexisting' => 'നിലവിലുള്ള ഉള്ളടക്കത്തോട് കൂട്ടിച്ചേർക്കുക',
+ 'dt_import_summarydesc' => 'ഇറക്കുമതിയുടെ സംഗ്രഹം:',
+ 'dt_import_editsummary' => '$1 ഇറക്കുമതി',
+ 'dt_import_importing' => 'ഇറക്കുമതി ചെയ്യുന്നു...',
+ 'importcsv' => 'സി.എസ്.വി. ഇറക്കുമതി',
+);
+
+/** Mongolian (Монгол)
+ * @author Chinneeb
+ */
+$messages['mn'] = array(
+ 'dt_viewxml_categories' => 'Ангиллууд',
+ 'dt_viewxml_namespaces' => 'Нэрний зайнууд',
+ 'dt_xml_namespace' => 'Нэрний зай',
+ 'dt_xml_page' => 'Хуудас',
+);
+
+/** Marathi (मराठी)
+ * @author Kaustubh
+ * @author V.narsikar
+ */
+$messages['mr'] = array(
+ 'datatransfer-desc' => 'साचा कॉल मध्ये असणार्या डाटाची आयात निर्यात करण्याची परवानगी देतो',
+ 'viewxml' => 'XML पहा',
+ 'dt_viewxml_docu' => 'कॄपया XML मध्ये पाहण्यासाठी खालीलपैकी वर्ग व नामविश्वे निवडा.',
+ 'dt_viewxml_categories' => 'वर्ग',
+ 'dt_viewxml_namespaces' => 'नामविश्वे',
+ 'dt_viewxml_simplifiedformat' => 'सोप्या प्रकारे',
+ 'dt_xml_namespace' => 'नामविश्व',
+ 'dt_xml_page' => 'पान',
+ 'dt_xml_field' => 'रकाना',
+ 'dt_xml_name' => 'नाव',
+ 'dt_xml_title' => 'शीर्षक',
+ 'dt_xml_id' => 'क्रमांक (आयडी)',
+ 'dt_xml_freetext' => 'मुक्त मजकूर',
+ 'importxml' => 'एक्सएमएल आयात करा',
+);
+
+/** Mirandese (Mirandés)
+ * @author Malafaya
+ */
+$messages['mwl'] = array(
+ 'dt_xml_page' => 'Páigina',
+);
+
+/** Erzya (Эрзянь)
+ * @author Botuzhaleny-sodamo
+ */
+$messages['myv'] = array(
+ 'dt_viewxml_categories' => 'Категорият',
+ 'dt_viewxml_namespaces' => 'Лем потмот',
+ 'dt_xml_page' => 'Лопа',
+ 'dt_xml_template' => 'Лопа парцун',
+ 'dt_xml_field' => 'Пакся',
+ 'dt_xml_name' => 'Лемезэ',
+ 'dt_xml_title' => 'Конякс',
+);
+
+/** Mazanderani (مازِرونی)
+ * @author محک
+ */
+$messages['mzn'] = array(
+ 'dt_viewxml_categories' => 'رجئون',
+);
+
+/** Nahuatl (Nāhuatl)
+ * @author Fluence
+ */
+$messages['nah'] = array(
+ 'dt_viewxml_categories' => 'Neneuhcāyōtl',
+ 'dt_viewxml_namespaces' => 'Tōcātzin',
+ 'dt_xml_namespace' => 'Tōcātzin',
+ 'dt_xml_page' => 'Zāzanilli',
+ 'dt_xml_name' => 'Tōcāitl',
+ 'dt_xml_title' => 'Tōcāitl',
+ 'dt_xml_id' => 'ID',
+);
+
+/** Low German (Plattdüütsch)
+ * @author Slomox
+ */
+$messages['nds'] = array(
+ 'dt_xml_name' => 'Naam',
+);
+
+/** Dutch (Nederlands)
+ * @author Siebrand
+ * @author Tvdm
+ */
+$messages['nl'] = array(
+ 'datatransfer-desc' => 'Maakt het importeren en exporteren van gestructureerde gegevens in sjabloonaanroepen mogelijk',
+ 'viewxml' => 'XML bekijken',
+ 'dt_viewxml_docu' => 'Selecteer uit de volgende categorieën en naamruimten om in XML-formaat te bekijken.',
+ 'dt_viewxml_categories' => 'Categorieën',
+ 'dt_viewxml_namespaces' => 'Naamruimten',
+ 'dt_viewxml_simplifiedformat' => 'Vereenvoudigd formaat',
+ 'dt_xml_namespace' => 'Naamruimte',
+ 'dt_xml_pages' => "Pagina's",
+ 'dt_xml_page' => 'Pagina',
+ 'dt_xml_template' => 'Sjabloon',
+ 'dt_xml_field' => 'Veld',
+ 'dt_xml_name' => 'Naam',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Vrije tekst',
+ 'importxml' => 'XML importeren',
+ 'dt_import_selectfile' => 'Selecteer het te importeren bestand van het type $1:',
+ 'dt_import_encodingtype' => 'Coderingstype:',
+ 'dt_import_forexisting' => "Voor pagina's die al bestaan:",
+ 'dt_import_overwriteexisting' => 'Bestaande inhoud overschrijven',
+ 'dt_import_skipexisting' => 'Overslaan',
+ 'dt_import_appendtoexisting' => 'Toevoegen aan bestaande inhoud',
+ 'dt_import_summarydesc' => 'Samenvatting van de import:',
+ 'dt_import_editsummary' => '$1-import',
+ 'dt_import_importing' => 'Bezig met importeren…',
+ 'dt_import_success' => "Uit het $2-bestand {{PLURAL:$1|wordt één pagina|worden $1 pagina's}} geïmporteerd.",
+ 'importcsv' => 'CSV importeren',
+ 'dt_importcsv_badheader' => 'Fout: De kop van kolom $1, "$2", moet "$3" of "$4" zijn, of in de vorm "sjabloonnaam[veldnaam]" genoteerd worden.',
+ 'right-datatransferimport' => 'Gegevens importeren',
+);
+
+/** Norwegian Nynorsk (Norsk (nynorsk))
+ * @author Gunnernett
+ * @author Harald Khan
+ * @author Jon Harald Søby
+ */
+$messages['nn'] = array(
+ 'datatransfer-desc' => 'Gjer det mogleg å importera og eksportera data i maloppkallingar',
+ 'viewxml' => 'Syn XML',
+ 'dt_viewxml_docu' => 'Vel mellom følgjande kategoriar og namnerom for å syna dei i XML-format.',
+ 'dt_viewxml_categories' => 'Kategoriar',
+ 'dt_viewxml_namespaces' => 'Namnerom',
+ 'dt_viewxml_simplifiedformat' => 'Forenkla format',
+ 'dt_xml_namespace' => 'Namnerom',
+ 'dt_xml_pages' => 'Sider',
+ 'dt_xml_page' => 'Side',
+ 'dt_xml_template' => 'Mal',
+ 'dt_xml_field' => 'Felt',
+ 'dt_xml_name' => 'Namn',
+ 'dt_xml_title' => 'Tittel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Fritekst',
+ 'importxml' => 'Importer XML',
+ 'dt_import_selectfile' => 'Ver venleg og vel $1-fila som skal verta importert:',
+ 'dt_import_encodingtype' => 'Teiknkodingstype:',
+ 'dt_import_editsummary' => '$1-importering',
+ 'dt_import_importing' => 'Importerer...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|Éi side vil verta importert|$1 sider vil verta importerte}} frå $2-fila.',
+ 'importcsv' => 'Importer CSV',
+ 'dt_importcsv_badheader' => "Feil: kolonneoverskrifta $1, '$2', må vera anten '$3', '$4' eller på forma 'malnamn[feltnamn]'",
+ 'right-datatransferimport' => 'Importer data',
+);
+
+/** Norwegian (bokmål) (Norsk (bokmål))
+ * @author Jon Harald Søby
+ * @author Nghtwlkr
+ */
+$messages['no'] = array(
+ 'datatransfer-desc' => 'Gjør det mulig å importere og eksportere data som finnes i maloppkallinger',
+ 'viewxml' => 'Se XML',
+ 'dt_viewxml_docu' => 'Velg blant følgende kategorier og navnerom for å se dem i XML-format',
+ 'dt_viewxml_categories' => 'Kategorier',
+ 'dt_viewxml_namespaces' => 'Navnerom',
+ 'dt_viewxml_simplifiedformat' => 'Forenklet format',
+ 'dt_xml_namespace' => 'Navnerom',
+ 'dt_xml_pages' => 'Sider',
+ 'dt_xml_page' => 'Side',
+ 'dt_xml_template' => 'Mal',
+ 'dt_xml_field' => 'Felt',
+ 'dt_xml_name' => 'Navn',
+ 'dt_xml_title' => 'Tittel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Fritekst',
+ 'importxml' => 'Importer XML',
+ 'dt_import_selectfile' => 'Vennligst velg $1-filen som skal importeres:',
+ 'dt_import_encodingtype' => 'Tegnkodingstype:',
+ 'dt_import_forexisting' => 'For sider som allerede finnes:',
+ 'dt_import_overwriteexisting' => 'Skriv over eksisterende innhold',
+ 'dt_import_skipexisting' => 'Hopp over',
+ 'dt_import_appendtoexisting' => 'Tilføy til eksisterende innhold',
+ 'dt_import_summarydesc' => 'Importsammendrag:',
+ 'dt_import_editsummary' => '$1-importering',
+ 'dt_import_importing' => 'Importerer...',
+ 'dt_import_success' => '{{PLURAL:$1|Én side|$1 sider}} vil bli importert fra $2-filen.',
+ 'importcsv' => 'Importer CSV',
+ 'dt_importcsv_badheader' => "Feil: kolonneoverskriften $1, '$2', må være enten '$3', '$4' eller på formen 'malnavn[feltnavn]'",
+ 'right-datatransferimport' => 'Importer data',
+);
+
+/** Occitan (Occitan)
+ * @author Cedric31
+ */
+$messages['oc'] = array(
+ 'datatransfer-desc' => "Permet l’impòrt e l’expòrt de donadas contengudas dins d'apèls de modèls",
+ 'viewxml' => 'Veire XML',
+ 'dt_viewxml_docu' => 'Seleccionatz demest las categorias e los espacis de nomenatges per visionar en format XML.',
+ 'dt_viewxml_categories' => 'Categorias',
+ 'dt_viewxml_namespaces' => 'Espacis de nomenatge',
+ 'dt_viewxml_simplifiedformat' => 'Format simplificat',
+ 'dt_xml_namespace' => 'Espaci de nom',
+ 'dt_xml_pages' => 'Paginas',
+ 'dt_xml_page' => 'Pagina',
+ 'dt_xml_template' => 'Modèl',
+ 'dt_xml_field' => 'Camp',
+ 'dt_xml_name' => 'Nom',
+ 'dt_xml_title' => 'Títol',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Tèxte Liure',
+ 'importxml' => 'Impòrt en XML',
+ 'dt_import_selectfile' => "Seleccionatz lo fichièr $1 d'importar :",
+ 'dt_import_encodingtype' => 'Tipe d’encodatge:',
+ 'dt_import_editsummary' => 'Importacion $1',
+ 'dt_import_importing' => 'Impòrt en cors...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|pagina serà creada|paginas seràn creadas}} dempuèi lo fichièr $2.',
+ 'importcsv' => 'Impòrt CSV',
+ 'dt_importcsv_badheader' => 'Error : lo títol de colomna $1, « $2 », deu èsser siá « $3 », « $4 » o de la forma « nom_del_modèl[nom_del_camp] »',
+ 'right-datatransferimport' => 'Importar de donadas',
+);
+
+/** Ossetic (Иронау)
+ * @author Amikeco
+ */
+$messages['os'] = array(
+ 'dt_xml_page' => 'Фарс',
+ 'dt_xml_template' => 'Шаблон',
+ 'dt_xml_title' => 'Сæргонд',
+);
+
+/** Deitsch (Deitsch)
+ * @author Xqt
+ */
+$messages['pdc'] = array(
+ 'dt_viewxml_categories' => 'Abdeelinge',
+ 'dt_viewxml_namespaces' => 'Blatznaame',
+ 'dt_xml_namespace' => 'Blatznaame',
+ 'dt_xml_pages' => 'Bledder',
+ 'dt_xml_page' => 'Blatt',
+ 'dt_xml_template' => 'Moddel',
+ 'dt_xml_name' => 'Naame',
+ 'dt_xml_title' => 'Titel',
+);
+
+/** Polish (Polski)
+ * @author McMonster
+ * @author Sp5uhe
+ * @author Wpedzich
+ */
+$messages['pl'] = array(
+ 'datatransfer-desc' => 'Pozwala na importowanie i eksportowanie danych zawartych w wywołaniach szablonu',
+ 'viewxml' => 'Podgląd XML',
+ 'dt_viewxml_docu' => 'Wybierz, które spośród następujących kategorii i przestrzeni nazw chcesz podejrzeć w formacie XML.',
+ 'dt_viewxml_categories' => 'Kategorie',
+ 'dt_viewxml_namespaces' => 'Przestrzenie nazw',
+ 'dt_viewxml_simplifiedformat' => 'Format uproszczony',
+ 'dt_xml_namespace' => 'Przestrzeń nazw',
+ 'dt_xml_pages' => 'Strony',
+ 'dt_xml_page' => 'Strona',
+ 'dt_xml_template' => 'Szablon',
+ 'dt_xml_field' => 'Pole',
+ 'dt_xml_name' => 'Nazwa',
+ 'dt_xml_title' => 'Tytuł',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Dowolny tekst',
+ 'importxml' => 'Import XML',
+ 'dt_import_selectfile' => 'Wybierz plik $1 do zaimportowania',
+ 'dt_import_encodingtype' => 'Typ kodowania',
+ 'dt_import_forexisting' => 'Dla stron, które już istnieją:',
+ 'dt_import_overwriteexisting' => 'Zastąp istniejącą zawartość',
+ 'dt_import_skipexisting' => 'Pomiń',
+ 'dt_import_appendtoexisting' => 'Dołącz do istniejącej zawartości',
+ 'dt_import_summarydesc' => 'Podsumowanie importu',
+ 'dt_import_editsummary' => 'Import $1',
+ 'dt_import_importing' => 'Importowanie...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|strona zostanie utworzona|strony zostaną utworzone|stron zostanie utworzonych}} z pliku $2.',
+ 'importcsv' => 'Import CSV',
+ 'dt_importcsv_badheader' => 'Błąd – w kolumnie $1 nagłówka jest „$2”, a powinno być: „$3”, „$4” lub „nazwa_szablonu[nazwa_pola]”',
+ 'right-datatransferimport' => 'Importowanie danych',
+);
+
+/** Piedmontese (Piemontèis)
+ * @author Borichèt
+ * @author Dragonòt
+ */
+$messages['pms'] = array(
+ 'datatransfer-desc' => "A përmëtt d'amporté e esporté ij dat contnù ant le ciamà a stamp",
+ 'viewxml' => 'Varda XML',
+ 'dt_viewxml_docu' => 'Për piasì selession-a an tra le categorìe sota e jë spassi nominaj për vëdde an formà XLM.',
+ 'dt_viewxml_categories' => 'Categorìe',
+ 'dt_viewxml_namespaces' => 'Spassi nominaj',
+ 'dt_viewxml_simplifiedformat' => 'Formà semplificà',
+ 'dt_xml_namespace' => 'Spassi nominal',
+ 'dt_xml_pages' => 'Pàgine',
+ 'dt_xml_page' => 'Pàgina',
+ 'dt_xml_template' => 'Stamp',
+ 'dt_xml_field' => 'Camp',
+ 'dt_xml_name' => 'Nòm',
+ 'dt_xml_title' => 'Tìtol',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Test lìber',
+ 'importxml' => 'Ampòrta XML',
+ 'dt_import_selectfile' => 'Për piasì selession-a ël file $1 da amporté:',
+ 'dt_import_encodingtype' => 'Tipo ëd codìfica:',
+ 'dt_import_forexisting' => "Për pàgine ch'a esisto già:",
+ 'dt_import_overwriteexisting' => 'Coaté ël contnù esistent',
+ 'dt_import_skipexisting' => 'Saoté',
+ 'dt_import_appendtoexisting' => 'Gionté al contnù esistent',
+ 'dt_import_summarydesc' => "Somari dj'amportassion:",
+ 'dt_import_editsummary' => '$1 ampòrta',
+ 'dt_import_importing' => "An camin ch'as ampòrta...",
+ 'dt_import_success' => "$1 {{PLURAL:$1|pàgina|pàgine}} a saran creà da l'archivi $2.",
+ 'importcsv' => 'Ampòrta CSV',
+ 'dt_importcsv_badheader' => "Eror: l'antestassion ëd la colòna $1, '$2', a deuv esse '$3', '$4' o ëd la forma 'template_name[field_name]'",
+ 'right-datatransferimport' => 'Ampòrta dat',
+);
+
+/** Pashto (پښتو)
+ * @author Ahmed-Najib-Biabani-Ibrahimkhel
+ */
+$messages['ps'] = array(
+ 'dt_viewxml_categories' => 'وېشنيزې',
+ 'dt_viewxml_namespaces' => 'نوم-تشيالونه',
+ 'dt_xml_namespace' => 'نوم-تشيال',
+ 'dt_xml_pages' => 'مخونه',
+ 'dt_xml_page' => 'مخ',
+ 'dt_xml_template' => 'کينډۍ',
+ 'dt_xml_name' => 'نوم',
+ 'dt_xml_title' => 'سرليک',
+ 'dt_xml_freetext' => 'خپلواکه متن',
+);
+
+/** Portuguese (Português)
+ * @author Hamilton Abreu
+ * @author Lijealso
+ * @author Malafaya
+ */
+$messages['pt'] = array(
+ 'datatransfer-desc' => 'Permite importação e exportação de dados contidos em chamadas de predefinições',
+ 'viewxml' => 'Ver XML',
+ 'dt_viewxml_docu' => 'Por favor, seleccione de entre as categorias e espaços nominais seguintes para ver em formato XML.',
+ 'dt_viewxml_categories' => 'Categorias',
+ 'dt_viewxml_namespaces' => 'Espaços nominais',
+ 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
+ 'dt_xml_namespace' => 'Espaço nominal',
+ 'dt_xml_pages' => 'Páginas',
+ 'dt_xml_page' => 'Página',
+ 'dt_xml_template' => 'Predefinição',
+ 'dt_xml_field' => 'Campo',
+ 'dt_xml_name' => 'Nome',
+ 'dt_xml_title' => 'Título',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Texto Livre',
+ 'importxml' => 'Importar XML',
+ 'dt_import_selectfile' => 'Por favor, selecione o ficheiro $1 a importar:',
+ 'dt_import_encodingtype' => 'Tipo de codificação:',
+ 'dt_import_forexisting' => 'Para páginas que já existem:',
+ 'dt_import_overwriteexisting' => 'Sobrescrever o conteúdo existente',
+ 'dt_import_skipexisting' => 'Saltar',
+ 'dt_import_appendtoexisting' => 'Acrescentar ao conteúdo existente',
+ 'dt_import_summarydesc' => 'Resumo da importação:',
+ 'dt_import_editsummary' => 'Importação de $1',
+ 'dt_import_importing' => 'Importando...',
+ 'dt_import_success' => '{{PLURAL:$1|A página será importada|As páginas serão importadas}} a partir do ficheiro $2.',
+ 'importcsv' => 'Importar CSV',
+ 'dt_importcsv_badheader' => "Erro: o cabeçalho da coluna $1, '$2', deve ser '$3', '$4' ou ter a forma 'nome_da_predefinição[nome_do_campo]'",
+ 'right-datatransferimport' => 'Importar dados',
+);
+
+/** Brazilian Portuguese (Português do Brasil)
+ * @author Eduardo.mps
+ * @author Giro720
+ */
+$messages['pt-br'] = array(
+ 'datatransfer-desc' => 'Permite a importação e exportação de dados contidos em chamadas de predefinições',
+ 'viewxml' => 'Ver XML',
+ 'dt_viewxml_docu' => 'Por favor, selecione dentre as categorias e espaços nominais seguintes para ver em formato XML.',
+ 'dt_viewxml_categories' => 'Categorias',
+ 'dt_viewxml_namespaces' => 'Espaços nominais',
+ 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
+ 'dt_xml_namespace' => 'Espaço nominal',
+ 'dt_xml_pages' => 'Páginas',
+ 'dt_xml_page' => 'Página',
+ 'dt_xml_template' => 'Predefinição',
+ 'dt_xml_field' => 'Campo',
+ 'dt_xml_name' => 'Nome',
+ 'dt_xml_title' => 'Título',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Texto Livre',
+ 'importxml' => 'Importar XML',
+ 'dt_import_selectfile' => 'Por favor selecione o arquivo $1 para importar:',
+ 'dt_import_encodingtype' => 'Codificação:',
+ 'dt_import_forexisting' => 'Para páginas que já existem:',
+ 'dt_import_overwriteexisting' => 'Sobrescrever o conteúdo existente',
+ 'dt_import_skipexisting' => 'Pular',
+ 'dt_import_appendtoexisting' => 'Adicionar ao conteúdo existente',
+ 'dt_import_summarydesc' => 'Resumo da importação:',
+ 'dt_import_editsummary' => 'Importação de $1',
+ 'dt_import_importing' => 'Importando...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|página será importada|páginas serão importadas}} do arquivo $2.',
+ 'importcsv' => 'Importar CSV',
+ 'dt_importcsv_badheader' => "Erro: o cabeçalho da coluna $1, '$2', deve ser '$3', ou '$4' ou da forma 'nome_modelo[nome_campo]'",
+ 'right-datatransferimport' => 'Importar dados',
+);
+
+/** Romanian (Română)
+ * @author KlaudiuMihaila
+ * @author Stelistcristi
+ */
+$messages['ro'] = array(
+ 'viewxml' => 'Vizualizează XML',
+ 'dt_viewxml_categories' => 'Categorii',
+ 'dt_viewxml_namespaces' => 'Spații de nume',
+ 'dt_viewxml_simplifiedformat' => 'Format simplificat',
+ 'dt_xml_namespace' => 'Spațiu de nume',
+ 'dt_xml_pages' => 'Pagini',
+ 'dt_xml_page' => 'Pagină',
+ 'dt_xml_template' => 'Format',
+ 'dt_xml_field' => 'Câmp',
+ 'dt_xml_name' => 'Nume',
+ 'dt_xml_title' => 'Titlu',
+ 'dt_xml_id' => 'ID',
+ 'importxml' => 'Importă XML',
+ 'dt_import_summarydesc' => 'Descrierea importului:',
+ 'dt_import_importing' => 'Importare...',
+ 'importcsv' => 'Importă CSV',
+ 'right-datatransferimport' => 'Importă date',
+);
+
+/** Tarandíne (Tarandíne)
+ * @author Joetaras
+ */
+$messages['roa-tara'] = array(
+ 'datatransfer-desc' => "Permètte de 'mbortà e esportà date strutturate ca stonne jndr'à le chiamate a le template",
+ 'viewxml' => "Vide l'XML",
+ 'dt_viewxml_docu' => "Pe piacere scacchie ìmbrà le categorije seguende e le namespace seguende pe vedè 'u formate XML.",
+ 'dt_viewxml_categories' => 'Categorije',
+ 'dt_viewxml_namespaces' => 'Namespace',
+ 'dt_viewxml_simplifiedformat' => 'Formate semblifichete',
+ 'dt_xml_namespace' => 'Namespace',
+ 'dt_xml_pages' => 'Pàggene',
+ 'dt_xml_page' => 'Pàgene',
+ 'dt_xml_template' => 'Template',
+ 'dt_xml_field' => 'Cambe',
+ 'dt_xml_name' => 'Nome',
+ 'dt_xml_title' => 'Titele',
+ 'dt_xml_id' => 'Codece (ID)',
+ 'dt_xml_freetext' => 'Teste libbere',
+ 'importxml' => "'Mborte XML",
+);
+
+/** Russian (Русский)
+ * @author Ferrer
+ * @author Innv
+ * @author Александр Сигачёв
+ */
+$messages['ru'] = array(
+ 'datatransfer-desc' => 'Позволяет импортировать и экспортировать данные, содержащиеся в вызовах шаблонов',
+ 'viewxml' => 'Просмотр XML',
+ 'dt_viewxml_docu' => 'Пожалуйста, выберите категории и пространства имён для просмотра в формате XML.',
+ 'dt_viewxml_categories' => 'Категории',
+ 'dt_viewxml_namespaces' => 'Пространства имён',
+ 'dt_viewxml_simplifiedformat' => 'Упрощённый формат',
+ 'dt_xml_namespace' => 'Пространство имён',
+ 'dt_xml_pages' => 'Страницы',
+ 'dt_xml_page' => 'Страница',
+ 'dt_xml_template' => 'Шаблон',
+ 'dt_xml_field' => 'Поле',
+ 'dt_xml_name' => 'Имя',
+ 'dt_xml_title' => 'Заголовок',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Свободный текст',
+ 'importxml' => 'Импорт XML',
+ 'dt_import_selectfile' => 'Пожалуйста, выберите файл $1 для импорта:',
+ 'dt_import_encodingtype' => 'Тип кодировки:',
+ 'dt_import_forexisting' => 'Для страниц, которые уже существуют:',
+ 'dt_import_overwriteexisting' => 'Переписать существующие данные',
+ 'dt_import_skipexisting' => 'Пропустить',
+ 'dt_import_appendtoexisting' => 'Добавить к существующим данным',
+ 'dt_import_summarydesc' => 'Описание импорта:',
+ 'dt_import_editsummary' => 'импорт $1',
+ 'dt_import_importing' => 'Импортирование...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|страница была|страницы были|страниц были}} созданы из файла $2.',
+ 'importcsv' => 'Импорт CSV',
+ 'dt_importcsv_badheader' => 'Ошибка. Заголовок колонки №$1 «$2» должен быть или «$3», или «$4», или в форме «template_name[field_name]»',
+ 'right-datatransferimport' => 'импорт информации',
+);
+
+/** Rusyn (Русиньскый)
+ * @author Gazeb
+ */
+$messages['rue'] = array(
+ 'dt_viewxml_categories' => 'Катеґорії',
+ 'dt_viewxml_namespaces' => 'Просторы назв',
+ 'dt_viewxml_simplifiedformat' => 'Простый формат',
+ 'dt_xml_namespace' => 'Простор назв',
+ 'dt_xml_pages' => 'Сторінкы',
+ 'dt_xml_page' => 'Сторінка',
+ 'dt_xml_template' => 'Шаблона',
+ 'dt_xml_field' => 'Поле',
+ 'dt_xml_name' => 'Назва',
+ 'dt_xml_title' => 'Надпис',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Вольный текст',
+ 'importxml' => 'Імпортовати XML',
+);
+
+/** Sicilian (Sicilianu)
+ * @author Aushulz
+ */
+$messages['scn'] = array(
+ 'dt_xml_name' => 'Nomu',
+ 'dt_xml_id' => 'ID',
+);
+
+/** Slovak (Slovenčina)
+ * @author Helix84
+ */
+$messages['sk'] = array(
+ 'datatransfer-desc' => 'Umožňuje import a export údajov obsiahnutých v bunkách šablón',
+ 'viewxml' => 'Zobraziť XML',
+ 'dt_viewxml_docu' => 'Prosím, vyberte ktorý spomedzi nasledovných kategórií a menných priestorov zobraziť vo formáte XML.',
+ 'dt_viewxml_categories' => 'Kategórie',
+ 'dt_viewxml_namespaces' => 'Menné priestory',
+ 'dt_viewxml_simplifiedformat' => 'Zjednodušený formát',
+ 'dt_xml_namespace' => 'Menný priestor',
+ 'dt_xml_pages' => 'Stránky',
+ 'dt_xml_page' => 'Stránka',
+ 'dt_xml_template' => 'Šablóna',
+ 'dt_xml_field' => 'Pole',
+ 'dt_xml_name' => 'Názov',
+ 'dt_xml_title' => 'Nadpis',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Voľný text',
+ 'importxml' => 'Importovať XML',
+ 'dt_import_selectfile' => 'Prosím, vyberte $1 súbor, ktorý chcete importovať:',
+ 'dt_import_encodingtype' => 'Typ kódovania:',
+ 'dt_import_editsummary' => 'Import $1',
+ 'dt_import_importing' => 'Prebieha import...',
+ 'dt_import_success' => 'Z $2 súboru sa {{PLURAL:$1|importuje $1 stránka|importujú $1 stránky|importuje $1 stránok}}.',
+ 'importcsv' => 'Import CSV',
+ 'dt_importcsv_badheader' => 'Chyba: stĺpec $1 hlavičky, „$2“ musí mať hodnotu buď „$3“, „$4“ alebo byť v tvare „názov_šablóny[názov_poľa]“',
+ 'right-datatransferimport' => 'Importovať údaje',
+);
+
+/** Slovenian (Slovenščina)
+ * @author Dbc334
+ */
+$messages['sl'] = array(
+ 'dt_xml_pages' => 'Strani',
+ 'dt_xml_page' => 'Stran',
+);
+
+/** Serbian Cyrillic ekavian (Српски (ћирилица))
+ * @author Rancher
+ * @author Sasa Stefanovic
+ * @author Жељко Тодоровић
+ * @author Михајло Анђелковић
+ */
+$messages['sr-ec'] = array(
+ 'viewxml' => 'Види XML',
+ 'dt_viewxml_categories' => 'Категорије',
+ 'dt_viewxml_namespaces' => 'Именски простори',
+ 'dt_viewxml_simplifiedformat' => 'Поједностављени формат',
+ 'dt_xml_namespace' => 'Именски простор',
+ 'dt_xml_pages' => 'Чланци',
+ 'dt_xml_page' => 'Страница',
+ 'dt_xml_template' => 'Шаблон',
+ 'dt_xml_field' => 'Поље',
+ 'dt_xml_name' => 'Име',
+ 'dt_xml_title' => 'Наслов',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Слободан текст',
+ 'importxml' => 'Увези XML',
+ 'dt_import_editsummary' => '$1 увоз',
+ 'dt_import_importing' => 'Увоз у току...',
+ 'importcsv' => 'Увези CSV',
+ 'right-datatransferimport' => 'Увези податке',
+);
+
+/** Serbian Latin ekavian (Srpski (latinica))
+ * @author Michaello
+ * @author Жељко Тодоровић
+ */
+$messages['sr-el'] = array(
+ 'viewxml' => 'Vidi XML',
+ 'dt_viewxml_categories' => 'Kategorije',
+ 'dt_viewxml_namespaces' => 'Imenski prostori',
+ 'dt_viewxml_simplifiedformat' => 'Pojednostavljeni format',
+ 'dt_xml_namespace' => 'Imenski prostor',
+ 'dt_xml_pages' => 'Članci',
+ 'dt_xml_page' => 'Stranica',
+ 'dt_xml_template' => 'Šablon',
+ 'dt_xml_field' => 'Polje',
+ 'dt_xml_name' => 'Ime',
+ 'dt_xml_title' => 'Naslov',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Slobodan tekst',
+ 'importxml' => 'Uvezi XML',
+ 'dt_import_editsummary' => '$1 uvoz',
+ 'dt_import_importing' => 'Uvoz u toku...',
+ 'importcsv' => 'Uvezi CSV',
+ 'right-datatransferimport' => 'Uvezi podatke',
+);
+
+/** Seeltersk (Seeltersk)
+ * @author Pyt
+ */
+$messages['stq'] = array(
+ 'datatransfer-desc' => 'Ferlööwet dän Import un Export fon strukturierde Doaten, do der in Aproupen un Foarloagen ferwoand wäide.',
+ 'viewxml' => 'XML ankiekje',
+ 'dt_viewxml_docu' => 'Wääl uut, wäkke Kategorien in dät XML-Formoat anwiesd wäide schällen.',
+ 'dt_viewxml_categories' => 'Kategorien',
+ 'dt_viewxml_namespaces' => 'Noomensruume',
+ 'dt_viewxml_simplifiedformat' => 'Fereenfacht Formoat',
+ 'dt_xml_namespace' => 'Noomensruum',
+ 'dt_xml_page' => 'Siede',
+ 'dt_xml_field' => 'Fäild',
+ 'dt_xml_name' => 'Noome',
+ 'dt_xml_title' => 'Tittel',
+);
+
+/** Sundanese (Basa Sunda)
+ * @author Irwangatot
+ */
+$messages['su'] = array(
+ 'dt_viewxml_namespaces' => 'Ngaranspasi',
+);
+
+/** Swedish (Svenska)
+ * @author Fluff
+ * @author Gabbe.g
+ * @author Lejonel
+ * @author M.M.S.
+ * @author Per
+ */
+$messages['sv'] = array(
+ 'datatransfer-desc' => 'Tillåter import och export av data som finns i mallanrop',
+ 'viewxml' => 'Visa XML',
+ 'dt_viewxml_docu' => 'Välj vilka av följande kategorier och namnrymder som ska visas i XML-format.',
+ 'dt_viewxml_categories' => 'Kategorier',
+ 'dt_viewxml_namespaces' => 'Namnrymder',
+ 'dt_viewxml_simplifiedformat' => 'Förenklat format',
+ 'dt_xml_namespace' => 'Namnrymd',
+ 'dt_xml_pages' => 'Sidor',
+ 'dt_xml_page' => 'Sida',
+ 'dt_xml_template' => 'Mall',
+ 'dt_xml_field' => 'Fält',
+ 'dt_xml_name' => 'Namn',
+ 'dt_xml_title' => 'Titel',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Fritext',
+ 'importxml' => 'Importera XML',
+ 'dt_import_selectfile' => 'Vänligen välj $1-filen som skall importeras:',
+ 'dt_import_encodingtype' => 'Teckenkodningstyp:',
+ 'dt_import_editsummary' => '$1-importering',
+ 'dt_import_importing' => 'Importerar...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|sida|sidor}} kommer skapas från $2-filen.',
+ 'importcsv' => 'Importera CSV',
+ 'dt_importcsv_badheader' => "Fel: Titeln $2 för kolumnen $1 måste vara antingen $3, $4 eller på formen 'mallnamn[fältnamn]'",
+ 'right-datatransferimport' => 'Importera data',
+);
+
+/** Silesian (Ślůnski)
+ * @author Herr Kriss
+ */
+$messages['szl'] = array(
+ 'dt_xml_page' => 'Zajta',
+ 'dt_xml_name' => 'Mjano',
+);
+
+/** Tamil (தமிழ்)
+ * @author TRYPPN
+ * @author Trengarasu
+ * @author Ulmo
+ */
+$messages['ta'] = array(
+ 'dt_viewxml_categories' => 'பகுப்புகள்',
+ 'dt_viewxml_namespaces' => 'பெயர்வெளிகள்',
+ 'dt_viewxml_simplifiedformat' => 'எளிதாக்கப்பட்ட வடிவம்',
+ 'dt_xml_namespace' => 'பெயர்வெளி',
+ 'dt_xml_pages' => 'பக்கங்கள்',
+ 'dt_xml_page' => 'பக்கம்',
+ 'dt_xml_template' => 'வார்ப்புரு',
+ 'dt_xml_name' => 'பெயர்',
+ 'dt_xml_title' => 'தலைப்பு',
+ 'dt_xml_id' => 'அடையாளம்',
+ 'dt_xml_freetext' => 'எந்த கட்டுப்பாடும் இல்லா சொற்றொடர்',
+ 'dt_import_importing' => 'இறக்குமதியாகிறது...',
+);
+
+/** Telugu (తెలుగు)
+ * @author Veeven
+ */
+$messages['te'] = array(
+ 'viewxml' => 'XMLని చూడండి',
+ 'dt_viewxml_categories' => 'వర్గాలు',
+ 'dt_viewxml_namespaces' => 'పేరుబరులు',
+ 'dt_xml_namespace' => 'పేరుబరి',
+ 'dt_xml_pages' => 'పేజీలు',
+ 'dt_xml_page' => 'పేజీ',
+ 'dt_xml_template' => 'మూస',
+ 'dt_xml_name' => 'పేరు',
+ 'dt_xml_title' => 'శీర్షిక',
+ 'dt_xml_id' => 'ఐడీ',
+ 'dt_xml_freetext' => 'స్వేచ్ఛా పాఠ్యం',
+);
+
+/** Tetum (Tetun)
+ * @author MF-Warburg
+ */
+$messages['tet'] = array(
+ 'dt_viewxml_categories' => 'Kategoria sira',
+ 'dt_xml_namespace' => 'Espasu pájina nian',
+ 'dt_xml_page' => 'Pájina',
+ 'dt_xml_name' => 'Naran',
+ 'dt_xml_title' => 'Títulu:',
+ 'dt_xml_id' => 'ID',
+);
+
+/** Tajik (Cyrillic) (Тоҷикӣ (Cyrillic))
+ * @author Ibrahim
+ */
+$messages['tg-cyrl'] = array(
+ 'dt_viewxml_categories' => 'Гурӯҳҳо',
+ 'dt_viewxml_namespaces' => 'Фазоҳои ном',
+ 'dt_xml_namespace' => 'Фазоином',
+ 'dt_xml_page' => 'Саҳифа',
+ 'dt_xml_name' => 'Ном',
+ 'dt_xml_title' => 'Унвон',
+ 'dt_xml_freetext' => 'Матни дилхоҳ',
+);
+
+/** Tajik (Latin) (Тоҷикӣ (Latin))
+ * @author Liangent
+ */
+$messages['tg-latn'] = array(
+ 'dt_viewxml_categories' => 'Gurūhho',
+ 'dt_viewxml_namespaces' => 'Fazohoi nom',
+ 'dt_xml_namespace' => 'Fazoinom',
+ 'dt_xml_page' => 'Sahifa',
+ 'dt_xml_name' => 'Nom',
+ 'dt_xml_title' => 'Unvon',
+ 'dt_xml_freetext' => 'Matni dilxoh',
+);
+
+/** Thai (ไทย)
+ * @author Octahedron80
+ */
+$messages['th'] = array(
+ 'dt_viewxml_categories' => 'หมวดหมู่',
+ 'dt_viewxml_namespaces' => 'เนมสเปซ',
+ 'dt_xml_namespace' => 'เนมสเปซ',
+);
+
+/** Turkmen (Türkmençe)
+ * @author Hanberke
+ */
+$messages['tk'] = array(
+ 'dt_xml_page' => 'Sahypa',
+ 'dt_xml_name' => 'At',
+);
+
+/** Tagalog (Tagalog)
+ * @author AnakngAraw
+ */
+$messages['tl'] = array(
+ 'datatransfer-desc' => 'Nagpapahintulot sa pag-aangkat at pagluluwas ng mga datong nasa loob ng mga pagtawag sa suleras',
+ 'viewxml' => 'Tingnan ang XML',
+ 'dt_viewxml_docu' => 'Pumili po lamang mula sa sumusunod na mga kaurian at mga espasyo ng pangalan upang makita ang anyong XML.',
+ 'dt_viewxml_categories' => 'Mga kaurian',
+ 'dt_viewxml_namespaces' => 'Mga espasyo ng pangalan',
+ 'dt_viewxml_simplifiedformat' => 'Pinapayak na anyo',
+ 'dt_xml_namespace' => 'Espasyo ng pangalan',
+ 'dt_xml_pages' => 'Mga pahina',
+ 'dt_xml_page' => 'Pahina',
+ 'dt_xml_template' => 'Suleras',
+ 'dt_xml_field' => 'Hanay',
+ 'dt_xml_name' => 'Pangalan',
+ 'dt_xml_title' => 'Pamagat',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Malayang Teksto',
+ 'importxml' => 'Angkatin ang XML',
+ 'dt_import_selectfile' => 'Pakipili ang talaksang $1 na aangkatin:',
+ 'dt_import_encodingtype' => 'Uri ng pagkokodigo:',
+ 'dt_import_forexisting' => 'Para sa mga pahinang umiiral na:',
+ 'dt_import_overwriteexisting' => 'Patungan ang umiiral na nilalaman',
+ 'dt_import_skipexisting' => 'Laktawan',
+ 'dt_import_appendtoexisting' => 'Isugpong sa umiiral na nilalaman',
+ 'dt_import_summarydesc' => 'Buod ng pag-angkat:',
+ 'dt_import_editsummary' => 'Pag-angkat ng $1',
+ 'dt_import_importing' => 'Inaangkat...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|pahina|mga pahina}} ang lilikhain mula sa talaksang $2.',
+ 'importcsv' => 'Angkatin ang CSV',
+ 'dt_importcsv_badheader' => "Kamalian: ang patayong hanay ng paulong $1, '$2', ay dapat na '$3', '$4' o nasa pormang 'template_name[field_name]'",
+ 'right-datatransferimport' => 'Angkatin ang dato',
+);
+
+/** Turkish (Türkçe)
+ * @author Joseph
+ * @author Karduelis
+ * @author Mach
+ * @author Manco Capac
+ * @author Srhat
+ * @author Vito Genovese
+ */
+$messages['tr'] = array(
+ 'datatransfer-desc' => 'Şablon çağrılarında içerilen verilerin içe ve dışa aktarımına izin verir',
+ 'viewxml' => "XML'i gör",
+ 'dt_viewxml_docu' => 'Lütfen, XML formatında görüntülemek için aşağıdaki kategori ve ad alanları arasından seçin.',
+ 'dt_viewxml_categories' => 'Kategoriler',
+ 'dt_viewxml_namespaces' => 'İsim alanları',
+ 'dt_viewxml_simplifiedformat' => 'Basitleştirilmiş format',
+ 'dt_xml_namespace' => 'Ad alanı',
+ 'dt_xml_pages' => 'Sayfalar',
+ 'dt_xml_page' => 'Sayfa',
+ 'dt_xml_template' => 'Şablon',
+ 'dt_xml_field' => 'Alan',
+ 'dt_xml_name' => 'İsim',
+ 'dt_xml_title' => 'Başlık',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Özgür Metin',
+ 'importxml' => 'XML içe aktar',
+ 'dt_import_selectfile' => 'Lütfen içe aktarmak için $1 dosyasını seçin:',
+ 'dt_import_encodingtype' => 'Kodlama türü:',
+ 'dt_import_summarydesc' => 'İçe aktarma özeti:',
+ 'dt_import_editsummary' => '$1 içe aktarımı',
+ 'dt_import_importing' => 'İçe aktarıyor...',
+ 'dt_import_success' => '$2 dosyasından $1 {{PLURAL:$1|sayfa|sayfa}} oluşturulacak.',
+ 'importcsv' => "CSV'yi içe aktar",
+ 'dt_importcsv_badheader' => "Hata: $1 kolonunun başlığı olan '$2', '$3', '$4' ya da 'şablon_adı[alan_adı]' şeklinde olmalıdır",
+ 'right-datatransferimport' => 'Verileri içe aktarır',
+);
+
+/** Uighur (Latin) (ئۇيغۇرچە / Uyghurche (Latin))
+ * @author Jose77
+ */
+$messages['ug-latn'] = array(
+ 'dt_xml_page' => 'Bet',
+);
+
+/** Ukrainian (Українська)
+ * @author AS
+ * @author Arturyatsko
+ * @author Prima klasy4na
+ * @author Тест
+ */
+$messages['uk'] = array(
+ 'datatransfer-desc' => 'Дозволяє імпортувати та експортувати дані, які містяться в викликах шаблонів',
+ 'viewxml' => 'Перегляд XML',
+ 'dt_viewxml_docu' => 'Будь ласка, виберіть одну з наступних категорій та імен для перегляду в форматі XML.',
+ 'dt_viewxml_categories' => 'Категорії',
+ 'dt_viewxml_namespaces' => 'Простори назв',
+ 'dt_viewxml_simplifiedformat' => 'Спрощений формат',
+ 'dt_xml_namespace' => 'Простір назв',
+ 'dt_xml_pages' => 'Сторінки',
+ 'dt_xml_page' => 'Сторінка',
+ 'dt_xml_template' => 'Шаблон',
+ 'dt_xml_field' => 'Поле',
+ 'dt_xml_name' => 'Назва',
+ 'dt_xml_title' => 'Заголовок',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Вільний текст',
+ 'importxml' => 'Імпорт XML',
+ 'dt_import_selectfile' => 'Будь ласка, виберіть файл $1 для імпорту:',
+ 'dt_import_encodingtype' => 'Тип кодування:',
+ 'dt_import_forexisting' => 'Для сторінок, які вже існують:',
+ 'dt_import_overwriteexisting' => 'Перезаписати існуючий вміст',
+ 'dt_import_skipexisting' => 'Пропустити',
+ 'dt_import_appendtoexisting' => 'Додати до існуючого вмісту',
+ 'dt_import_summarydesc' => 'Опис імпорту:',
+ 'dt_import_editsummary' => 'імпорт $1',
+ 'dt_import_importing' => 'Імпорт ...',
+ 'dt_import_success' => '$1 {{PLURAL:$1|сторінка була|сторінки було|сторінок було}} створено з файлу $2.',
+ 'importcsv' => 'Імпорт CSV',
+ 'dt_importcsv_badheader' => 'Помилка. Заголовок колонки №$1 «$2» повинен бути або «$3», або «$4», або у формі «template_name[field_name]»',
+ 'right-datatransferimport' => 'Імпорт даних',
+);
+
+/** Vietnamese (Tiếng Việt)
+ * @author Minh Nguyen
+ * @author Vinhtantran
+ */
+$messages['vi'] = array(
+ 'datatransfer-desc' => 'Cho phép nhập xuất dữ liệu có cấu trúc được chứa trong lời gọi bản mẫu',
+ 'viewxml' => 'Xem XML',
+ 'dt_viewxml_docu' => 'Xin hãy chọn trong những thể loại và không gian tên dưới đây để xem ở dạng XML.',
+ 'dt_viewxml_categories' => 'Thể loại',
+ 'dt_viewxml_namespaces' => 'Không gian tên',
+ 'dt_viewxml_simplifiedformat' => 'Định dạng đơn giản hóa',
+ 'dt_xml_namespace' => 'Không gian tên',
+ 'dt_xml_pages' => 'Trang',
+ 'dt_xml_page' => 'Trang',
+ 'dt_xml_template' => 'Bản mẫu',
+ 'dt_xml_field' => 'Trường',
+ 'dt_xml_name' => 'Tên',
+ 'dt_xml_title' => 'Tựa đề',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => 'Văn bản Tự do',
+ 'importxml' => 'Nhập XML',
+ 'dt_import_selectfile' => 'Xin hãy chọn tập tin $1 để nhập:',
+ 'dt_import_encodingtype' => 'Bảng mã:',
+ 'dt_import_editsummary' => 'Nhập $1',
+ 'dt_import_importing' => 'Đang nhập…',
+ 'dt_import_success' => '{{PLURAL:$1|Trang|$1 trang}} sẽ được nhập từ tập tin $2.',
+ 'importcsv' => 'Nhập CSV',
+ 'dt_importcsv_badheader' => 'Lỗi: tên của cột $1, “$2”, phải là “$3” hay “$4”, hoặc phải theo hình dạng “tên_tiêu_bản[tên_trường]”',
+ 'right-datatransferimport' => 'Nhập dữ liệu',
+);
+
+/** Volapük (Volapük)
+ * @author Malafaya
+ * @author Smeira
+ */
+$messages['vo'] = array(
+ 'datatransfer-desc' => 'Dälon nüveigi e seveigi nünodas peleodüköl in samafomotilüvoks paninädöls',
+ 'viewxml' => 'Logön eli XML',
+ 'dt_viewxml_docu' => 'Välolös bevü klads e nemaspads foviks utosi, kelosi vilol logön fomätü XML.',
+ 'dt_viewxml_categories' => 'Klads',
+ 'dt_viewxml_namespaces' => 'Nemaspads',
+ 'dt_viewxml_simplifiedformat' => 'Fomät pebalugüköl',
+ 'dt_xml_namespace' => 'Nemaspad',
+ 'dt_xml_page' => 'Pad',
+ 'dt_xml_field' => 'Fel',
+ 'dt_xml_name' => 'Nem',
+ 'dt_xml_title' => 'Tiäd',
+ 'dt_xml_id' => 'Dientifanüm',
+ 'dt_xml_freetext' => 'Vödem libik',
+);
+
+/** Yiddish (ייִדיש)
+ * @author פוילישער
+ */
+$messages['yi'] = array(
+ 'dt_xml_name' => 'נאָמען',
+ 'dt_xml_title' => 'טיטל',
+);
+
+/** Simplified Chinese (中文(简体))
+ * @author Gaoxuewei
+ */
+$messages['zh-hans'] = array(
+ 'datatransfer-desc' => '允许根据模板的要求导入导出结构化的数据',
+ 'viewxml' => '查看XML',
+ 'dt_viewxml_docu' => '请在下列分类、名称空间中选择,以使用XML格式查看。',
+ 'dt_viewxml_categories' => '分类',
+ 'dt_viewxml_namespaces' => '名称空间',
+ 'dt_viewxml_simplifiedformat' => '简化格式',
+ 'dt_xml_namespace' => '名称空间',
+ 'dt_xml_pages' => '页面',
+ 'dt_xml_page' => '页面',
+ 'dt_xml_template' => '模板',
+ 'dt_xml_field' => '事件',
+ 'dt_xml_name' => '名称',
+ 'dt_xml_title' => '标题',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => '自由文本',
+);
+
+/** Traditional Chinese (中文(繁體))
+ * @author Liangent
+ * @author Mark85296341
+ */
+$messages['zh-hant'] = array(
+ 'datatransfer-desc' => '允許根據模板的要求導入導出結構化的數據',
+ 'viewxml' => '檢視XML',
+ 'dt_viewxml_docu' => '請在下列分類、名稱空間中選擇,以使用XML格式查看。',
+ 'dt_viewxml_categories' => '分類',
+ 'dt_viewxml_namespaces' => '名稱空間',
+ 'dt_viewxml_simplifiedformat' => '簡化格式',
+ 'dt_xml_namespace' => '名稱空間',
+ 'dt_xml_pages' => '頁面',
+ 'dt_xml_page' => '頁面',
+ 'dt_xml_template' => '模板',
+ 'dt_xml_name' => '名稱',
+ 'dt_xml_title' => '標題',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => '自由文字',
+);
+
+/** Chinese (Taiwan) (中文(台灣))
+ * @author Pbdragonwang
+ * @author Roc michael
+ */
+$messages['zh-tw'] = array(
+ 'datatransfer-desc' => '允許匯入及匯出引用樣板(template calls)的結構性資料',
+ 'viewxml' => '查看 XML',
+ 'dt_viewxml_docu' => '請選取以下的分類及名字空間以查看其XML格式的資料',
+ 'dt_viewxml_categories' => '分類',
+ 'dt_viewxml_namespaces' => '名字空間',
+ 'dt_viewxml_simplifiedformat' => '簡化的格式',
+ 'dt_xml_namespace' => '名字空間',
+ 'dt_xml_pages' => '頁面',
+ 'dt_xml_page' => '頁面',
+ 'dt_xml_template' => '模板',
+ 'dt_xml_field' => '欄位',
+ 'dt_xml_name' => '名稱',
+ 'dt_xml_title' => '標題(Title)',
+ 'dt_xml_id' => 'ID',
+ 'dt_xml_freetext' => '隨意文字',
+ 'importxml' => '匯入XML',
+ 'dt_import_selectfile' => '請選取$1檔以供匯入',
+ 'dt_import_encodingtype' => '編碼類型',
+ 'dt_import_summarydesc' => '輸入的摘要',
+ 'dt_import_editsummary' => '匯入$1',
+ 'dt_import_importing' => '匯入中...',
+ 'dt_import_success' => '將從該$2檔匯入$1{{PLURAL:$1|頁面頁面}}。',
+ 'importcsv' => '匯入CSV檔',
+ 'dt_importcsv_badheader' => "錯誤:$1欄位的標題「$2」或必須為「$3」,「$4」或表單「模板名稱[欄位名稱]」<br />
+Error: the column $1 header, '$2', must be either '$3', '$4' or of the form 'template_name[field_name]'",
+ 'right-datatransferimport' => '輸入資料',
+);
+
--- /dev/null
+<?php
+/**
+ * Lets the user import a CSV file to turn into wiki pages
+ *
+ * @author Yaron Koren
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) die();
+
+class DTPage {
+ var $mName;
+ var $mTemplates;
+ var $mFreeText;
+
+ public function DTPage() {
+ $this->mTemplates = array();
+ }
+
+ function setName( $name ) {
+ $this->mName = $name;
+ }
+
+ function getName() {
+ return $this->mName;
+ }
+
+ function addTemplateField( $template_name, $field_name, $value ) {
+ if ( ! array_key_exists( $template_name, $this->mTemplates ) ) {
+ $this->mTemplates[$template_name] = array();
+ }
+ $this->mTemplates[$template_name][$field_name] = $value;
+ }
+
+ function setFreeText( $free_text ) {
+ $this->mFreeText = $free_text;
+ }
+
+ function createText() {
+ $text = "";
+ foreach ( $this->mTemplates as $template_name => $fields ) {
+ $text .= '{{' . $template_name . "\n";
+ foreach ( $fields as $field_name => $val ) {
+ $text .= "|$field_name=$val\n";
+ }
+ $text .= '}}' . "\n";
+ }
+ $text .= $this->mFreeText;
+ return $text;
+ }
+}
+
+class DTImportCSV extends SpecialPage {
+
+ /**
+ * Constructor
+ */
+ public function DTImportCSV() {
+ global $wgLanguageCode;
+ parent::__construct( 'ImportCSV' );
+ DTUtils::loadMessages();
+ }
+
+ function execute( $query ) {
+ global $wgUser, $wgOut, $wgRequest;
+ $this->setHeaders();
+
+ if ( ! $wgUser->isAllowed( 'datatransferimport' ) ) {
+ global $wgOut;
+ $wgOut->permissionRequired( 'datatransferimport' );
+ return;
+ }
+
+ if ( $wgRequest->getCheck( 'import_file' ) ) {
+ $text = DTUtils::printImportingMessage();
+ $uploadResult = ImportStreamSource::newFromUpload( "file_name" );
+ // handling changed in MW 1.17
+ $uploadError = null;
+ if ( $uploadResult instanceof Status ) {
+ if ( $uploadResult->isOK() ) {
+ $source = $uploadResult->value;
+ } else {
+ $uploadError = $wgOut->parse( $uploadResult->getWikiText() );
+ }
+ } elseif ( $uploadResult instanceof WikiErrorMsg ) {
+ $uploadError = $uploadResult->getMessage();
+ } else {
+ $source = $uploadResult;
+ }
+
+ if ( !is_null( $uploadError ) ) {
+ $text .= $uploadError;
+ $wgOut->addHTML( $text );
+ return;
+ }
+
+ $encoding = $wgRequest->getVal( 'encoding' );
+ $pages = array();
+ $error_msg = self::getCSVData( $source->mHandle, $encoding, $pages );
+ if ( ! is_null( $error_msg ) ) {
+ $text .= $error_msg;
+ $wgOut->addHTML( $text );
+ return;
+ }
+
+ $importSummary = $wgRequest->getVal( 'import_summary' );
+ $forPagesThatExist = $wgRequest->getVal( 'pagesThatExist' );
+ $text .= self::modifyPages( $pages, $importSummary, $forPagesThatExist );
+ } else {
+ $formText = DTUtils::printFileSelector( 'CSV' );
+ $utf8OptionText = "\t" . Xml::element( 'option',
+ array(
+ 'selected' => 'selected',
+ 'value' => 'utf8'
+ ), 'UTF-8' ) . "\n";
+ $utf16OptionText = "\t" . Xml::element( 'option',
+ array(
+ 'value' => 'utf16'
+ ), 'UTF-16' ) . "\n";
+ $encodingSelectText = Xml::tags( 'select',
+ array( 'name' => 'encoding' ),
+ "\n" . $utf8OptionText . $utf16OptionText. "\t" ) . "\n\t";
+ $formText .= "\t" . Xml::tags( 'p', null, wfMsg( 'dt_import_encodingtype', 'CSV' ) . " " . $encodingSelectText ) . "\n";
+ $formText .= "\t" . '<hr style="margin: 10px 0 10px 0" />' . "\n";
+ $formText .= DTUtils::printExistingPagesHandling();
+ $formText .= DTUtils::printImportSummaryInput( 'CSV' );
+ $formText .= DTUtils::printSubmitButton();
+ $text = "\t" . Xml::tags( 'form',
+ array(
+ 'enctype' => 'multipart/form-data',
+ 'action' => '',
+ 'method' => 'post'
+ ), $formText ) . "\n";
+ }
+
+ $wgOut->addHTML( $text );
+ }
+
+
+ static function getCSVData( $csv_file, $encoding, &$pages ) {
+ if ( is_null( $csv_file ) )
+ return wfMsg( 'emptyfile' );
+ $table = array();
+ if ( $encoding == 'utf16' ) {
+ // change encoding to UTF-8
+ // Starting with PHP 5.3 we could use str_getcsv(),
+ // which would save the tempfile hassle
+ $tempfile = tmpfile();
+ $csv_string = '';
+ while ( !feof( $csv_file ) ) {
+ $csv_string .= fgets( $csv_file, 65535 );
+ }
+ fwrite( $tempfile, iconv( 'UTF-16', 'UTF-8', $csv_string ) );
+ fseek( $tempfile, 0 );
+ while ( $line = fgetcsv( $tempfile ) ) {
+ array_push( $table, $line );
+ }
+ fclose( $tempfile );
+ } else {
+ while ( $line = fgetcsv( $csv_file ) ) {
+ array_push( $table, $line );
+ }
+ }
+ fclose( $csv_file );
+
+ // Get rid of the "byte order mark", if it's there - this is
+ // a three-character string sometimes put at the beginning
+ // of files to indicate its encoding.
+ // Code copied from:
+ // http://www.dotvoid.com/2010/04/detecting-utf-bom-byte-order-mark/
+ $byteOrderMark = pack( "CCC", 0xef, 0xbb, 0xbf );
+ if ( 0 == strncmp( $table[0][0], $byteOrderMark, 3 ) ) {
+ $table[0][0] = substr( $table[0][0], 3 );
+ // If there were quotation marks around this value,
+ // they didn't get removed, so remove them now.
+ $table[0][0] = trim( $table[0][0], '"' );
+ }
+
+ // check header line to make sure every term is in the
+ // correct format
+ $title_label = wfMsgForContent( 'dt_xml_title' );
+ $free_text_label = wfMsgForContent( 'dt_xml_freetext' );
+ foreach ( $table[0] as $i => $header_val ) {
+ if ( $header_val !== $title_label && $header_val !== $free_text_label &&
+ ! preg_match( '/^[^\[\]]+\[[^\[\]]+]$/', $header_val ) ) {
+ $error_msg = wfMsg( 'dt_importcsv_badheader', $i, $header_val, $title_label, $free_text_label );
+ return $error_msg;
+ }
+ }
+ foreach ( $table as $i => $line ) {
+ if ( $i == 0 ) continue;
+ $page = new DTPage();
+ foreach ( $line as $j => $val ) {
+ if ( $val == '' ) continue;
+ if ( $table[0][$j] == $title_label ) {
+ $page->setName( $val );
+ } elseif ( $table[0][$j] == $free_text_label ) {
+ $page->setFreeText( $val );
+ } else {
+ list( $template_name, $field_name ) = explode( '[', str_replace( ']', '', $table[0][$j] ) );
+ $page->addTemplateField( $template_name, $field_name, $val );
+ }
+ }
+ $pages[] = $page;
+ }
+ }
+
+ function modifyPages( $pages, $editSummary, $forPagesThatExist ) {
+ global $wgUser, $wgLang;
+
+ $text = "";
+ $jobs = array();
+ $jobParams = array();
+ $jobParams['user_id'] = $wgUser->getId();
+ $jobParams['edit_summary'] = $editSummary;
+ $jobParams['for_pages_that_exist'] = $forPagesThatExist;
+ foreach ( $pages as $page ) {
+ $title = Title::newFromText( $page->getName() );
+ if ( is_null( $title ) ) {
+ $text .= '<p>' . wfMsg( 'img-auth-badtitle', $page->getName() ) . "</p>\n";
+ continue;
+ }
+ $jobParams['text'] = $page->createText();
+ $jobs[] = new DTImportJob( $title, $jobParams );
+ }
+ Job::batchInsert( $jobs );
+ $text .= wfMsgExt( 'dt_import_success', array( 'parse' ), $wgLang->formatNum( count( $jobs ) ), 'CSV' );
+
+ return $text;
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Lets the user import an XML file to turn into wiki pages
+ *
+ * @author Yaron Koren
+ * modified by Justin Preece, 05/23/11
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) die();
+
+class DTImportXML extends SpecialPage {
+
+ /**
+ * Constructor
+ */
+ public function DTImportXML() {
+ global $wgLanguageCode;
+ parent::__construct( 'ImportXML' );
+ DTUtils::loadMessages();
+ }
+
+ function execute( $query ) {
+ global $wgUser, $wgOut, $wgRequest;
+ $this->setHeaders();
+
+ if ( ! $wgUser->isAllowed( 'datatransferimport' ) ) {
+ global $wgOut;
+ $wgOut->permissionRequired( 'datatransferimport' );
+ return;
+ }
+
+ if ( $wgRequest->getCheck( 'import_file' ) ) {
+ $text = DTUtils::printImportingMessage();
+ $uploadResult = ImportStreamSource::newFromUpload( "file_name" );
+ // handling changed in MW 1.17
+ if ( $uploadResult instanceof Status ) {
+ $source = $uploadResult->value;
+ } else {
+ $source = $uploadResult;
+ }
+ $importSummary = $wgRequest->getVal( 'import_summary' );
+ $forPagesThatExist = $wgRequest->getVal( 'pagesThatExist' );
+ $text .= self::modifyPages( $source, $importSummary, $forPagesThatExist );
+ } else {
+ $formText = DTUtils::printFileSelector( 'XML' );
+ $formText .= DTUtils::printExistingPagesHandling();
+ $formText .= DTUtils::printImportSummaryInput( 'XML' );
+ $formText .= DTUtils::printSubmitButton();
+ $text = "\t" . Xml::tags( 'form',
+ array(
+ 'enctype' => 'multipart/form-data',
+ 'action' => '',
+ 'method' => 'post'
+ ), $formText ) . "\n";
+
+ }
+
+ $wgOut->addHTML( $text );
+ }
+
+ function modifyPages( $source, $editSummary, $forPagesThatExist ) {
+ $text = "";
+ $xml_parser = new DTXMLParser( $source );
+ $xml_parser->doParse();
+ $jobs = array();
+ $job_params = array();
+ global $wgUser;
+ $job_params['user_id'] = $wgUser->getId();
+ $job_params['edit_summary'] = $editSummary;
+ $job_params['for_pages_that_exist'] = $forPagesThatExist;
+
+ foreach ( $xml_parser->mPages as $page ) {
+ $title = Title::newFromText( $page->getName() );
+ $job_params['text'] = $page->createText();
+ $jobs[] = new DTImportJob( $title, $job_params );
+ }
+ Job::batchInsert( $jobs );
+ global $wgLang;
+ $text .= wfMsgExt( 'dt_import_success', array( 'parse' ), $wgLang->formatNum( count( $jobs ) ), 'XML' );
+ return $text;
+ }
+}
--- /dev/null
+<?php
+/**
+ * Displays an interface to let the user export pages from the wiki in XML form
+ *
+ * @author Yaron Koren
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) die();
+
+class DTViewXML extends SpecialPage {
+
+ /**
+ * Constructor
+ */
+ public function DTViewXML() {
+ global $wgLanguageCode;
+ parent::__construct( 'ViewXML' );
+ DTUtils::loadMessages();
+ }
+
+ function execute( $query ) {
+ $this->setHeaders();
+ doSpecialViewXML( $query );
+ }
+}
+
+function getCategoriesList() {
+ global $wgContLang, $dtgContLang;
+ $dt_props = $dtgContLang->getPropertyLabels();
+ $exclusion_cat_name = str_replace( ' ', '_', $dt_props[DT_SP_IS_EXCLUDED_FROM_XML] );
+ $exclusion_cat_full_name = $wgContLang->getNSText( NS_CATEGORY ) . ':' . $exclusion_cat_name;
+ $dbr = wfGetDB( DB_SLAVE );
+ $categorylinks = $dbr->tableName( 'categorylinks' );
+ $res = $dbr->query( "SELECT DISTINCT cl_to FROM $categorylinks" );
+ $categories = array();
+ while ( $row = $dbr->fetchRow( $res ) ) {
+ $cat_name = $row[0];
+ // add this category to the list, if it's not the
+ // "Excluded from XML" category, and it's not a child of that
+ // category
+ if ( $cat_name != $exclusion_cat_name ) {
+ $title = Title::newFromText( $cat_name, NS_CATEGORY );
+ $parent_categories = $title->getParentCategoryTree( array() );
+ if ( ! treeContainsElement( $parent_categories, $exclusion_cat_full_name ) )
+ $categories[] = $cat_name;
+ }
+ }
+ $dbr->freeResult( $res );
+ sort( $categories );
+ return $categories;
+}
+
+function getNamespacesList() {
+ $dbr = wfGetDB( DB_SLAVE );
+ $page = $dbr->tableName( 'page' );
+ $res = $dbr->query( "SELECT DISTINCT page_namespace FROM $page" );
+ $namespaces = array();
+ while ( $row = $dbr->fetchRow( $res ) ) {
+ $namespaces[] = $row[0];
+ }
+ $dbr->freeResult( $res );
+ return $namespaces;
+}
+
+function getGroupings() {
+ global $dtgContLang;
+
+ global $smwgIP;
+ if ( ! isset( $smwgIP ) ) {
+ return array();
+ } else {
+ $groupings = array();
+ $store = smwfGetStore();
+ $grouping_prop = SMWPropertyValue::makeProperty( '_DT_XG' );
+ $grouped_props = $store->getAllPropertySubjects( $grouping_prop );
+ foreach ( $grouped_props as $grouped_prop ) {
+ $res = $store->getPropertyValues( $grouped_prop, $grouping_prop );
+ $num = count( $res );
+ if ( $num > 0 ) {
+ $grouping_label = $res[0]->getShortWikiText();
+ $groupings[] = array( $grouped_prop, $grouping_label );
+ }
+ }
+ return $groupings;
+ }
+}
+
+function getSubpagesForPageGrouping( $page_name, $relation_name ) {
+ $dbr = wfGetDB( DB_SLAVE );
+ $smw_relations = $dbr->tableName( 'smw_relations' );
+ $smw_attributes = $dbr->tableName( 'smw_attributes' );
+ $res = $dbr->query( "SELECT subject_title FROM $smw_relations WHERE object_title = '$page_name' AND relation_title = '$relation_name'" );
+ $subpages = array();
+ while ( $row = $dbr->fetchRow( $res ) ) {
+ $subpage_name = $row[0];
+ $query_subpage_name = str_replace( "'", "\'", $subpage_name );
+ // get the display order
+ $res2 = $dbr->query( "SELECT value_num FROM $smw_attributes WHERE subject_title = '$query_subpage_name' AND attribute_title = 'Display_order'" );
+ if ( $row2 = $dbr->fetchRow( $res2 ) ) {
+ $display_order = $row2[0];
+ } else {
+ $display_order = - 1;
+ }
+ $dbr->freeResult( $res2 );
+ // HACK - page name is the key, display order is the value
+ $subpages[$subpage_name] = $display_order;
+ }
+ $dbr->freeResult( $res );
+ uasort( $subpages, "cmp" );
+ return array_keys( $subpages );
+}
+
+
+/*
+ * Get all the pages that belong to a category and all its subcategories,
+ * down a certain number of levels - heavily based on SMW's
+ * SMWInlineQuery::includeSubcategories()
+ */
+ function getPagesForCategory( $top_category, $num_levels ) {
+ if ( 0 == $num_levels ) return $top_category;
+
+ $db = wfGetDB( DB_SLAVE );
+ $fname = "getPagesForCategory";
+ $categories = array( $top_category );
+ $checkcategories = array( $top_category );
+ $titles = array();
+ for ( $level = $num_levels; $level > 0; $level-- ) {
+ $newcategories = array();
+ foreach ( $checkcategories as $category ) {
+ $res = $db->select( // make the query
+ array( 'categorylinks', 'page' ),
+ array( 'page_id', 'page_title', 'page_namespace' ),
+ array( 'cl_from = page_id',
+ 'cl_to = ' . $db->addQuotes( $category ) ),
+ $fname );
+ if ( $res ) {
+ while ( $res && $row = $db->fetchRow( $res ) ) {
+ if ( array_key_exists( 'page_title', $row ) ) {
+ $page_namespace = $row['page_namespace'];
+ if ( $page_namespace == NS_CATEGORY ) {
+ $new_category = $row[ 'page_title' ];
+ if ( !in_array( $new_category, $categories ) ) {
+ $newcategories[] = $new_category;
+ }
+ } else {
+ $titles[] = Title::newFromID( $row['page_id'] );
+ }
+ }
+ }
+ $db->freeResult( $res );
+ }
+ }
+ if ( count( $newcategories ) == 0 ) {
+ return $titles;
+ } else {
+ $categories = array_merge( $categories, $newcategories );
+ }
+ $checkcategories = array_diff( $newcategories, array() );
+ }
+ return $titles;
+ }
+
+/*
+function getPagesForCategory($category) {
+ $dbr = wfGetDB( DB_SLAVE );
+ $categorylinks = $dbr->tableName( 'categorylinks' );
+ $res = $dbr->query("SELECT cl_from FROM $categorylinks WHERE cl_to = '$category'");
+ $titles = array();
+ while ($row = $dbr->fetchRow($res)) {
+ $titles[] = Title::newFromID($row[0]);
+ }
+ $dbr->freeResult($res);
+ return $titles;
+}
+*/
+
+function getPagesForNamespace( $namespace ) {
+ $dbr = wfGetDB( DB_SLAVE );
+ $page = $dbr->tableName( 'page' );
+ $res = $dbr->query( "SELECT page_id FROM $page WHERE page_namespace = '$namespace'" );
+ $titles = array();
+ while ( $row = $dbr->fetchRow( $res ) ) {
+ $titles[] = Title::newFromID( $row[0] );
+ }
+ $dbr->freeResult( $res );
+ return $titles;
+}
+
+/**
+ * Helper function for getXMLForPage()
+ */
+function treeContainsElement( $tree, $element ) {
+ // escape out if there's no tree (i.e., category)
+ if ( $tree == null )
+ return false;
+
+ foreach ( $tree as $node => $child_tree ) {
+ if ( $node === $element ) {
+ return true;
+ } elseif ( count( $child_tree ) > 0 ) {
+ if ( treeContainsElement( $child_tree, $element ) ) {
+ return true;
+ }
+ }
+ }
+ // no match found
+ return false;
+}
+
+function getXMLForPage( $title, $simplified_format, $groupings, $depth = 0 ) {
+ if ( $depth > 5 ) { return ""; }
+
+ global $wgContLang, $dtgContLang;
+
+ $namespace_labels = $wgContLang->getNamespaces();
+ $template_label = $namespace_labels[NS_TEMPLATE];
+ $namespace_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_namespace' ) );
+ $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
+ $field_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_field' ) );
+ $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
+ $title_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_title' ) );
+ $id_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_id' ) );
+ $free_text_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_freetext' ) );
+
+ // if this page belongs to the exclusion category, exit
+ $parent_categories = $title->getParentCategoryTree( array() );
+ $dt_props = $dtgContLang->getPropertyLabels();
+ // $exclusion_category = $title->newFromText($dt_props[DT_SP_IS_EXCLUDED_FROM_XML], NS_CATEGORY);
+ $exclusion_category = $wgContLang->getNSText( NS_CATEGORY ) . ':' . str_replace( ' ', '_', $dt_props[DT_SP_IS_EXCLUDED_FROM_XML] );
+ if ( treeContainsElement( $parent_categories, $exclusion_category ) )
+ return "";
+ $article = new Article( $title );
+ $page_title = str_replace( '"', '"', $title->getText() );
+ $page_title = str_replace( '&', '&', $page_title );
+ if ( $simplified_format )
+ $text = "<$page_str><$id_str>{$article->getID()}</$id_str><$title_str>$page_title</$title_str>\n";
+ else
+ $text = "<$page_str $id_str=\"" . $article->getID() . "\" $title_str=\"" . $page_title . '" >';
+
+ // traverse the page contents, one character at a time
+ $uncompleted_curly_brackets = 0;
+ $page_contents = $article->getContent();
+ // escape out variables like "{{PAGENAME}}"
+ $page_contents = str_replace( '{{PAGENAME}}', '{{PAGENAME}}', $page_contents );
+ // escape out parser functions
+ $page_contents = preg_replace( '/{{(#.+)}}/', '{{$1}}', $page_contents );
+ // escape out transclusions
+ $page_contents = preg_replace( '/{{(:.+)}}/', '{{$1}}', $page_contents );
+ // escape out variable names
+ $page_contents = str_replace( '{{{', '{{{', $page_contents );
+ $page_contents = str_replace( '}}}', '}}}', $page_contents );
+ // escape out tables
+ $page_contents = str_replace( '{|', '{|', $page_contents );
+ $page_contents = str_replace( '|}', '|}', $page_contents );
+ $free_text = "";
+ $free_text_id = 1;
+ $template_name = "";
+ $field_name = "";
+ $field_value = "";
+ $field_has_name = false;
+ for ( $i = 0; $i < strlen( $page_contents ); $i++ ) {
+ $c = $page_contents[$i];
+ if ( $uncompleted_curly_brackets == 0 ) {
+ if ( $c == "{" || $i == strlen( $page_contents ) - 1 ) {
+ if ( $i == strlen( $page_contents ) - 1 )
+ $free_text .= $c;
+ $uncompleted_curly_brackets++;
+ $free_text = trim( $free_text );
+ $free_text = str_replace( '&', '&', $free_text );
+ $free_text = str_replace( '[', '[', $free_text );
+ $free_text = str_replace( ']', ']', $free_text );
+ $free_text = str_replace( '<', '<', $free_text );
+ $free_text = str_replace( '>', '>', $free_text );
+ if ( $free_text != "" ) {
+ $text .= "<$free_text_str id=\"$free_text_id\">$free_text</$free_text_str>";
+ $free_text = "";
+ $free_text_id++;
+ }
+ } elseif ( $c == "{" ) {
+ // do nothing
+ } else {
+ $free_text .= $c;
+ }
+ } elseif ( $uncompleted_curly_brackets == 1 ) {
+ if ( $c == "{" ) {
+ $uncompleted_curly_brackets++;
+ $creating_template_name = true;
+ } elseif ( $c == "}" ) {
+ $uncompleted_curly_brackets--;
+ // is this needed?
+ // if ($field_name != "") {
+ // $field_name = "";
+ // }
+ if ( $page_contents[$i - 1] == '}' ) {
+ if ( $simplified_format )
+ $text .= "</" . $template_name . ">";
+ else
+ $text .= "</$template_label>";
+ }
+ $template_name = "";
+ }
+ } else { // 2 or greater - probably 2
+ if ( $c == "}" ) {
+ $uncompleted_curly_brackets--;
+ }
+ if ( $c == "{" ) {
+ $uncompleted_curly_brackets++;
+ } else {
+ if ( $creating_template_name ) {
+ if ( $c == "|" || $c == "}" ) {
+ $template_name = str_replace( ' ', '_', trim( $template_name ) );
+ $template_name = str_replace( '&', '&', $template_name );
+ if ( $simplified_format ) {
+ $text .= "<" . $template_name . ">";
+ } else
+ $text .= "<$template_label $name_str=\"$template_name\">";
+ $creating_template_name = false;
+ $creating_field_name = true;
+ $field_id = 1;
+ } else {
+ $template_name .= $c;
+ }
+ } else {
+ if ( $c == "|" || $c == "}" ) {
+ if ( $field_has_name ) {
+ $field_value = str_replace( '&', '&', $field_value );
+ if ( $simplified_format ) {
+ $field_name = str_replace( ' ', '_', trim( $field_name ) );
+ $text .= "<" . $field_name . ">";
+ $text .= trim( $field_value );
+ $text .= "</" . $field_name . ">";
+ } else {
+ $text .= "<$field_str $name_str=\"" . trim( $field_name ) . "\">";
+ $text .= trim( $field_value );
+ $text .= "</$field_str>";
+ }
+ $field_value = "";
+ $field_has_name = false;
+ } else {
+ // "field_name" is actually the value
+ if ( $simplified_format ) {
+ $field_name = str_replace( ' ', '_', $field_name );
+ // add "Field" to the beginning of the file name, since
+ // XML tags that are simply numbers aren't allowed
+ $text .= "<" . $field_str . '_' . $field_id . ">";
+ $text .= trim( $field_name );
+ $text .= "</" . $field_str . '_' . $field_id . ">";
+ } else {
+ $text .= "<$field_str $name_str=\"$field_id\">";
+ $text .= trim( $field_name );
+ $text .= "</$field_str>";
+ }
+ $field_id++;
+ }
+ $creating_field_name = true;
+ $field_name = "";
+ } elseif ( $c == "=" ) {
+ // handle case of = in value
+ if ( ! $creating_field_name ) {
+ $field_value .= $c;
+ } else {
+ $creating_field_name = false;
+ $field_has_name = true;
+ }
+ } elseif ( $creating_field_name ) {
+ $field_name .= $c;
+ } else {
+ $field_value .= $c;
+ }
+ }
+ }
+ }
+ }
+
+ // handle groupings, if any apply here; first check if SMW is installed
+ global $smwgIP;
+ if ( isset( $smwgIP ) ) {
+ $store = smwfGetStore();
+ foreach ( $groupings as $pair ) {
+ list( $property_page, $grouping_label ) = $pair;
+ $wiki_page = SMWDataValueFactory::newTypeIDValue( '_wpg', $page_title );
+ $options = new SMWRequestOptions();
+ $options->sort = "subject_title";
+ // get actual property from the wiki-page of the property
+ $property = SMWPropertyValue::makeProperty( $property_page->getTitle()->getText() );
+ $res = $store->getPropertySubjects( $property, $wiki_page, $options );
+ $num = count( $res );
+ if ( $num > 0 ) {
+ $grouping_label = str_replace( ' ', '_', $grouping_label );
+ $text .= "<$grouping_label>\n";
+ foreach ( $res as $subject ) {
+ $subject_title = $subject->getTitle();
+ $text .= getXMLForPage( $subject_title, $simplified_format, $groupings, $depth + 1 );
+ }
+ $text .= "</$grouping_label>\n";
+ }
+ }
+ }
+
+ $text .= "</$page_str>\n";
+ // escape back the curly brackets that were escaped out at the beginning
+ $text = str_replace( '&#123;', '{', $text );
+ $text = str_replace( '&#125;', '}', $text );
+ return $text;
+}
+
+function doSpecialViewXML() {
+ global $wgOut, $wgRequest, $wgUser, $wgContLang;
+ $skin = $wgUser->getSkin();
+ $namespace_labels = $wgContLang->getNamespaces();
+ $category_label = $namespace_labels[NS_CATEGORY];
+ $template_label = $namespace_labels[NS_TEMPLATE];
+ $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
+ $namespace_str = str_replace( ' ', '_', wfMsg( 'dt_xml_namespace' ) );
+ $pages_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_pages' ) );
+
+ $form_submitted = false;
+ $page_titles = array();
+ $cats = $wgRequest->getArray( 'categories' );
+ $nses = $wgRequest->getArray( 'namespaces' );
+ if ( count( $cats ) > 0 || count( $nses ) > 0 ) {
+ $form_submitted = true;
+ }
+
+ if ( $form_submitted ) {
+ $wgOut->disable();
+
+ // Cancel output buffering and gzipping if set
+ // This should provide safer streaming for pages with history
+ wfResetOutputBuffers();
+ header( "Content-type: application/xml; charset=utf-8" );
+
+ $groupings = getGroupings();
+ $simplified_format = $wgRequest->getVal( 'simplified_format' );
+ $text = "<$pages_str>";
+ if ( $cats ) {
+ foreach ( $cats as $cat => $val ) {
+ if ( $simplified_format )
+ $text .= '<' . str_replace( ' ', '_', $cat ) . ">\n";
+ else
+ $text .= "<$category_label $name_str=\"$cat\">\n";
+ $titles = getPagesForCategory( $cat, 10 );
+ foreach ( $titles as $title ) {
+ $text .= getXMLForPage( $title, $simplified_format, $groupings );
+ }
+ if ( $simplified_format )
+ $text .= '</' . str_replace( ' ', '_', $cat ) . ">\n";
+ else
+ $text .= "</$category_label>\n";
+ }
+ }
+
+ if ( $nses ) {
+ foreach ( $nses as $ns => $val ) {
+ if ( $ns == 0 ) {
+ $ns_name = "Main";
+ } else {
+ $ns_name = MWNamespace::getCanonicalName( $ns );
+ }
+ if ( $simplified_format )
+ $text .= '<' . str_replace( ' ', '_', $ns_name ) . ">\n";
+ else
+ $text .= "<$namespace_str $name_str=\"$ns_name\">\n";
+ $titles = getPagesForNamespace( $ns );
+ foreach ( $titles as $title ) {
+ $text .= getXMLForPage( $title, $simplified_format, $groupings );
+ }
+ if ( $simplified_format )
+ $text .= '</' . str_replace( ' ', '_', $ns_name ) . ">\n";
+ else
+ $text .= "</$namespace_str>\n";
+ }
+ }
+ $text .= "</$pages_str>";
+ print $text;
+ } else {
+ // set 'title' as hidden field, in case there's no URL niceness
+ global $wgContLang;
+ $mw_namespace_labels = $wgContLang->getNamespaces();
+ $special_namespace = $mw_namespace_labels[NS_SPECIAL];
+ $text = <<<END
+ <form action="" method="get">
+ <input type="hidden" name="title" value="$special_namespace:ViewXML">
+
+END;
+ $text .= "<p>" . wfMsg( 'dt_viewxml_docu' ) . "</p>\n";
+ $text .= "<h2>" . wfMsg( 'dt_viewxml_categories' ) . "</h2>\n";
+ $categories = getCategoriesList();
+ foreach ( $categories as $category ) {
+ $title = Title::makeTitle( NS_CATEGORY, $category );
+ $link = $skin->makeLinkObj( $title, $title->getText() );
+ $text .= "<input type=\"checkbox\" name=\"categories[$category]\" /> $link <br />\n";
+ }
+ $text .= "<h2>" . wfMsg( 'dt_viewxml_namespaces' ) . "</h2>\n";
+ $namespaces = getNamespacesList();
+ foreach ( $namespaces as $namespace ) {
+ if ( $namespace == 0 ) {
+ $ns_name = wfMsgHtml( 'blanknamespace' );
+ } else {
+ $ns_name = htmlspecialchars( $wgContLang->getFormattedNsText( $namespace ) );
+ }
+ $ns_name = str_replace( '_', ' ', $ns_name );
+ $text .= "<input type=\"checkbox\" name=\"namespaces[$namespace]\" /> $ns_name <br />\n";
+ }
+ $text .= "<br /><p><input type=\"checkbox\" name=\"simplified_format\" /> " . wfMsg( 'dt_viewxml_simplifiedformat' ) . "</p>\n";
+ $text .= "<input type=\"submit\" value=\"" . wfMsg( 'viewxml' ) . "\">\n";
+ $text .= "</form>\n";
+
+ $wgOut->addHTML( $text );
+ }
+}
--- /dev/null
+<noinclude>
+This is the "Annotation" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+{{#forminput:form=Annotation}}
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Annotation:<unique number;start=1>}}}
+__NOTOC__
+{{#ifexist: {{PAGENAME}}
+ |<font size=6 color="#67536c">'''{{#show:{{PAGENAME}}|?has_Gene_Symbol}} (''{{#show:{{PAGENAME}}|?has_Species_Name}}'')'''</font>
+ |
+}}
+
+
+= Annotation =
+
+{{{for template|Annotation}}}
+
+{| class="formtable"
+! Species Name:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Species Name]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|Species Name|autocomplete on property=Has Reference Taxon|restricted}}}
+ | {{{field|Species Name|autocomplete on property=Has Reference Taxon}}}
+ }}
+|-
+! Gene Symbol:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Gene Symbol]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ |{{{field|Gene Symbol|restricted}}}
+ |{{{field|Gene Symbol}}}
+ }}
+|-
+! Gene Name:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Gene Name]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|Gene Name|restricted}}}
+ | {{{field|Gene Name}}}
+ }}
+|-
+! Gene Synonyms:
+| {{#ifexist: {{PAGENAME}}
+ | {{#if: {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}} ]]
+ | ?is_Gene_Synonym
+ | headers=hide
+ | mainlabel=-
+ | format=list
+ }} {{#formlink:form=Gene_Synonyms|link text=Edit|link type=button|target={{PAGENAME}}/Gene_Synonyms }}
+ | {{#formlink:form=Gene_Synonyms|link text=Add Synonyms|link type=button|query string=Gene_Synonyms[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
+ }}
+ | To add gene synonyms, first save your basic annotation information on this "Annotation" tab.
+}}
+|-
+! Gene Locus:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Gene Locus]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|Gene Locus|restricted}}}
+ | {{{field|Gene Locus}}}
+ }}
+|-
+! Gene Type:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Gene Type]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|Gene Type|restricted}}}
+ | {{{field|Gene Type}}}
+ }}
+|-
+! EC Number(s):
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::EC Numbers]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|EC Numbers|restricted|list|delimiter=,}}}
+ | {{{field|EC Numbers|list|delimiter=,}}}
+ }}
+|-
+! Chromosome:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Chromosome]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ |{{{field|Chromosome|restricted}}}
+ |{{{field|Chromosome}}}
+ }}
+|-
+! Has Phenotype:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Has Phenotype]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|Has Phenotype|restricted}}}
+ | {{{field|Has Phenotype}}}
+ }}
+|-
+! Description:
+| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field Or Object::Annotation Description]]
+ [[Is Associated With Category::Annotations]]
+ |?is_Provenance
+ }}
+ | {{{field|Annotation Description|restricted}}}
+ | {{{field|Annotation Description}}}
+ }}
+|}
+
+{{{end template}}}
+
+= External References =
+
+{{#ifexist: {{PAGENAME}}
+ | {{#if: {{#ask:[[Category:External_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | Add, edit, or remove external reference data {{#formlink:form=External_References|link text=here|target={{PAGENAME}}/External_References }}.
+ {{#ask:[[Is External Reference::~{{PAGENAME}}/External_References* ]]
+ | mainlabel=-
+ |? from_External_Source
+ |? has_External_Accession_ID
+ }}
+ | Add external references for this annotation.<br>{{#formlink:form=External_References|link text=Add|link type=button|query string=External_References[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
+ }}
+ | To add external references, first save your basic annotation information on the "Annotation" tab.
+}}
+
+= Ontologies =
+
+{{#ifexist: {{PAGENAME}}
+ | {{#if: {{#ask:[[Category:Ontological_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | Add, edit, or remove ontology references {{#formlink:form=Ontological_References|link text=here|target={{PAGENAME}}/Ontologies }}.
+ {{#ask:[[Is Ontological Reference::~{{PAGENAME}}/Ontologies*]]
+ | mainlabel=-
+ |? from_Ontology
+ |? has_Term_ID
+ |? has_Term_Name
+ |? has_Aspect
+ |? has_Evidence_Code
+ |? has_Evidence
+ }}
+ | Add ontological associations for this annotation.<br>{{#formlink:form=Ontological_References|link text=Add|link type=button|query string=Ontological_References[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
+ }}
+ | To add ontological references, first save your basic annotation information on the "Annotation" tab.
+}}
+
+= Sequences =
+
+{{#ifexist: {{PAGENAME}}
+ | {{#if: {{#ask:[[Category:Sequences]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | Add, edit, or remove sequence references {{#formlink:form=Sequences|link text=here|target={{PAGENAME}}/Sequences }}.
+ {{#ask:[[Is Sequence Reference::~{{PAGENAME}}/Sequences*]]
+ | mainlabel=-
+ |? has_Sequence_Type
+ |? has_Sequence_Source
+ |? has_External_Accession_ID
+ }}
+ | Add sequence references for this annotation.<br>{{#formlink:form=Sequences|link text=Add|link type=button|query string=Sequences[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
+ }}
+ | To add sequence references, first save your basic annotation information on the "Annotation" tab.
+}}
+
+= Literature =
+
+{{#ifexist: {{PAGENAME}}
+ | Add a reference to a publication listed with PubMed or the DOI registry {{#formlink:form=Reference_Publication|link text=here|link type=|query string=Reference_Publication[New Annotation Reference]={{PAGENAME}} }}.<br>
+
+Need to add a reference to a publication without a PubMed ID or DOI (Digital Object Identifier)?<br>
+{{#formlink:form=Publication|link text=Add a new publication reference|link type=|query string=Publication[New Annotation Reference]={{PAGENAME}} }}
+
+ {{#if: {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] }}
+ | {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]]
+ |? has First Author
+ |? has Publication Title
+ |? has Journal Name
+ |? has Publication ID
+ }}
+ |
+ }}
+ | To add publication references, first save your basic annotation information on the "Annotation" tab.
+}}
+<headertabs/>
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "External References" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+
+{{#forminput:form=External References}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=External_References}}}
+
+{{{for template|External References}}}
+{| class="formtable"
+! Annotation Page:
+| {{{field|Annotation Page}}}
+|}
+{{{end template}}}
+
+{{{for template|External Reference Repeater|multiple}}}
+'''Source:''' {{{field|External Source}}}
+'''Accession ID:''' {{{field|External Accession ID}}}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Gene Synonyms" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+{{#forminput:form=Gene Synonyms}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Gene_Synonyms}}}
+
+{{{for template|Gene Synonyms}}}
+{| class="formtable"
+! Annotation Page:
+| {{{field|Annotation Page}}}
+|}
+{{{end template}}}
+
+{{{for template|Gene Synonym Repeater|multiple}}}
+
+<!----------------------------
+
+=== Gene Synonyms Test ===
+
+Annotation Page: {{#show:{{PAGENAME}}|?Is Associated With Annotation}}
+
+Provenance Page Test: {{#ask: [[Is Provenance::~Annotation:1/Provenance* ]] }}
+
+{{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
+ [[Is Associated With Field::Gene Type]]
+ [[Is Associated With Template::Annotation]]
+ |?is_Provenance
+ }}
+ | {{{field|Gene Type|restricted}}}
+ | {{{field|Gene Type}}}
+ }}
+
+Provenance for Specific Synonym (Test): {{#ask:
+ [[Is Provenance::~{{#show:{{PAGENAME}}|?Is Associated With Annotation}}/Provenance*]]
+ [[Is Associated With Field::~Gene Synonym:*]]
+ [[Is Associated With Template::Gene Synonym Repeater]]
+ |link=none
+}}
+
+{{#if:
+ {{#ask:
+ [[Is Provenance::~{{#show:{{PAGENAME}}|?Is Associated With Annotation}}/Provenance*]]
+ [[Is Associated With Field::~Gene Synonym:*]]
+ [[Is Associated With Template::Gene Synonym Repeater]]
+ |?is_Provenance
+ }}
+ |'''Gene Synonym:''' {{{field|Gene Synonym|restricted}}}
+ |'''Gene Synonym:''' {{{field|Gene Synonym}}}
+ }}
+
+----------------------------->
+
+'''Gene Synonym:''' {{{field|Gene Synonym}}}
+
+<!----------------------------->
+
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Ontological References" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+
+{{#forminput:form=Ontological References}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Ontologies}}}
+__NOTOC__
+
+{{{for template|Ontological References}}}
+{| class="formtable"
+! Annotation Page:
+| {{{field|Annotation Page}}}
+|}
+{{{end template}}}
+
+=== Plant Ontology ===
+{{{for template|Plant Ontology Reference Repeater|multiple}}}
+'''Term Name:''' {{{field|Term Name|autocomplete from url=remote_PO_terms}}} '''or''' '''Term ID:''' {{{field|Term ID|autocomplete from url=remote_PO_ids}}}
+<br><br>'''Evidence Code:'''<br>
+{{{field|Evidence Code|list}}}
+<br><br>'''Evidence:''' {{{field|Evidence|}}}
+{{{end template}}}
+
+=== Gene Ontology ===
+{{{for template|Gene Ontology Reference Repeater|multiple}}}
+'''Term Name:''' {{{field|Term Name|autocomplete from url=remote_GO_terms}}} '''or''' '''Term ID:''' {{{field|Term ID|autocomplete from url=remote_GO_ids}}}
+<br><br>'''Evidence Code:'''<br>
+{{{field|Evidence Code|list}}}
+<br><br>'''Evidence:''' {{{field|Evidence|}}}
+{{{end template}}}
+
+=== Other Ontologies ===
+{{{for template|Ontological Reference Repeater|multiple}}}
+'''Ontology:''' {{{field|Ontology|}}}
+'''Term Name:''' {{{field|Term Name|}}}
+'''Term ID:''' {{{field|Term ID|}}}
+'''Branch:''' {{{field|Aspect|}}}
+<br><br>'''Evidence Code:'''<br>
+{{{field|Evidence Code|list}}}
+<br><br>'''Evidence:''' {{{field|Evidence|}}}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Provenance" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+{{#forminput:form=Provenance}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Provenance}}}
+
+{{{for template|Provenance}}}
+{| class="formtable"
+! Annotation Page:
+| {{{field|Annotation Page}}}
+|}
+{{{end template}}}
+
+{{{for template|Provenance Repeater|multiple}}}
+'''Field or Object:''' {{{field|Source Field or Object}}}
+'''Category:''' {{{field|Source Category}}}
+'''Accession ID:''' {{{field|Source Accession ID}}}
+'''Source:''' {{{field|Source}}}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Publication" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+
+{{#forminput:form=Publication}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Publication:<unique number;start=1>}}}
+{{{for template|Publication}}}
+
+{{#set:Annotation References={{{Annotation References|}}}, {{{New Annotation Reference|}}} }}
+
+{| class="formtable"
+! Publication:
+| {{{field|Publication}}}
+|-
+! Publication ID:
+| {{{field|Publication ID}}}
+|-
+! Publication Title:
+| {{{field|Publication Title}}}
+|-
+! First Author:
+| {{{field|First Author}}}
+|-
+! Journal Name:
+| {{{field|Journal Name}}}
+|-
+! Volume:
+| {{{field|Volume}}}
+|-
+! Year:
+| {{{field|Year}}}
+|-
+! Pages:
+| {{{field|Pages}}}
+|-
+! Annotation References:
+| {{{field|Annotation References}}}
+|-
+! New Annotation Reference (to be hidden):
+| {{{field|New Annotation Reference}}}
+|}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Reference Publication" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+
+{{#forminput:form=Reference Publication}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Publication:<unique number;start=1>}}}
+{{{for template|Reference Publication}}}
+{| class="formtable"
+! Publication:
+| {{{field|Publication}}}
+|-
+! Publication ID:
+| {{{field|Publication ID}}}
+|-
+! Publication Title:
+| {{{field|Publication Title|hidden}}}
+|-
+! First Author:
+| {{{field|First Author|hidden}}}
+|-
+! Journal Name:
+| {{{field|Journal Name|hidden}}}
+|-
+! Volume:
+| {{{field|Volume|hidden}}}
+|-
+! Year:
+| {{{field|Year|hidden}}}
+|-
+! Pages:
+| {{{field|Pages|hidden}}}
+|-
+! Annotation References:
+| {{{field|Annotation References}}}
+|-
+! New Annotation Reference (to be hidden):
+| {{{field|New Annotation Reference}}}
+|}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Sequences" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+
+{{#forminput:form=Sequences}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Sequences}}}
+
+{{{for template|Sequences}}}
+{| class="formtable"
+! Annotation Page:
+| {{{field|Annotation Page}}}
+|}
+{{{end template}}}
+
+{{{for template|Sequence Repeater|multiple}}}
+'''Sequence Type:''' {{{field|Sequence Type}}}
+'''Sequence Source:''' {{{field|Sequence Source}}}
+'''Accession ID:''' {{{field|External Accession ID}}}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Source" form.
+To create a page with this form, enter the page name below;
+if a page with that name already exists, you will be sent to a form to edit that page.
+
+
+{{#forminput:form=Source}}
+
+</noinclude><includeonly>
+<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
+{{{info|page name=Source:<unique number;start=1>}}}
+
+{{{for template|Source}}}
+{| class="formtable"
+! Source Date Stamp:
+| {{{field|Source Date Stamp}}}
+|-
+! Source Database:
+| {{{field|Source Database}}}
+|-
+! Source Version:
+| {{{field|Source Version}}}
+|-
+! Source URI:
+| {{{field|Source URI}}}
+|-
+! Source File:
+| {{{field|Source File}}}
+|}
+{{{end template}}}
+
+{{{standard input|summary}}}
+
+{{{standard input|watch}}}
+
+{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
+</includeonly>
+
--- /dev/null
+<?php
+
+# This file was automatically generated by the MediaWiki installer.
+# If you make manual changes, please keep track in case you need to
+# recreate them later.
+#
+# See includes/DefaultSettings.php for all configurable settings
+# and their default values, but don't forget to make changes in _this_
+# file, not there.
+#
+# Further documentation for configuration settings may be found at:
+# http://www.mediawiki.org/wiki/Manual:Configuration_settings
+
+# If you customize your file layout, set $IP to the directory that contains
+# the other MediaWiki files. It will be used as a base to locate files.
+if( defined( 'MW_INSTALL_PATH' ) ) {
+ $IP = MW_INSTALL_PATH;
+} else {
+ $IP = dirname( __FILE__ );
+}
+
+$path = array( $IP, "$IP/includes", "$IP/languages" );
+set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
+
+require_once( "$IP/includes/DefaultSettings.php" );
+
+if ( $wgCommandLineMode ) {
+ if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
+ die( "This script must be run from the command line\n" );
+ }
+}
+## Uncomment this to disable output compression
+# $wgDisableOutputCompression = true;
+
+$wgSitename = "Planteome Annotation Wiki - Development";
+
+## The URL base path to the directory containing the wiki;
+## defaults for all runtime URL paths are based off of this.
+## For more information on customizing the URLs please see:
+## http://www.mediawiki.org/wiki/Manual:Short_URL
+$wgScriptPath = "/w";
+$wgArticlePath = "/wiki/$1";
+$wgUsePathInfo = true;
+$wgScriptExtension = ".php5";
+
+## The relative URL path to the skins directory
+$wgStylePath = "$wgScriptPath/skins";
+
+## The relative URL path to the logo. Make sure you change this from the default,
+## or else you'll overwrite your logo when you upgrade!
+$wgLogo = "$wgStylePath/common/images/wiki_logo_with_text.png";
+
+## UPO means: this is also a user preference option
+
+$wgEnableEmail = true;
+$wgEnableUserEmail = true; # UPO
+
+$wgEmergencyContact = "preecej@science.oregonstate.edu";
+$wgPasswordSender = "preecej@science.oregonstate.edu";
+
+$wgEnotifUserTalk = true; # UPO
+$wgEnotifWatchlist = true; # UPO
+$wgEmailAuthentication = true;
+
+## Database settings
+$wgDBtype = "mysql";
+$wgDBserver = $_SERVER['dev_wgDBServer'];
+$wgDBname = $_SERVER['dev_wgDBName'];
+$wgDBuser = $_SERVER['dev_wgDBUser'];
+$wgDBpassword = $_SERVER['dev_wgDBPassword'];
+$JobRunRate = 1;
+
+# MySQL specific settings
+$wgDBprefix = "";
+
+# MySQL table options to use during installation or update
+$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
+
+# Experimental charset support for MySQL 4.1/5.0.
+$wgDBmysql5 = true;
+
+## Shared memory settings
+$wgMainCacheType = CACHE_NONE;
+$wgMemCachedServers = array();
+
+## To enable image uploads, make sure the 'images' directory
+## is writable, then set this to true:
+$wgEnableUploads = false;
+$wgUseImageMagick = true;
+$wgImageMagickConvertCommand = "/usr/bin/convert";
+
+## If you use ImageMagick (or any other shell command) on a
+## Linux server, this will need to be set to the name of an
+## available UTF-8 locale
+$wgShellLocale = "en_US.utf8";
+
+## If you want to use image uploads under safe mode,
+## create the directories images/archive, images/thumb and
+## images/temp, and make them all writable. Then uncomment
+## this, if it's not already uncommented:
+# $wgHashedUploadDirectory = false;
+
+## If you have the appropriate support software installed
+## you can enable inline LaTeX equations:
+$wgUseTeX = false;
+
+## Set $wgCacheDirectory to a writable directory on the web server
+## to make your wiki go slightly faster. The directory should not
+## be publically accessible from the web.
+#$wgCacheDirectory = "$IP/cache";
+
+$wgLocalInterwiki = strtolower( $wgSitename );
+
+$wgLanguageCode = "en";
+
+$wgSecretKey = "c7f2e0aee38b819689a65337257ed2d6c4eb7157e44563781da69bbfd3e2e45b";
+
+## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'vector', 'monobook':
+$wgDefaultSkin = 'planteome';
+
+## For attaching licensing metadata to pages, and displaying an
+## appropriate copyright notice / icon. GNU Free Documentation
+## License and Creative Commons licenses are supported so far.
+$wgEnableCreativeCommonsRdf = true;
+$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
+$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
+$wgRightsText = "Attribution-NonCommercial-ShareAlike 3.0 Unported";
+$wgRightsIcon = "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
+# $wgRightsCode = "[license_code]"; # Not yet used
+
+$wgDiff3 = "/usr/bin/diff3";
+
+# BEGIN: Justin Preece - Config changes and Semantic Bundle (SMW and other extensions)
+# (moved from top of file to address premature reference to $wgScriptPath)
+
+$wgHiddenPrefs[] = 'skin';
+$wgUseAjax = true;
+
+#include_once("$IP/extensions/DataTransfer_PS/DataTransfer.php");
+
+require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
+require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
+
+include("$IP/extensions/SimpleForms/SimpleForms.php");
+
+# PO web service calls
+$sfgAutocompletionURLs['remote_PO_terms'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=po&qval=<substr>&format=json&max=20';
+$sfgAutocompletionURLs['remote_PO_ids'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=po&qval=<substr>&format=json&max=20';
+
+# GO web service calls
+$sfgAutocompletionURLs['remote_GO_terms'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=go&qval=<substr>&format=json&max=25';
+$sfgAutocompletionURLs['remote_GO_ids'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=go&qval=<substr>&format=json&max=25';
+
+$sfgAutocompleteOnAllChars = false;
+
+# END: Justin Preece - Semantic Bundle (SMW and other extensions)
+
+/** Allow client-side caching of pages */
+$wgCachePages = false;
+
+/**
+ * * Set this to current time to invalidate all prior cached pages. Affects both
+ * * client- and server-side caching.
+ * * You can get the current date on your server by using the command:
+ * * date +%Y%m%d%H%M%S
+ * */
+$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
+
+
+# When you make changes to this configuration file, this will make
+# sure that cached pages are cleared.
+$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
--- /dev/null
+<?php
+
+# This file was automatically generated by the MediaWiki installer.
+# If you make manual changes, please keep track in case you need to
+# recreate them later.
+#
+# See includes/DefaultSettings.php for all configurable settings
+# and their default values, but don't forget to make changes in _this_
+# file, not there.
+#
+# Further documentation for configuration settings may be found at:
+# http://www.mediawiki.org/wiki/Manual:Configuration_settings
+
+# If you customize your file layout, set $IP to the directory that contains
+# the other MediaWiki files. It will be used as a base to locate files.
+if( defined( 'MW_INSTALL_PATH' ) ) {
+ $IP = MW_INSTALL_PATH;
+} else {
+ $IP = dirname( __FILE__ );
+}
+
+$path = array( $IP, "$IP/includes", "$IP/languages" );
+set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
+
+require_once( "$IP/includes/DefaultSettings.php" );
+
+if ( $wgCommandLineMode ) {
+ if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
+ die( "This script must be run from the command line\n" );
+ }
+}
+## Uncomment this to disable output compression
+# $wgDisableOutputCompression = true;
+
+$wgSitename = "Planteome Annotation Wiki - Prototype";
+
+## The URL base path to the directory containing the wiki;
+## defaults for all runtime URL paths are based off of this.
+## For more information on customizing the URLs please see:
+## http://www.mediawiki.org/wiki/Manual:Short_URL
+$wgScriptPath = "/w";
+$wgArticlePath = "/wiki/$1";
+$wgUsePathInfo = true;
+$wgScriptExtension = ".php5";
+
+## The relative URL path to the skins directory
+$wgStylePath = "$wgScriptPath/skins";
+
+## The relative URL path to the logo. Make sure you change this from the default,
+## or else you'll overwrite your logo when you upgrade!
+$wgLogo = "$wgStylePath/common/images/wiki_logo_proto.png";
+
+## UPO means: this is also a user preference option
+
+$wgEnableEmail = true;
+$wgEnableUserEmail = true; # UPO
+
+$wgEmergencyContact = "preecej@science.oregonstate.edu";
+$wgPasswordSender = "preecej@science.oregonstate.edu";
+
+$wgEnotifUserTalk = true; # UPO
+$wgEnotifWatchlist = true; # UPO
+$wgEmailAuthentication = true;
+
+## Database settings
+$wgDBtype = "mysql";
+$wgDBserver = $_SERVER['proto_wgDBServer'];
+$wgDBname = $_SERVER['proto_wgDBName'];
+$wgDBuser = $_SERVER['proto_wgDBUser'];
+$wgDBpassword = $_SERVER['proto_wgDBPassword'];
+$wgJobRunRate = 1;
+
+# MySQL specific settings
+$wgDBprefix = "";
+
+# MySQL table options to use during installation or update
+$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
+
+# Experimental charset support for MySQL 4.1/5.0.
+$wgDBmysql5 = true;
+
+## Shared memory settings
+$wgMainCacheType = CACHE_NONE;
+$wgMemCachedServers = array();
+
+## To enable image uploads, make sure the 'images' directory
+## is writable, then set this to true:
+$wgEnableUploads = false;
+$wgUseImageMagick = true;
+$wgImageMagickConvertCommand = "/usr/bin/convert";
+
+## If you use ImageMagick (or any other shell command) on a
+## Linux server, this will need to be set to the name of an
+## available UTF-8 locale
+$wgShellLocale = "en_US.utf8";
+
+## If you want to use image uploads under safe mode,
+## create the directories images/archive, images/thumb and
+## images/temp, and make them all writable. Then uncomment
+## this, if it's not already uncommented:
+# $wgHashedUploadDirectory = false;
+
+## If you have the appropriate support software installed
+## you can enable inline LaTeX equations:
+$wgUseTeX = false;
+
+## Set $wgCacheDirectory to a writable directory on the web server
+## to make your wiki go slightly faster. The directory should not
+## be publically accessible from the web.
+#$wgCacheDirectory = "$IP/cache";
+
+$wgLocalInterwiki = strtolower( $wgSitename );
+
+$wgLanguageCode = "en";
+
+$wgSecretKey = "2030c0cc408640a1809ec82a9fb16e660d9988a63aeb77871a94c94a5f2d2c56";
+
+## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'vector', 'monobook':
+$wgDefaultSkin = 'planteome';
+
+## For attaching licensing metadata to pages, and displaying an
+## appropriate copyright notice / icon. GNU Free Documentation
+## License and Creative Commons licenses are supported so far.
+$wgEnableCreativeCommonsRdf = true;
+$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
+$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
+$wgRightsText = "Attribution-NonCommercial-ShareAlike 3.0 Unported";
+$wgRightsIcon = "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
+# $wgRightsCode = "[license_code]"; # Not yet used
+
+$wgDiff3 = "/usr/bin/diff3";
+
+
+# BEGIN 04/04/11: Justin Preece - Add'l Extensions
+$wgHiddenPrefs[] = 'skin';
+$wgUseAjax = true;
+include("$IP/extensions/SimpleForms/SimpleForms.php");
+
+require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
+$wgPFEnableStringFunctions = true;
+
+require_once( "$IP/extensions/Variables/Variables.php" );
+require_once( "$IP/extensions/Loops/Loops.php" );
+
+# END 04/04/11: Justin Preece - Add'l Extensions
+
+# BEGIN 02/22/11: Justin Preece - Semantic Bundle (SMW and other extensions)
+# (moved from top of file to address premature reference to $wgScriptPath)
+
+#include_once("$IP/extensions/DataTransfer_PS/DataTransfer.php");
+
+require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
+require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
+
+$sfgAutocompletionURLs['remote_PO_terms'] = 'http://proto.planteome.org/w/prototyping/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&qval=<substr>&format=json&max=20';
+$sfgAutocompleteOnAllChars = false;
+
+# END 02/22/11: Justin Preece - Semantic Bundle (SMW and other extensions)
+
+/** Allow client-side caching of pages */
+$wgCachePages = false;
+
+/**
+ * * Set this to current time to invalidate all prior cached pages. Affects both
+ * * client- and server-side caching.
+ * * You can get the current date on your server by using the command:
+ * * date +%Y%m%d%H%M%S
+ * */
+$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
+
+
+# When you make changes to this configuration file, this will make
+# sure that cached pages are cleared.
+$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
--- /dev/null
+<?php
+
+# This file was automatically generated by the MediaWiki installer.
+# If you make manual changes, please keep track in case you need to
+# recreate them later.
+#
+# See includes/DefaultSettings.php for all configurable settings
+# and their default values, but don't forget to make changes in _this_
+# file, not there.
+#
+# Further documentation for configuration settings may be found at:
+# http://www.mediawiki.org/wiki/Manual:Configuration_settings
+
+# If you customize your file layout, set $IP to the directory that contains
+# the other MediaWiki files. It will be used as a base to locate files.
+if( defined( 'MW_INSTALL_PATH' ) ) {
+ $IP = MW_INSTALL_PATH;
+} else {
+ $IP = dirname( __FILE__ );
+}
+
+$path = array( $IP, "$IP/includes", "$IP/languages" );
+set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
+
+require_once( "$IP/includes/DefaultSettings.php" );
+
+if ( $wgCommandLineMode ) {
+ if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
+ die( "This script must be run from the command line\n" );
+ }
+}
+## Uncomment this to disable output compression
+# $wgDisableOutputCompression = true;
+
+$wgSitename = "Planteome Annotation Wiki - Test";
+
+## The URL base path to the directory containing the wiki;
+## defaults for all runtime URL paths are based off of this.
+## For more information on customizing the URLs please see:
+## http://www.mediawiki.org/wiki/Manual:Short_URL
+$wgScriptPath = "/paw";
+$wgScriptExtension = ".php";
+
+## The relative URL path to the skins directory
+$wgStylePath = "$wgScriptPath/skins";
+
+## The relative URL path to the logo. Make sure you change this from the default,
+## or else you'll overwrite your logo when you upgrade!
+$wgLogo = "$wgStylePath/common/images/wiki_logo_with_text.png";
+
+## UPO means: this is also a user preference option
+
+$wgEnableEmail = true;
+$wgEnableUserEmail = true; # UPO
+
+$wgEmergencyContact = "preecej@science.oregonstate.edu";
+$wgPasswordSender = "preecej@science.oregonstate.edu";
+
+$wgEnotifUserTalk = true; # UPO
+$wgEnotifWatchlist = true; # UPO
+$wgEmailAuthentication = true;
+
+## Database settings
+$wgDBtype = "mysql";
+$wgDBserver = $_SERVER['test_wgDBServer'];
+$wgDBname = $_SERVER['test_wgDBName'];;
+$wgDBuser = $_SERVER['test_wgDBUser'];
+$wgDBpassword = $_SERVER['test_wgDBPassword'];
+$JobRunRate = 1;
+
+# MySQL specific settings
+$wgDBprefix = "";
+
+# MySQL table options to use during installation or update
+$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
+
+# Experimental charset support for MySQL 4.1/5.0.
+$wgDBmysql5 = true;
+
+## Shared memory settings
+$wgMainCacheType = CACHE_NONE;
+$wgMemCachedServers = array();
+
+## To enable image uploads, make sure the 'images' directory
+## is writable, then set this to true:
+$wgEnableUploads = false;
+$wgUseImageMagick = true;
+$wgImageMagickConvertCommand = "/usr/bin/convert";
+
+## If you use ImageMagick (or any other shell command) on a
+## Linux server, this will need to be set to the name of an
+## available UTF-8 locale
+$wgShellLocale = "en_US.utf8";
+
+## If you want to use image uploads under safe mode,
+## create the directories images/archive, images/thumb and
+## images/temp, and make them all writable. Then uncomment
+## this, if it's not already uncommented:
+# $wgHashedUploadDirectory = false;
+
+## If you have the appropriate support software installed
+## you can enable inline LaTeX equations:
+$wgUseTeX = false;
+
+## Set $wgCacheDirectory to a writable directory on the web server
+## to make your wiki go slightly faster. The directory should not
+## be publically accessible from the web.
+#$wgCacheDirectory = "$IP/cache";
+
+$wgLocalInterwiki = strtolower( $wgSitename );
+
+$wgLanguageCode = "en";
+
+$wgSecretKey = "9fbf4140fef09d215376947e74fef8cd873b79b5f97cdf4baf6cf5226db8b706";
+
+## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'vector', 'monobook':
+$wgDefaultSkin = 'planteome';
+
+## For attaching licensing metadata to pages, and displaying an
+## appropriate copyright notice / icon. GNU Free Documentation
+## License and Creative Commons licenses are supported so far.
+$wgEnableCreativeCommonsRdf = true;
+$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
+$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
+$wgRightsText = "Attribution-NonCommercial-ShareAlike 3.0 Unported";
+$wgRightsIcon = "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
+# $wgRightsCode = "[license_code]"; # Not yet used
+
+$wgDiff3 = "/usr/bin/diff3";
+
+# BEGIN: Justin Preece - Config changes and Semantic Bundle (SMW and other extensions)
+# (moved from top of file to address premature reference to $wgScriptPath)
+
+#$wgHiddenPrefs[] = 'skin';
+#$wgUseAjax = true;
+
+#include_once("$IP/extensions/DataTransfer_PS/DataTransfer.php");
+
+require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
+require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
+
+#include("$IP/extensions/SimpleForms/SimpleForms.php");
+
+# PO web service calls
+$sfgAutocompletionURLs['remote_PO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=po&qval=<substr>&format=json&max=20';
+$sfgAutocompletionURLs['remote_PO_ids'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=po&qval=<substr>&format=json&max=20';
+
+# GO web service calls
+$sfgAutocompletionURLs['remote_GO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=go&qval=<substr>&format=json&max=25';
+$sfgAutocompletionURLs['remote_GO_ids'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=go&qval=<substr>&format=json&max=25';
+
+$sfgAutocompleteOnAllChars = false;
+
+# END: Justin Preece - Semantic Bundle (SMW and other extensions)
+
+/** Allow client-side caching of pages */
+$wgCachePages = false;
+
+/**
+ * * Set this to current time to invalidate all prior cached pages. Affects both
+ * * client- and server-side caching.
+ * * You can get the current date on your server by using the command:
+ * * date +%Y%m%d%H%M%S
+ * */
+$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
+
+# When you make changes to this configuration file, this will make
+# sure that cached pages are cleared.
+$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
--- /dev/null
+<?php
+if ( !defined( 'MEDIAWIKI' ) ) {
+ echo "This file is not a valid entry point.";
+ exit( 1 );
+}
+
+# Semantic MediaWiki basic installation.
+# More info: http://semantic-mediawiki.org/wiki/Help:Installation
+$wgServerName = "palea.cgrb.oregonstate.edu";
+
+include_once( "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php" );
+enableSemantics($wgServerName);
+
+# Semantic Result Formats
+# More info: http://semantic-mediawiki.org/wiki/Help:Semantic_Result_Formats#Installation
+#include_once( "$IP/extensions/SemanticResultFormats/SemanticResultFormats.php" );
+
+# Semantic Forms
+# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Forms
+include_once( "$IP/extensions/SemanticForms/SemanticForms.php" );
+
+# Semantic Forms Inputs
+# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs
+#include_once( "$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php" );
+
+# Semantic Compound Queries
+# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
+#include_once( "$IP/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php" );
+
+# Semantic Drilldown
+# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Drilldown#Installation
+#include_once( "$IP/extensions/SemanticDrilldown/SemanticDrilldown.php" );
+
+# Validator, Maps and Semantic Maps
+# If you're planning to use Google Maps or Yahoo! Maps, you should also set
+# $egGoogleMapsKey and $egYahooMapsKey.
+# More info:
+# http://www.mediawiki.org/wiki/Extension:Maps#Download_and_installation
+# http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Download_and_installation
+#include_once( "$IP/extensions/Validator/Validator.php" );
+#include_once( "$IP/extensions/Maps/Maps.php" );
+#include_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );
+
+# Semantic Tasks
+# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Tasks#Installation
+#include_once( "$IP/extensions/SemanticTasks/SemanticTasks.php" );
+
+# Semantic Internal Objects
+# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
+include_once( "$IP/extensions/SemanticInternalObjects/SemanticInternalObjects.php" );
+
+# Admin Links
+# More info: http://www.mediawiki.org/wiki/Extension:Admin_Links#Installation
+#include_once( "$IP/extensions/AdminLinks/AdminLinks.php" );
+
+# Approved Revs
+# More info: http://www.mediawiki.org/wiki/Extension:Approved_Revs#Installation
+#include_once( "$IP/extensions/ApprovedRevs/ApprovedRevs.php" );
+
+# ArrayExtension
+# More info: http://www.mediawiki.org/wiki/Extension:ArrayExtension#Installation
+#include_once( "$IP/extensions/ArrayExtension/ArrayExtension.php" );
+
+# Data Transfer
+# More info: http://www.mediawiki.org/wiki/Extension:Data_Transfer#Installation
+include_once( "$IP/extensions/DataTransfer/DataTransfer.php" );
+
+# External Data
+# More info: http://www.mediawiki.org/wiki/Extension:External_Data#Installation
+include_once( "$IP/extensions/ExternalData/ExternalData.php" );
+
+# Header Tabs
+# More info: http://www.mediawiki.org/wiki/Extension:Header_Tabs#Installation
+include_once( "$IP/extensions/HeaderTabs/HeaderTabs.php" );
+
+# Page Object Model (POM)
+# More info: http://www.mediawiki.org/wiki/Extension:Page_Object_Model#Installation
+#include_once( "$IP/extensions/PageObjectModel/PageObjectModel.php" );
+
+# ParserFunctions
+# More info: http://www.mediawiki.org/wiki/Extension:ParserFunctions
+require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
+$wgPFEnableStringFunctions = true;
+
+# Replace Text
+# More info: http://www.mediawiki.org/wiki/Extension:Replace_Text#Installation
+#require_once( "$IP/extensions/ReplaceText/ReplaceText.php" );
+
+# Widgets
+# Also need to do some permission setup: http://www.mediawiki.org/wiki/Extension:Widgets#Folder_permissions
+# More info: http://www.mediawiki.org/wiki/Extension:Widgets#Installation
+#require_once( "$IP/extensions/Widgets/Widgets.php" );
+#$wgGroupPermissions['sysop']['editwidgets'] = true;
--- /dev/null
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+Planteome Annotation Wiki - Data Import Script
+
+=head1 VERSION
+
+0.3
+
+=head1 DESCRIPTION
+
+Transform external gene annotation data into an XML document readable
+by the MediaWiki extension DataTransfer (Special:ImportXML) feature.
+
+Also generates appropriate provenance of data based on a prefixed
+Source header in the import file.
+
+Handles GAF file type option for import; accommodates ontologically-
+focused annotations.
+
+New to this revision: ...
+
+=head1 USAGE
+
+paw_TransformForImport.pl -i INPUT_FILE -t TYPE -o OUTPUT_FILE -v -d
+
+=head1 OPTIONS
+
+ -i Name of input file
+ (if no path supplied, assumes current working directory)
+ -t Specifies input type of file
+ (allowed values: 'csv', 'tab', 'gaf')
+ -o Name/template of output XML file; if no path supplied, assumes
+ current working directory. The first file will match the
+ supplied value; consequent files will be numbered in this
+ format: '-#.suffix'
+ -s Seed values (comma-delimited) for Source, Annotation, and
+ Publication IDs (in that order, e.g. '2,38,15'); Defaults to
+ '1' for all seed values
+ -v View verbose information
+ -d View debugging information
+
+=head1 DEPENDENCIES
+
+Requires that the input file contain at least two headers: the first
+will hold the provenance information associated with the imported
+data, and all following headers will specify the annotation data to
+be imported in accordance with the input type.
+
+=head2 Source Header Format Example
+
+ [Source]
+ Source Date Time Stamp=Apr 2 2008
+ Source Database=Oryzabase
+ Source Version=rel. 10
+ Source URI=http://www.shigen.nig.ac.jp/rice/oryzabase/
+ Source File=http://www.shigen.nig.ac.jp/rice/oryzabase/genes/...
+
+=head2 Data Header Generic Format Examples
+
+ NOTES: The field separator may also be a tab instead, but must be
+ employed consistently across the entire file. GAF files do not
+ require a [Format] section.
+
+ [Format]
+ Template=Annotation
+ Fields=Species Name,Gene Symbol,Gene Name,Chromosome,Gene Type,Accession ID
+ [Data]
+ val1,val2,val3,...
+ "
+ "
+ "
+ [Format]
+ Template=Publication
+ Fields=Publication,Publication ID,Publication Title,...,Accession ID
+ [Data]
+ val1,val2,val3,...
+ "
+ "
+ "
+
+ NOTE: One of the fields in each format MUST be named "Accession
+ ID" for the tracking of provenance.
+
+=head1 AUTHOR
+
+Justin Preece
+ Faculty Research Assistant, Bioinformatics
+ Jaiswal Lab, Botany & Plant Pathology
+ Oregon State University
+ L<mailto:preecej@science.oregonstate.edu>
+
+=cut
+
+# TODO: file size check and clip
+# TODO: file numbering
+
+# ---------------------------------------------------------------------------
+# modules
+# ---------------------------------------------------------------------------
+
+# general
+use strict;
+use Cwd;
+use Switch;
+use Getopt::Std;
+use Data::Dumper;
+
+# specific
+use XML::Smart;
+use XML::Writer;
+use IO::File;
+use Encode;
+
+# ---------------------------------------------------------------------------
+# declarations
+# ---------------------------------------------------------------------------
+
+my %opts; # arg options
+my $file_type; # tab, csv, gaf
+my $file_del; # data delimeter
+my $input_file;
+my $output_file;
+my $verbose = 0; # flag for verbose output
+my $debug = 0; # debugging switch
+
+# global data storage ----------
+
+# universal
+my %source;
+my $output_data;
+
+# tab, csv
+my $template_name;
+my @field_names;
+my @field_data;
+my $xml; # represents the xml doc
+
+# gaf
+my %ontology_info; # holds ontology names and aspects, keyed by abbreviation
+my $curr_ontology_type; # flag to track the proper ontology to reference, line by line
+my %annotation_universals; # holds values assumed not to vary across the file
+my %annotations; # keyed on Gene Symbol
+
+# other config constants (including temporary arrangements)
+
+# default page id seeds, until I can figure out how to auto-increment w/in the
+# an import/update script
+my $SOURCE_TITLE_SEED = 1;
+my $ANNOT_TITLE_SEED = 1;
+my $PUB_TITLE_SEED = 1;
+
+$Data::Dumper::Pad = "... ";
+
+# ---------------------------------------------------------------------------
+# functions
+# ---------------------------------------------------------------------------
+
+
+# ---------------------------------------------------------------------------
+sub init
+{
+ # read and set options
+ getopts('i:t:o:s:vd', \%opts);
+
+ foreach my $key (keys %opts) {
+ my $value = $opts{$key};
+ switch ($key) {
+ case "i" {
+ if ($value =~ /\//) { # assume path
+ $input_file = $value;
+ } else {
+ $input_file = getcwd() . "\/$value";
+ }
+ }
+ case "t" { $file_type = $value; }
+
+ case "o" {
+ if ($value =~ /\//) { # assume path
+ $output_file = $value;
+ } else {
+ $output_file = getcwd() . "\/$value";
+ }
+ }
+ case "s" {
+ my @seeds = split(',',$value);
+ if (scalar @seeds == 3) {
+ $SOURCE_TITLE_SEED = $seeds[0];
+ $ANNOT_TITLE_SEED = $seeds[1];
+ $PUB_TITLE_SEED = $seeds[2];
+ } else {
+ die("Please supply three consecutive, comma-delimited seed"
+ . "values for the 's' option.");
+ }
+ }
+ case "v" { $verbose = 1; }
+
+ case "d" { $debug = 1; }
+ }
+ }
+
+ # split data on either commas or tabs
+ switch ($file_type) {
+ case "csv" { $file_del = ','; }
+ case "tab" { $file_del = '\t'; }
+ case "gaf" { $file_del = '\t'; }
+ else {
+ die(uc($file_type) . " is not a valid file type. Please supply "
+ . "a tab, csv, or gaf file.\n");
+ }
+ }
+
+ system "clear";
+ print "\n"
+ . "------------------------------------------------------------\n"
+ . "-- Planteome Annotation Wiki Import Transformation Script --\n"
+ . "------------------------------------------------------------\n"
+ . "\n"
+ . "Input File: $input_file\n"
+ . "Designated input file type: $file_type\n"
+ . "Output File (Template): $output_file\n"
+ . "Source ID Seed: $SOURCE_TITLE_SEED\n"
+ . "Annotations ID Seed: $ANNOT_TITLE_SEED\n"
+ . "Publications ID Seed: $PUB_TITLE_SEED\n"
+ . "Running in verbose mode? " . ($verbose ? "Yes" : "No") . "\n"
+ . "Running in debug mode? " . ($debug ? "Yes" : "No") . "\n"
+ . "\n"
+ . "------------------------------------------------------------\n"
+ . "------------------------------------------------------------\n"
+ . "------------------------------------------------------------\n"
+ . "\n";
+}
+
+
+# read, parse, and store generic CSV and tab templates and annotations
+# ---------------------------------------------------------------------------
+sub import_generic
+{
+ # read in "[Format] section...
+ my $line;
+ my $count = 0;
+
+ while (<INPUT_FILE>)
+ {
+ $count++;
+ $line = $_;
+ chomp $line;
+ my $data_val = (split('=',$line))[1];
+ switch ($count) {
+ case 2 { $template_name = $data_val; }
+ case 3 { @field_names = split($file_del,$data_val); }
+ else {;}
+ }
+ if ($count == 3) { last; }
+ }
+
+ # loop through data rows and add all data fields to an array of hashes
+ while (<INPUT_FILE>)
+ {
+ $line = $_;
+ chomp $line;
+
+ my @tmp_data_ary = split($file_del, $line);
+ my %tmp_hash;
+
+ if ($debug) { print join(',',@tmp_data_ary) . "\n"; }
+
+ for (my $i=0; $i<scalar(@field_names); $i++) {
+ if ($debug) { print "$i: $field_names[$i]: $tmp_data_ary[$i]\n"; }
+ $tmp_hash{$field_names[$i]} = $tmp_data_ary[$i];
+ }
+ push @field_data, \%tmp_hash;
+ }
+}
+
+# Add new ontology reference data. Aggregates add'l evidence codes, evidence,
+# and publications for the existing term id.
+# ---------------------------------------------------------------------------
+sub add_ontology_ref_data($$)
+{
+ my %ref_data = %{$_[0]};
+ my $ont_type = $_[1];
+
+ my @evidence = split('\|', $ref_data{"with_or_from"});
+ my @publications = split('\|', $ref_data{"db_reference"});
+
+ my @tmp_pubs = @publications;
+ for my $tmp_pub (@tmp_pubs)
+ {
+ if (substr($tmp_pub,0,5) ne "PMID:")
+ {
+ my @junk = splice(@publications,0,1);
+ }
+ }
+
+ # aspect (assumes only one, allows overwrite)
+ $annotations{$ref_data{"db_object_symbol"}}
+ {"Ontological References"}
+ {$ref_data{"term_id"}}
+ {"Aspect"} = $ontology_info{$ont_type}
+ {"aspects"}
+ {uc($ref_data{"aspect"})};
+
+ # evidence codes
+ $annotations{$ref_data{"db_object_symbol"}}
+ {"Ontological References"}
+ {$ref_data{"term_id"}}
+ {"Evidence Codes"}{$ref_data{"evidence_code"}} = "";
+
+ # evidence
+ for (@evidence)
+ {
+ $annotations{$ref_data{"db_object_symbol"}}
+ {"Ontological References"}
+ {$ref_data{"term_id"}}
+ {"Evidence"}{$_} = "";
+ }
+
+ # publications
+ for (@publications)
+ {
+ $annotations{$ref_data{"db_object_symbol"}}
+ {"Ontological References"}
+ {$ref_data{"term_id"}}
+ {"Publications"}{$_} = "";
+ }
+}
+
+# populate a hash containing ontology types and their aspects; used as a
+# reference for aspect proper names when importing GAF data for transformation
+# ---------------------------------------------------------------------------
+sub initialize_ontology
+{
+ %ontology_info = (
+ GO => {
+ name => "Gene Ontology",
+ aspects => {
+ P => "Biological Process",
+ C => "Cellular Component",
+ F => "Molecular Function"
+ }
+ },
+ PO => {
+ name => "Plant Ontology",
+ aspects => {
+ A => "Plant Anatomy",
+ G => "Plant Growth and Development Stage"
+ }
+ }
+ );
+
+ if ($debug) { print "...<DEBUG: \%ontology_info>\n"
+ . Dumper(\%ontology_info) . "\n\n"; }
+}
+
+# read, parse, and store GAF annotations
+# ---------------------------------------------------------------------------
+sub import_gaf
+{
+ #[GAF implied data structure]
+ # singletons: db/Source (not really, but OK for now), taxon/Species ID,
+ # assigned_by, gene_type/Gene Type (later: proteins, too)
+ # lower priority: db_object_id, date
+ # not needed: qualifier
+ # unvaried fields (gene-level): db_object_symbol/Gene Symbol,
+ # db_object_name/Gene Name,
+ # db_object_synonym/Gene Locus|Source Accession ID|Chromosome|Gene Synonyms (see below),
+ # varied fields (gene synonyms): db_object_synonym/Gene Synonym
+ # varied fields (ontology-level): term_id/Term ID, evidence_code/Evidence Code,
+ # aspect/Aspect, db_reference (multi-, get PMID from here), with_or_from (multi-)
+
+ # [Annotation Object Structure]
+ # %annotation_universals
+ # "Source"
+ # "Species ID"
+ # "Gene Type"
+ # %annotations
+ # "$Gene Symbol" => %annotation_properties
+ # "Gene Name" => string
+ # "Gene Locus"/"Source Accession ID" (first uc("AT.G")) => string
+ # "Chromosome" (AT#G in "Gene Locus") => string
+ # "Gene Synonyms" => % strings
+ # "Ontological References" => % "$Term ID" => %annotation_ontology_ref
+ # "Aspect" => string (assumes only one)
+ # "Evidence Codes" => % strings
+ # "Evidence" => % strings ("with_or_from" )
+ # "Publications" => % PMID's from "db:reference", used to create separate Pub pages
+
+ # set up a hash of ontology types and aspects to be referenced during data import
+ initialize_ontology();
+
+ # loop through data rows and build hashed annotation data structure
+ my $count = 0;
+
+ # regex for locating a useable accession id from a locus (species-specific)
+ my $locus_finder_expr;
+
+ while (<INPUT_FILE>)
+ {
+ $count++;
+ my $line = $_;
+ chomp $line;
+
+ my @curr_line_ary = split("\t", $line);
+ if ($debug) { print "...<DEBUG: \@curr_line_ary>\n"
+ . Dumper(\@curr_line_ary) . "\n\n"; }
+
+ my %curr_line_hash = (
+ "db" => $curr_line_ary[0], # Source
+ "db_object_symbol" => $curr_line_ary[2], # Gene Symbol
+ "term_id" => $curr_line_ary[4], # Term ID
+ "db_reference" => $curr_line_ary[5], # inc. Publication info (PMID)
+ "evidence_code" => $curr_line_ary[6], # Evidence Code
+ "with_or_from" => $curr_line_ary[7], # Evidence (data)
+ "aspect" => $curr_line_ary[8], # Aspect
+ "db_object_name" => $curr_line_ary[9], # Gene Name
+
+ # Gene Locus, Source Accession ID, Chromosome, Gene Synonyms
+ "db_object_synonym" => $curr_line_ary[10],
+ "db_object_type" => $curr_line_ary[11], # Gene Type
+ "taxon" => $curr_line_ary[12] # Species ID
+ );
+
+ if ($debug) { print "...<DEBUG: \%curr_line_hash>\n"
+ . Dumper(\%curr_line_hash) . "\n\n"; }
+
+ # grab the unvaried values from the first line
+ if ($count == 1) {
+ %annotation_universals = (
+ "Source" => $curr_line_hash{"db"}, # currently not in use
+ "Gene Type" => $curr_line_hash{"db_object_type"},
+ "Species ID" => "NCBI:" . (split(':',$curr_line_hash{"taxon"}))[1]#,
+ #"Species Name" => $species_name # TODO: get this from NCBI
+ );
+
+ # set species-specific values
+ switch ($annotation_universals{"Species ID"}) {
+ case "NCBI:3702" {
+ $locus_finder_expr = "^([Aa][Tt].[Gg])";
+ $annotation_universals{"Species Name"} = "Arabidopsis thaliana"; # temp; need an NCBI lookup
+ }
+ case "NCBI:4530" {
+ $locus_finder_expr = "^(LOC_|[Oo][Ss]|osa-)";
+ $annotation_universals{"Species Name"} = "Oryza sativa"; # temp; need an NCBI lookup
+ }
+ else {
+ die($annotation_universals{"Species ID"}
+ . " is not a valid NCBI taxon ID.\n");
+ }
+ }
+
+ if ($debug) { print "...<DEBUG: \%annotation_universals>\n"
+ . Dumper(\%annotation_universals) . "\n\n"; }
+
+ }
+
+ # set the ontology for the current line
+ $curr_ontology_type = uc((split(':',$curr_line_hash{"term_id"}))[0]);
+
+ # check to see if Gene Symbol hash key exists (for grouping)
+ # if not, add the new Gene Symbol and its associated props
+ if (!exists $annotations{$curr_line_hash{"db_object_symbol"}})
+ {
+
+ # print "\n*** NEW SYMBOL: $curr_line_hash{'db_object_symbol'} ***\n"; # TEST
+
+ # prepare Gene Locus, Source Accession ID, Chromosome, Gene Synonyms
+ my @loci;
+ my $locus = "";
+
+ if (exists $curr_line_hash{"db_object_synonym"})
+ {
+ my @synonyms = split('\|',$curr_line_hash{"db_object_synonym"});
+
+ if ($debug) { print "...<DEBUG: \@synonyms>\n"
+ . Dumper(\@synonyms) . "\n\n"; }
+
+ # find the gene locus, if it is listed
+ @loci = grep /$locus_finder_expr/, @synonyms;
+
+ if ($debug) { print "...<DEBUG: \@loci>\n"
+ . Dumper(\@loci) . "\n\n"; }
+ }
+
+ if (scalar(@loci) > 0) # we have at least one match; use the first one
+ {
+ $locus = $loci[0];
+ }
+ else # no match; attempt to use the Gene Symbol instead
+ {
+ if ($curr_line_hash{"db_object_symbol"} =~ $locus_finder_expr)
+ {
+ # the split drops the variant/allele signifier, if present
+ if (!(split('.',$curr_line_hash{"db_object_symbol"}))[0])
+ {
+ $locus = $curr_line_hash{"db_object_symbol"};
+ }
+ else
+ {
+ $locus = (split('.',$curr_line_hash{"db_object_symbol"}))[0];
+ }
+ }
+ else # no match; attempt to use the Gene Name instead
+ {
+ if ($curr_line_hash{"db_object_name"} =~ $locus_finder_expr)
+ {
+ $locus = (split('.',$curr_line_hash{"db_object_name"}))[0];
+ }
+ }
+ }
+
+ my $chromosome = "";
+ if ($locus) {
+ if ($annotation_universals{"Species ID"} eq "NCBI:3702") {
+ # for Ath, third char in locus, if it exists
+ $chromosome = ($locus ne "" ? (split('',$locus))[2] : "");
+ }
+ }
+
+ # set some sort of pseudo-unique value as the accession id,
+ # in order of succession: locus, then symbol
+ # (NOTE: this is dangerous; a stable identifier is preferred)
+ my $accession_id =
+ $locus ? $locus : $curr_line_hash{"db_object_symbol"};
+
+ # set up props
+ my $annotation_properties = {
+ "Accession ID" => $accession_id,
+ "Gene Name" => $curr_line_hash{"db_object_name"},
+ "Gene Locus" => $locus,
+ "Chromosome" => $chromosome
+ };
+
+ # add synonyms
+ for (split('\|', $curr_line_hash{"db_object_synonym"})) {
+ $$annotation_properties{"Gene Synonyms"}{$_} = ""; }
+
+ if ($debug) { print "...<DEBUG: \%annotation_properties>\n"
+ . Dumper($annotation_properties) . "\n\n"; }
+
+ # add new gene annotation and assign props
+ $annotations{$curr_line_hash{"db_object_symbol"}} = $annotation_properties;
+
+ add_ontology_ref_data(\%curr_line_hash, $curr_ontology_type); # add the first ontology reference (every time)
+ }
+ # that Gene Symbol does exist, so we just need to roll-up multi-line
+ # annotation information, like gene synonyms and ontology refs
+ else
+ {
+ #print "\n*** EXISTING SYMBOL: $curr_line_hash{'db_object_symbol'} ***\n"; # TEST
+
+ # add any add'l synonyms
+ for (split('\|', $curr_line_hash{"db_object_synonym"})) {
+ $annotations{$curr_line_hash{"db_object_symbol"}}
+ {"Gene Synonyms"}{$_} = ""; }
+
+ add_ontology_ref_data(\%curr_line_hash, $curr_ontology_type); # add add'l ontology reference data
+ }
+ }
+ if ($debug) { print "...<DEBUG: \%annotations>\n"
+ . Dumper(\%annotations) . "\n\n"; }
+}
+
+
+# read, parse, and store source
+# ---------------------------------------------------------------------------
+sub import_data
+{
+ print "Opening input file and reading header info...\n\n";
+
+ # open file
+ open(INPUT_FILE,$input_file) or die("Could not open input file.");
+
+ # read in the source data
+ my $count = 0;
+ my $line;
+ while (<INPUT_FILE>)
+ {
+ $count++;
+ $line = $_;
+ chomp $line;
+ my $data_val = (split('=',$line))[1];
+ switch ($count) {
+ case 2 { $source{'SourceDateStamp'} = $data_val; }
+ case 3 { $source{'SourceDatabase'} = $data_val; }
+ case 4 { $source{'SourceVersion'} = $data_val; }
+ case 5 { $source{'SourceURI'} = $data_val; }
+ case 6 { $source{'SourceFile'} = $data_val; }
+ else {;}
+ }
+ if ($count == 6) { last; }
+ }
+
+ print "Reading data...\n\n";
+ $line = <INPUT_FILE>; # skip "[Data]"
+
+ switch ($file_type) {
+ case ('csv' || 'tab') { import_generic(); }
+ case 'gaf' { import_gaf(); }
+ }
+
+ close INPUT_FILE;
+}
+
+
+# spit out the data to make sure you've read in the files correctly
+# ---------------------------------------------------------------------------
+sub show_input
+{
+ print "\n[Source]\n";
+ foreach my $key (keys %source) {
+ print "$key: $source{$key}\n";
+ }
+ print "\n";
+
+ switch ($file_type) {
+ case ('csv' || 'tab') {
+ print "[Template]\n$template_name\n\n";
+ print "[Fields]\n" . join(', ',@field_names) . "\n\n";
+
+ print "[Data]\n";
+ foreach my $row (@field_data) {
+ foreach my $key (keys %$row) {
+ print "$key => " . $row->{$key} . "\n";
+ }
+ print "\n";
+ }
+ }
+ case 'gaf' {
+ print "[Data]\n";
+
+ for my $key (keys %annotation_universals) {
+ print "$key: " . $annotation_universals{$key} . "\n";
+ }
+ print "\n";
+
+ print "[Annotations]\n" . Dumper(\%annotations) . "\n\n";
+ }
+ }
+ print "\n";
+}
+
+# xml transformation for generic tab or CSV-templated data
+# (currently uses XML::Smart)
+# ---------------------------------------------------------------------------
+sub transform_generic
+{
+ my $curr_node; # placeholder for general node cursor
+ my $curr_prov_node; # placeholder for node cursor in provenance pages
+ my $curr_annot_node; # placeholder for node cursor in annotation pages
+ my $curr_accession_id; # holds each rows accession id for provenance marking
+
+
+ $xml = new XML::Smart($output_data, 'XML::Smart::Parser');
+
+ # set root element, source page and elements
+ # (temp set of page title until moved to import extension)
+ $xml->{Pages}{Page} = {Title => "Source:$SOURCE_TITLE_SEED"};
+
+ $curr_node = $xml->{Pages}{Page};
+ $curr_node->{Template} = {Name => 'Source'};
+ $curr_node = $curr_node->{Template};
+
+ $curr_node->{Field}[0] = {Name => 'Source Date Stamp'};
+ $curr_node->{Field}[0]->content(0,$source{'SourceDateStamp'});
+ $curr_node->{Field}[1] = {Name => 'Source Database'};
+ $curr_node->{Field}[1]->content(0,$source{'SourceDatabase'});
+ $curr_node->{Field}[2] = {Name => 'Source Version'};
+ $curr_node->{Field}[2]->content(0,$source{'SourceVersion'});
+ $curr_node->{Field}[3] = {Name => 'Source URI'};
+ $curr_node->{Field}[3]->content(0,$source{'SourceURI'});
+ $curr_node->{Field}[4] = {Name => 'Source File'};
+ $curr_node->{Field}[4]->content(0,$source{'SourceFile'});
+
+ $curr_node = $curr_node->back->back; # return to <Pages> node
+
+ if ($debug) { print "Current node: " . $curr_node->path . "\n"; }
+
+ my $next_page_title_id = $ANNOT_TITLE_SEED;
+
+ # iterate through the data
+ foreach my $row (@field_data) {
+
+ # set up next annotation page
+ my $next_page = { Title => "Annotation:$next_page_title_id" };
+ push(@{$curr_node->{Page}}, $next_page);
+
+ $curr_annot_node = $curr_node->{Page}(
+ "Title","eq","Annotation:$next_page_title_id");
+
+ if ($debug) { print "Curr annot node: ".$curr_annot_node->path."\n";}
+
+ $curr_annot_node->{Template} = {Name => "$template_name"};
+ $curr_annot_node = $curr_annot_node->{Template};
+
+ # set up next provenance page
+ $next_page = { Title => "Annotation:$next_page_title_id/Provenance" };
+ push(@{$curr_node->{Page}}, $next_page);
+
+ $curr_prov_node = $curr_node->{Page}(
+ "Title","eq","Annotation:$next_page_title_id/Provenance");
+
+ if ($debug) {print "Curr prov node: " . $curr_prov_node->path . "\n"; }
+
+ $curr_prov_node->{Template} = {Name => 'Provenance'};
+ $curr_prov_node = $curr_prov_node->{Template};
+ $curr_prov_node->{Field} = {Name => 'Annotation Page'};
+ $curr_prov_node->{Field}->content(0,"Annotation:$next_page_title_id");
+ $curr_prov_node = $curr_prov_node->back;
+
+ my $field_ct = 0; # counter for field position in pages
+
+ # grab the Accession ID for the current row of data
+ foreach my $key (keys %$row) {
+ if ($key eq "Accession ID") {
+ $curr_accession_id = $row->{$key};
+ if ($debug) {
+ print "* Found Accession ID: $curr_accession_id *\n";
+ }
+ }
+ }
+ if (!(defined $curr_accession_id)) {
+ die "Error: No Accession ID available. Ending program.\n";
+ }
+
+ # iterate through the annotation data and assign to <Field> elements
+ foreach my $key (keys %$row) {
+ if ($debug) { print "$key => " . $row->{$key} . "\n"; }
+
+ # build the annotation page
+ $curr_annot_node->{Field}[$field_ct] = {Name => $key};
+ $curr_annot_node->{Field}[$field_ct]->content(0,$row->{$key});
+ $field_ct++;
+
+ # add a corresponding template to the annotation provenance page
+ my $next_prov_node = {Name => 'Provenance_Repeater'};
+ push(@{$curr_prov_node->{Template}}, $next_prov_node);
+
+ # grab the last template you added
+ $curr_prov_node = @{$curr_prov_node->{Template}}[-1];
+
+ # assign the relevant provenance field data
+ $curr_prov_node->{Field}[0] = {Name => 'Source'};
+ $curr_prov_node->{Field}[0]->content(0,"Source:$SOURCE_TITLE_SEED");
+ $curr_prov_node->{Field}[1] = {Name => 'Source Accession ID'};
+ $curr_prov_node->{Field}[1]->content(0,$curr_accession_id);
+ $curr_prov_node->{Field}[2] = {Name => 'Source Template'};
+ $curr_prov_node->{Field}[2]->content(0,$template_name);
+ $curr_prov_node->{Field}[3] = {Name => 'Source Field'};
+ $curr_prov_node->{Field}[3]->content(0,$key);
+
+ $curr_prov_node = $curr_prov_node->back;
+ }
+ $next_page_title_id++;
+ }
+
+ # write out xml doc to a single ImportXML file
+ print "Writing data to output file...\n\n";
+ $xml->save($output_file);
+ $output_data = $xml->data;
+}
+
+# xml transformation for GAF data
+# (currently uses XML::DOM)
+# ---------------------------------------------------------------------------
+sub transform_gaf
+{
+ # define templates and their fields for Provenance-generation
+ my $template_field_map = {
+ Annotation => [
+ 'Species Name',
+ 'Species ID',
+ 'Gene Symbol',
+ 'Gene Name',
+ 'Gene Locus',
+ 'Gene Type',
+ 'Chromosome',
+ 'Has Phenotype'
+ ]
+ };
+
+ my %ref_pubs; # list of non-duplicate publication references
+
+ # create new xml doc, write to string
+ my $writer = new XML::Writer(
+ OUTPUT => \$output_data,
+ DATA_MODE => 1,
+ DATA_INDENT => 4,
+ ENCODING => 'utf-8'
+ );
+
+ # create root elements
+ $writer->xmlDecl;
+ $writer->startTag("Pages");
+
+ # create source page
+ $writer->startTag("Page",Title=>"Source:$SOURCE_TITLE_SEED");
+ $writer->startTag("Template",Name=>"Source");
+
+ # iterate the source hash for element name attribs and vals
+ my @pretty_elements;
+ foreach my $element (keys %source)
+ {
+ # split on CamelCase (saves a few lines and was fun to write)
+ for ($element) {
+ @pretty_elements = /[A-Z](?:[A-Z]+|[a-z]*)(?=$|[A-Z])/g;
+ }
+ $writer->dataElement("Field", $source{$element}, Name=>"@pretty_elements");
+ }
+
+ $writer->endTag("Template");
+ $writer->endTag("Page");
+
+ # iterate %annotations
+ my $annot_title_count = $ANNOT_TITLE_SEED;
+
+ foreach my $annotation (keys %annotations)
+ {
+ # create annotation page
+ $writer->startTag("Page",Title=>"Annotation:$annot_title_count");
+ $writer->startTag("Template",Name=>"Annotation");
+ $writer->dataElement("Field", $annotation_universals{"Species Name"}, Name=>"Species Name");
+ $writer->dataElement("Field", $annotation_universals{"Species ID"}, Name=>"Species ID");
+ $writer->dataElement("Field", $annotation, Name=>"Gene Symbol");
+ $writer->dataElement("Field", $annotations{$annotation}{"Gene Name"}, Name=>"Gene Name");
+ $writer->dataElement("Field", $annotations{$annotation}{"Gene Locus"}, Name=>"Gene Locus");
+ $writer->dataElement("Field", ucfirst($annotation_universals{"Gene Type"}), Name=>"Gene Type");
+ $writer->dataElement("Field", $annotations{$annotation}{"Chromosome"}, Name=>"Chromosome");
+ $writer->dataElement("Field", "No", Name=>"Has Phenotype");
+ $writer->endTag("Template");
+ $writer->endTag("Page");
+
+ # create gene synonyms page
+ if (scalar keys (%{$annotations{$annotation}{'Gene Synonyms'}}) > 0)
+ {
+ $writer->startTag("Page",Title=>"Annotation:$annot_title_count/Gene Synonyms");
+ $writer->startTag("Template",Name=>"Gene_Synonyms");
+ $writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
+ $writer->endTag("Template");
+
+ foreach my $synonym (keys %{$annotations{$annotation}{'Gene Synonyms'}})
+ {
+ $writer->startTag("Template",Name=>"Gene_Synonym_Repeater");
+ $writer->dataElement("Field", $synonym, Name=>"Gene Synonym");
+ $writer->endTag("Template");
+ }
+ $writer->endTag("Page");
+ }
+
+ # create ont refs page
+ if (scalar keys (%{$annotations{$annotation}{"Ontological References"}}) > 0)
+ {
+ $writer->startTag("Page",Title=>"Annotation:$annot_title_count/Ontologies");
+ $writer->startTag("Template",Name=>"Ontological_References");
+ $writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
+ $writer->endTag("Template");
+
+ foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}})
+ {
+ # gather PMID's for separate Ref Publication page creation (avoid dupes)
+ if (scalar keys (%{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Publications"}}) > 0) {
+ foreach my $pub_term (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Publications"}})
+ {
+ if (!exists $ref_pubs{$pub_term}) {
+ $ref_pubs{$pub_term} = { "Annotation:$annot_title_count" => "" };
+ }
+ else
+ {
+ $ref_pubs{$pub_term}{"Annotation:$annot_title_count"} = "";
+ }
+ }
+ }
+
+ $writer->startTag("Template",Name=>"$ontology_info{$curr_ontology_type}{name} Reference Repeater");
+ $writer->dataElement("Field", $ontology_info{$curr_ontology_type}{"name"}, Name=>"Ontology");
+ $writer->dataElement("Field", $ont_term, Name=>"Term ID");
+ $writer->dataElement("Field", $annotations{$annotation}{"Ontological References"}{$ont_term}{"Aspect"}, Name=>"Aspect");
+
+ my @evidence_codes;
+ foreach my $evidence_code (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Evidence Codes"}}) {
+ push @evidence_codes, $evidence_code;
+ }
+ $writer->dataElement("Field", join(', ',@evidence_codes), Name=>"Evidence Code");
+
+ my @ary_evidence;
+ foreach my $evidence (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Evidence"}}) {
+ push @ary_evidence, $evidence;
+ }
+ $writer->dataElement("Field", join(', ',@ary_evidence), Name=>"Evidence");
+
+ $writer->endTag("Template");
+ }
+ $writer->endTag("Page");
+ }
+
+ # create provenance page
+ $writer->startTag("Page",Title=>"Annotation:$annot_title_count/Provenance");
+ $writer->startTag("Template",Name=>"Provenance");
+ $writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
+ $writer->endTag("Template");
+
+ # items on the Annotation page
+ foreach (@{@$template_field_map{"Annotation"}})
+ {
+ $writer->startTag("Template",Name=>"Provenance_Repeater");
+ $writer->dataElement("Field", $_, Name=>"Source Field or Object");
+ $writer->dataElement("Field", "Annotations", Name=>"Source Category");
+ $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
+ $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
+ $writer->endTag("Template");
+ }
+
+ # items on the Gene Synonyms subpage
+ if (scalar keys (%{$annotations{$annotation}{'Gene Synonyms'}}) > 0)
+ {
+ foreach my $synonym (keys %{$annotations{$annotation}{'Gene Synonyms'}})
+ {
+ $writer->startTag("Template",Name=>"Provenance_Repeater");
+ $writer->dataElement("Field", $synonym, Name=>"Source Field or Object");
+ $writer->dataElement("Field", "Gene Synonyms", Name=>"Source Category");
+ $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
+ $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
+ $writer->endTag("Template");
+ }
+ }
+
+ # items on the Ontologies subpage
+ if (scalar keys (%{$annotations{$annotation}{"Ontological References"}}) > 0)
+ {
+ foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}})
+ {
+ $writer->startTag("Template",Name=>"Provenance_Repeater");
+ $writer->dataElement("Field", $ont_term, Name=>"Source Field or Object");
+ $writer->dataElement("Field", "Ontological References", Name=>"Source Category");
+ $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
+ $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
+ $writer->endTag("Template");
+ }
+ }
+
+
+ $writer->endTag("Page");
+
+ $annot_title_count++;
+ }
+
+ if ($debug) { print "...<DEBUG: \%ref_pubs>\n"
+ . Dumper(\%ref_pubs) . "\n\n"; }
+
+ # create Reference Publication pages
+ my $pub_title_count = $PUB_TITLE_SEED;
+
+ if (scalar keys (%ref_pubs) > 0) {
+
+ foreach my $ref_pub (keys %ref_pubs)
+ {
+ $writer->startTag("Page",Title=>"Publication:$pub_title_count");
+ $writer->startTag("Template",Name=>"Reference_Publication");
+ $writer->dataElement("Field", "PubMed", Name=>"Publication"); # TODO: replace hard-coded pub type w/ something dynamic
+ $writer->dataElement("Field", $ref_pub, Name=>"Publication ID");
+ my @annot_refs; # holds com-del string of annotation page references
+ foreach my $annot_ref (keys %{$ref_pubs{$ref_pub}})
+ {
+ push @annot_refs, $annot_ref;
+ }
+ $writer->dataElement("Field", join(',',@annot_refs), Name=>"Annotation References");
+ $writer->endTag("Template");
+ $writer->endTag("Page");
+
+ $pub_title_count++;
+ }
+ }
+
+ # close doc
+ $writer->endTag("Pages");
+ $writer->end();
+
+ # write out the file
+ open(OUTPUT_FILE,">$output_file");
+ print OUTPUT_FILE $output_data;
+ close OUTPUT_FILE;
+}
+
+
+# loop through the hash and build annotation data and source xml doc
+# ---------------------------------------------------------------------------
+sub write_xml
+{
+ print "Transforming " . uc($file_type) . " data to SMW/SF XML...\n\n";
+
+ switch ($file_type) {
+ case ('csv' || 'tab') { transform_generic(); }
+ case 'gaf' { transform_gaf(); }
+ }
+}
+
+
+# print the transformed data (as xml)
+# ---------------------------------------------------------------------------
+sub show_output
+{
+ print "[XML]\n";
+ print $output_data;
+ print "\n";
+}
+
+# ---------------------------------------------------------------------------
+# main
+# ---------------------------------------------------------------------------
+
+init;
+import_data;
+if ($verbose) { show_input; }
+write_xml();
+if ($verbose) { show_output; }
+
+exit;
+
--- /dev/null
+<?php
+$pub_id = $_GET["pub_id"];
+$url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi/?db=pubmed&id=" . $pub_id;
+$response = file_get_contents($url);
+
+$NCBI_doc = new SimpleXMLElement($response); // inst. NCBI eDocSummary as xml
+$xml_out = new SimpleXMLElement("<eSummaryResult/>"); // inst. new xml doc for output
+
+// build xml doc with NCBI data
+$DocSum = $xml_out->addChild("DocSum");
+$DocSum->addChild("Id",$NCBI_doc->DocSum->Id);
+
+foreach ($NCBI_doc->xpath("//Item") as $item) {
+ switch((string) $item["Name"]) { // Get attributes as element indices
+ case "PubDate":
+ $DocSum->addChild("PubDate",$item);
+ break;
+ case "Author":
+ $authorList[] = $item;
+ break;
+ case "LastAuthor":
+ $DocSum->addChild("LastAuthor",$item);
+ break;
+ case "Title":
+ $DocSum->addChild("Title",$item);
+ break;
+ case "Volume":
+ $DocSum->addChild("Volume",$item);
+ break;
+ case "Pages":
+ $DocSum->addChild("Pages",$item);
+ break;
+ case "FullJournalName":
+ $DocSum->addChild("FullJournalName",$item);
+ break;
+ }
+}
+
+$author_list = "";
+foreach ($authorList as $author) {
+ $author_list = $author_list . $author . ", ";
+}
+$DocSum->addChild("AuthorList",rtrim($author_list,", "));
+
+
+header('Content-Type: text/xml'); // output xml doctype in your response
+echo $xml_out->asXML();
+?>
+
--- /dev/null
+<?php
+// JSON web service for PO terms: autocomplete and search methods
+
+/* require the user as the parameter */
+if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
+
+ $arr_field_names = array('name','acc');
+
+ /* read the params and/or set our own */
+ $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
+
+ // security measures; helps to avoid SQL injection attacks
+ $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
+ ? $_GET['field']
+ : die('"field" is a required parameter and must match an available data field.');
+
+ $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
+ if ($number_of_terms > 50) { $number_of_terms = 50; }
+
+ $qval = $_GET['qval'];
+
+ $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
+ ? strtolower($_GET['qval'])
+ : die('Please provide a searchable value');
+
+ $format = strtolower($_GET['format']) != 'json'
+ ? strtolower($_GET['format'])
+ : 'json'; //json is the default
+
+ /* connect to the db */
+ $link = mysql_connect($_SERVER['mysql_host'], $_SERVER['mysql_user'], $_SERVER['mysql_pw']) or die('Cannot connect to the DB');
+ mysql_select_db($_SERVER['mysql_db'],$link) or die('Cannot select the DB');
+
+ switch ($type) {
+ case 'autocomplete':
+ /* grab the terms from the db */
+ $query = "SELECT t.$field FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.$field LIKE '%$qval%'"
+ . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY name LIMIT $number_of_terms";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ $terms[] = array('title'=>$term[$field]);
+ }
+ }
+
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('sfautocomplete'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+
+ case 'term_detail':
+ /* grab the ontology data from the db */
+ $query = "SELECT DISTINCT t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
+ . " FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.name = '$qval'"
+ . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY t.name LIMIT 1";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ $terms[] = array(
+ 'id'=>$term['acc'],
+ 'aspect'=>$term['type'] == "plant_anatomy" ? "Plant Anatomy" : "Plant Growth and Development Stage",
+ 'definition'=>$term['definition'],
+ 'comment'=>$term['comment']);
+ }
+ }
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('PO_result'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+ default:
+ die('Sorry, this web service method is not available.');
+ }
+ /* disconnect from the db */
+ @mysql_close($link);
+}
+else { die('Not authorized.'); }
+?>
+
--- /dev/null
+<?php
+// JSON test return for autocomplete field
+
+echo "{\"sfautocomplete\":[{\"title\":\"Arabidopsis thaliana\"},{\"title\":\"Oryza sativa\"},{\"title\":\"Chlorogalum pomeridianum\"}]}";
+
+?>
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<species_collection>
+ <species name="Arabidopsis thaliana" />
+ <species name="Oryza sativa" />
+ <species name="Chlorogalum pomeridianum" />
+</species_collection>
+
--- /dev/null
+<?php echo 'ajax returned successfully'; ?>
--- /dev/null
+<?php
+$pub_id = $_GET["pub_id"];
+$url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi/?db=pubmed&id=" . $pub_id;
+$response = file_get_contents($url);
+
+$NCBI_doc = new SimpleXMLElement($response); // inst. NCBI eDocSummary as xml
+$xml_out = new SimpleXMLElement("<eSummaryResult/>"); // inst. new xml doc for output
+
+// build xml doc with NCBI data
+$DocSum = $xml_out->addChild("DocSum");
+$DocSum->addChild("Id",$NCBI_doc->DocSum->Id);
+
+foreach ($NCBI_doc->xpath("//Item") as $item) {
+ switch((string) $item["Name"]) { // Get attributes as element indices
+ case "PubDate":
+ $DocSum->addChild("PubDate",$item);
+ break;
+ case "Author":
+ $authorList[] = $item;
+ break;
+ case "LastAuthor":
+ $DocSum->addChild("LastAuthor",$item);
+ break;
+ case "Title":
+ $DocSum->addChild("Title",$item);
+ break;
+ case "Volume":
+ $DocSum->addChild("Volume",$item);
+ break;
+ case "Pages":
+ $DocSum->addChild("Pages",$item);
+ break;
+ case "FullJournalName":
+ $DocSum->addChild("FullJournalName",$item);
+ break;
+ }
+}
+
+$author_list = "";
+foreach ($authorList as $author) {
+ $author_list = $author_list . $author . ", ";
+}
+$DocSum->addChild("AuthorList",rtrim($author_list,", "));
+
+
+header('Content-Type: text/xml'); // output xml doctype in your response
+echo $xml_out->asXML();
+?>
+
--- /dev/null
+<?php
+// JSON web service for PO terms: autocomplete and search methods
+
+/* require the user as the parameter */
+if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
+
+ $arr_field_names = array('name','acc');
+ $arr_ontologies = array('go','po');
+
+ /* read the params and/or set our own */
+ $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
+
+ // security measures; helps to avoid SQL injection attacks
+ $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
+ ? $_GET['field']
+ : die('"field" is a required parameter and must match an available data field.');
+
+ $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
+ if ($number_of_terms > 50) { $number_of_terms = 50; }
+
+ $ont = isset($_GET['ontology']) && in_array(strtolower($_GET['ontology']),$arr_ontologies)
+ ? strtolower($_GET['ontology'])
+ : die('"ontology" is a required parameter and must match an available data field.');
+
+ $qval = $_GET['qval'];
+
+ $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
+ ? strtolower($_GET['qval'])
+ : die('Please provide a searchable value');
+
+ $format = strtolower($_GET['format']) != 'json'
+ ? strtolower($_GET['format'])
+ : 'json'; //json is the default
+
+ /* connect to the appropriate db */
+ switch ($ont) {
+ case 'po':
+ $link = mysql_connect($_SERVER['dev_po_host'], $_SERVER['dev_po_user'], $_SERVER['dev_po_pw']) or die('Cannot connect to the DB');
+ mysql_select_db($_SERVER['dev_po_db'],$link) or die('Cannot select the DB');
+
+ $term_types = "'plant_anatomy','plant_growth_and_development_stage'";
+ break;
+
+ case 'go':
+ $link = mysql_connect($_SERVER['dev_go_host'], $_SERVER['dev_go_user'], $_SERVER['dev_go_pw']) or die('Cannot connect to the DB');
+ mysql_select_db($_SERVER['dev_go_db'],$link) or die('Cannot select the DB');
+
+ $term_types = "'biological_process','cellular_component','molecular_function'";
+ break;
+
+ default:
+ die('Sorry, this ontology type is not available.');
+ }
+
+ switch ($type) {
+ case 'autocomplete':
+ /* grab the terms from the db */
+ $query = "SELECT t.$field FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.$field LIKE '%$qval%'"
+ . " AND t.term_type in ($term_types)"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY name LIMIT $number_of_terms";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ $terms[] = array('title'=>$term[$field]);
+ }
+ }
+
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('sfautocomplete'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+
+ case 'term_detail':
+ /* grab the ontology data from the db */
+ $query = "SELECT DISTINCT t.name as 'name', t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
+ . " FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.$field = '$qval'"
+ . " AND t.term_type in ($term_types)"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY t.name LIMIT 1";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ switch($term['type']) {
+ case 'plant_anatomy':
+ $term_type_formal = "Plant Anatomy"; break;
+ case 'plant_growth_and_development_stage':
+ $term_type_formal = "Plant Growth and Development Stage"; break;
+ case 'biological_process':
+ $term_type_formal = "Biological Process"; break;
+ case 'cellular_component':
+ $term_type_formal = "Cellular Component"; break;
+ case 'molecular_function':
+ $term_type_formal = "Molecular Function"; break;
+ }
+ $terms[] = array(
+ 'name'=>$term['name'],
+ 'id'=>$term['acc'],
+ 'aspect'=>$term_type_formal,
+ 'definition'=>$term['definition'],
+ 'comment'=>$term['comment']);
+ }
+ }
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('term_detail_result'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+ default:
+ die('Sorry, this web service method is not available.');
+ }
+ /* disconnect from the db */
+ @mysql_close($link);
+}
+else { die('Not authorized.'); }
+?>
+
--- /dev/null
+<?php
+// JSON web service for PO terms: autocomplete and search methods
+
+/* require the user as the parameter */
+if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
+
+ $arr_field_names = array('name','acc');
+ $arr_ontologies = array('go','po');
+
+ /* read the params and/or set our own */
+ $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
+
+ // security measures; helps to avoid SQL injection attacks
+ $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
+ ? $_GET['field']
+ : die('"field" is a required parameter and must match an available data field.');
+
+ $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
+ if ($number_of_terms > 50) { $number_of_terms = 50; }
+
+ $ont = isset($_GET['ontology']) && in_array(strtolower($_GET['ontology']),$arr_ontologies)
+ ? strtolower($_GET['ontology'])
+ : die('"ontology" is a required parameter and must match an available data field.');
+
+ $qval = $_GET['qval'];
+
+ $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
+ ? strtolower($_GET['qval'])
+ : die('Please provide a searchable value');
+
+ $format = strtolower($_GET['format']) != 'json'
+ ? strtolower($_GET['format'])
+ : 'json'; //json is the default
+
+ /* connect to the appropriate db */
+ switch ($ont) {
+ case 'po':
+ $link = mysql_connect($_SERVER['test_po_host'], $_SERVER['test_po_user'], $_SERVER['test_po_pw']) or die('Cannot connect to the DB');
+ mysql_select_db($_SERVER['test_po_db'],$link) or die('Cannot select the DB');
+
+ $term_types = "'plant_anatomy','plant_growth_and_development_stage'";
+ break;
+
+ case 'go':
+ $link = mysql_connect($_SERVER['test_go_host'], $_SERVER['test_go_user'], $_SERVER['test_go_pw']) or die('Cannot connect to the DB');
+ mysql_select_db($_SERVER['test_go_db'],$link) or die('Cannot select the DB');
+
+ $term_types = "'biological_process','cellular_component','molecular_function'";
+ break;
+
+ default:
+ die('Sorry, this ontology type is not available.');
+ }
+
+ switch ($type) {
+ case 'autocomplete':
+ /* grab the terms from the db */
+ $query = "SELECT t.$field FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.$field LIKE '%$qval%'"
+ . " AND t.term_type in ($term_types)"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY name LIMIT $number_of_terms";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ $terms[] = array('title'=>$term[$field]);
+ }
+ }
+
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('sfautocomplete'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+
+ case 'term_detail':
+ /* grab the ontology data from the db */
+ $query = "SELECT DISTINCT t.name as 'name', t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
+ . " FROM term t"
+ . " LEFT JOIN term_definition d ON d.term_id = t.id"
+ . " WHERE t.$field = '$qval'"
+ . " AND t.term_type in ($term_types)"
+ . " AND t.is_obsolete = 0"
+ . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
+ . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
+ . " ORDER BY t.name LIMIT 1";
+ $result = mysql_query($query,$link) or die('Errant query: '.$query);
+
+ /* create one master array of the records */
+ $terms = array();
+ if(mysql_num_rows($result)) {
+ while($term = mysql_fetch_assoc($result)) {
+ switch($term['type']) {
+ case 'plant_anatomy':
+ $term_type_formal = "Plant Anatomy"; break;
+ case 'plant_growth_and_development_stage':
+ $term_type_formal = "Plant Growth and Development Stage"; break;
+ case 'biological_process':
+ $term_type_formal = "Biological Process"; break;
+ case 'cellular_component':
+ $term_type_formal = "Cellular Component"; break;
+ case 'molecular_function':
+ $term_type_formal = "Molecular Function"; break;
+ }
+ $terms[] = array(
+ 'name'=>$term['name'],
+ 'id'=>$term['acc'],
+ 'aspect'=>$term_type_formal,
+ 'definition'=>$term['definition'],
+ 'comment'=>$term['comment']);
+ }
+ }
+ /* output in necessary format */
+ if($format == 'json') {
+ header('Content-type: application/json');
+ echo json_encode(array('term_detail_result'=>$terms));
+ }
+ else {
+ die('Sorry, this request cannot be fulfilled in '.$format.' format.');
+ }
+ break;
+ default:
+ die('Sorry, this web service method is not available.');
+ }
+ /* disconnect from the db */
+ @mysql_close($link);
+}
+else { die('Not authorized.'); }
+?>
+
--- /dev/null
+<?php
+// This file exists to ensure that base classes are preloaded before
+// MonoBook.php is compiled, working around a bug in the APC opcode
+// cache on PHP 5, where cached code can break if the include order
+// changed on a subsequent page view.
+// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+ die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
--- /dev/null
+<?php
+/**
+ * Planteome - Branch of Vector customized to the Planteome Annotation Wiki.
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ * @version 0.0.1
+ * @author Justin Preece (preecej@science.oregonstate.edu)
+ * @license CC BY-NC-SA 3.0
+
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+ die( -1 );
+
+/**
+ * SkinTemplate class for Planteome skin
+ * @ingroup Skins
+ */
+class SkinPlanteome extends SkinTemplate {
+
+ /* Functions */
+ var $skinname = 'planteome', $stylename = 'planteome',
+ $template = 'PlanteomeTemplate', $useHeadElement = true;
+
+ /**
+ * Initializes output page and sets up skin-specific parameters
+ * @param object $out Output page object to initialize
+ */
+ public function initPage( OutputPage $out ) {
+ global $wgStylePath, $wgJsMimeType, $wgStyleVersion, $wgScriptPath, $wgPlanteomeExtraStyles;
+
+ parent::initPage( $out );
+
+ // Append skin-specific styles
+ $out->addStyle( 'planteome/main-rtl.css', 'screen', '', 'rtl' );
+ $out->addStyle( 'planteome/main-ltr.css', 'screen', '', 'ltr' );
+ // Append CSS which includes IE only behavior fixes for hover support -
+ // this is better than including this in a CSS fille since it doesn't
+ // wait for the CSS file to load before fetching the HTC file.
+ $out->addScript(
+ '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
+ $wgStylePath .
+ '/planteome/csshover.htc")}</style><![endif]-->'
+ );
+ // Add extra stylesheets
+ // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE.
+ if ( is_array( $wgPlanteomeExtraStyles ) ) {
+ foreach ( $wgPlanteomeExtraStyles as $style ) {
+ $out->addStyle( 'planteome/' . $style, 'screen' );
+ }
+ }
+ }
+ /**
+ * Builds a structured array of links used for tabs and menus
+ * @return array
+ * @private
+ */
+ function buildNavigationUrls() {
+ global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath;
+ global $wgDisableLangConversion, $wgPlanteomeUseIconWatch;
+
+ wfProfileIn( __METHOD__ );
+
+ $links = array(
+ 'namespaces' => array(),
+ 'views' => array(),
+ 'actions' => array(),
+ 'variants' => array()
+ );
+
+ // Detects parameters
+ $action = $wgRequest->getVal( 'action', 'view' );
+ $section = $wgRequest->getVal( 'section' );
+
+ // Checks if page is some kind of content
+ if( $this->iscontent ) {
+
+ // Gets page objects for the related namespaces
+ $subjectPage = $this->mTitle->getSubjectPage();
+ $talkPage = $this->mTitle->getTalkPage();
+
+ // Determines if this is a talk page
+ $isTalk = $this->mTitle->isTalkPage();
+
+ // Generates XML IDs from namespace names
+ $subjectId = $this->mTitle->getNamespaceKey( '' );
+
+ if ( $subjectId == 'main' ) {
+ $talkId = 'talk';
+ } else {
+ $talkId = "{$subjectId}_talk";
+ }
+ $currentId = $isTalk ? $talkId : $subjectId;
+
+ // Adds namespace links
+ $links['namespaces'][$subjectId] = $this->tabAction(
+ $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
+ );
+ $links['namespaces'][$subjectId]['context'] = 'subject';
+ $links['namespaces'][$talkId] = $this->tabAction(
+ $talkPage, 'vector-namespace-talk', $isTalk, '', true
+ );
+ $links['namespaces'][$talkId]['context'] = 'talk';
+
+ // Adds view view link
+ if ( $this->mTitle->exists() ) {
+ $links['views']['view'] = $this->tabAction(
+ $isTalk ? $talkPage : $subjectPage,
+ 'vector-view-view', ( $action == 'view' ), '', true
+ );
+ }
+
+ wfProfileIn( __METHOD__ . '-edit' );
+
+ // Checks if user can...
+ if (
+ // edit the current page
+ $this->mTitle->quickUserCan( 'edit' ) &&
+ (
+ // if it exists
+ $this->mTitle->exists() ||
+ // or they can create one here
+ $this->mTitle->quickUserCan( 'create' )
+ )
+ ) {
+ // Builds CSS class for talk page links
+ $isTalkClass = $isTalk ? ' istalk' : '';
+
+ // Determines if we're in edit mode
+ $selected = (
+ ( $action == 'edit' || $action == 'submit' ) &&
+ ( $section != 'new' )
+ );
+ $links['views']['edit'] = array(
+ 'class' => ( $selected ? 'selected' : '' ) . $isTalkClass,
+ 'text' => $this->mTitle->exists()
+ ? wfMsg( 'vector-view-edit' )
+ : wfMsg( 'vector-view-create' ),
+ 'href' =>
+ $this->mTitle->getLocalUrl( $this->editUrlOptions() )
+ );
+ // Checks if this is a current rev of talk page and we should show a new
+ // section link
+ if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) {
+ // Checks if we should ever show a new section link
+ if ( !$wgOut->forceHideNewSectionLink() ) {
+ // Adds new section link
+ //$links['actions']['addsection']
+ $links['views']['addsection'] = array(
+ 'class' => 'collapsible ' . ( $section == 'new' ? 'selected' : false ),
+ 'text' => wfMsg( 'vector-action-addsection' ),
+ 'href' => $this->mTitle->getLocalUrl(
+ 'action=edit§ion=new'
+ )
+ );
+ }
+ }
+ // Checks if the page is known (some kind of viewable content)
+ } elseif ( $this->mTitle->isKnown() ) {
+ // Adds view source view link
+ $links['views']['viewsource'] = array(
+ 'class' => ( $action == 'edit' ) ? 'selected' : false,
+ 'text' => wfMsg( 'vector-view-viewsource' ),
+ 'href' =>
+ $this->mTitle->getLocalUrl( $this->editUrlOptions() )
+ );
+ }
+ wfProfileOut( __METHOD__ . '-edit' );
+
+ wfProfileIn( __METHOD__ . '-live' );
+
+ // Checks if the page exists
+ if ( $this->mTitle->exists() ) {
+ // Adds history view link
+ $links['views']['history'] = array(
+ 'class' => 'collapsible ' . ( ($action == 'history') ? 'selected' : false ),
+ 'text' => wfMsg( 'vector-view-history' ),
+ 'href' => $this->mTitle->getLocalUrl( 'action=history' ),
+ 'rel' => 'archives',
+ );
+
+ if( $wgUser->isAllowed( 'delete' ) ) {
+ $links['actions']['delete'] = array(
+ 'class' => ($action == 'delete') ? 'selected' : false,
+ 'text' => wfMsg( 'vector-action-delete' ),
+ 'href' => $this->mTitle->getLocalUrl( 'action=delete' )
+ );
+ }
+ if ( $this->mTitle->quickUserCan( 'move' ) ) {
+ $moveTitle = SpecialPage::getTitleFor(
+ 'Movepage', $this->thispage
+ );
+ $links['actions']['move'] = array(
+ 'class' => $this->mTitle->isSpecial( 'Movepage' ) ?
+ 'selected' : false,
+ 'text' => wfMsg( 'vector-action-move' ),
+ 'href' => $moveTitle->getLocalUrl()
+ );
+ }
+
+ if (
+ $this->mTitle->getNamespace() !== NS_MEDIAWIKI &&
+ $wgUser->isAllowed( 'protect' )
+ ) {
+ if ( !$this->mTitle->isProtected() ){
+ $links['actions']['protect'] = array(
+ 'class' => ($action == 'protect') ?
+ 'selected' : false,
+ 'text' => wfMsg( 'vector-action-protect' ),
+ 'href' =>
+ $this->mTitle->getLocalUrl( 'action=protect' )
+ );
+
+ } else {
+ $links['actions']['unprotect'] = array(
+ 'class' => ($action == 'unprotect') ?
+ 'selected' : false,
+ 'text' => wfMsg( 'vector-action-unprotect' ),
+ 'href' =>
+ $this->mTitle->getLocalUrl( 'action=unprotect' )
+ );
+ }
+ }
+ } else {
+ // article doesn't exist or is deleted
+ if (
+ $wgUser->isAllowed( 'deletedhistory' ) &&
+ $wgUser->isAllowed( 'undelete' )
+ ) {
+ if( $n = $this->mTitle->isDeleted() ) {
+ $undelTitle = SpecialPage::getTitleFor( 'Undelete' );
+ $links['actions']['undelete'] = array(
+ 'class' => false,
+ 'text' => wfMsgExt(
+ 'vector-action-undelete',
+ array( 'parsemag' ),
+ $wgLang->formatNum( $n )
+ ),
+ 'href' => $undelTitle->getLocalUrl(
+ 'target=' . urlencode( $this->thispage )
+ )
+ );
+ }
+ }
+
+ if (
+ $this->mTitle->getNamespace() !== NS_MEDIAWIKI &&
+ $wgUser->isAllowed( 'protect' )
+ ) {
+ if ( !$this->mTitle->getRestrictions( 'create' ) ) {
+ $links['actions']['protect'] = array(
+ 'class' => ($action == 'protect') ?
+ 'selected' : false,
+ 'text' => wfMsg( 'vector-action-protect' ),
+ 'href' =>
+ $this->mTitle->getLocalUrl( 'action=protect' )
+ );
+
+ } else {
+ $links['actions']['unprotect'] = array(
+ 'class' => ($action == 'unprotect') ?
+ 'selected' : false,
+ 'text' => wfMsg( 'vector-action-unprotect' ),
+ 'href' =>
+ $this->mTitle->getLocalUrl( 'action=unprotect' )
+ );
+ }
+ }
+ }
+ wfProfileOut( __METHOD__ . '-live' );
+ /**
+ * The following actions use messages which, if made particular to
+ * the Planteome skin, would break the Ajax code which makes this
+ * action happen entirely inline. Skin::makeGlobalVariablesScript
+ * defines a set of messages in a javascript object - and these
+ * messages are assumed to be global for all skins. Without making
+ * a change to that procedure these messages will have to remain as
+ * the global versions.
+ */
+ // Checks if the user is logged in
+ if ( $this->loggedin ) {
+ if ( $wgPlanteomeUseIconWatch ) {
+ $class = 'icon ';
+ $place = 'views';
+ } else {
+ $class = '';
+ $place = 'actions';
+ }
+ $mode = $this->mTitle->userIsWatching() ? 'unwatch' : 'watch';
+ $links[$place][$mode] = array(
+ 'class' => $class . ( ( $action == 'watch' || $action == 'unwatch' ) ? ' selected' : false ),
+ 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message
+ 'href' => $this->mTitle->getLocalUrl( 'action=' . $mode )
+ );
+ }
+ // This is instead of SkinTemplateTabs - which uses a flat array
+ wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
+
+ // If it's not content, it's got to be a special page
+ } else {
+ $links['namespaces']['special'] = array(
+ 'class' => 'selected',
+ 'text' => wfMsg( 'vector-namespace-special' ),
+ 'href' => $wgRequest->getRequestURL()
+ );
+ }
+
+ // Gets list of language variants
+ $variants = $wgContLang->getVariants();
+ // Checks that language conversion is enabled and variants exist
+ if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
+ // Gets preferred variant
+ $preferred = $wgContLang->getPreferredVariant();
+ // Loops over each variant
+ foreach( $variants as $code ) {
+ // Gets variant name from language code
+ $varname = $wgContLang->getVariantname( $code );
+ // Checks if the variant is marked as disabled
+ if( $varname == 'disable' ) {
+ // Skips this variant
+ continue;
+ }
+ // Appends variant link
+ $links['variants'][] = array(
+ 'class' => ( $code == $preferred ) ? 'selected' : false,
+ 'text' => $varname,
+ 'href' => $this->mTitle->getLocalURL( '', $code )
+ );
+ }
+ }
+
+ wfProfileOut( __METHOD__ );
+
+ return $links;
+ }
+}
+
+/**
+ * QuickTemplate class for Planteome skin
+ * @ingroup Skins
+ */
+class PlanteomeTemplate extends QuickTemplate {
+
+ /* Members */
+
+ /**
+ * @var Cached skin object
+ */
+ var $skin;
+
+ /* Functions */
+
+ /**
+ * Outputs the entire contents of the XHTML page
+ */
+ public function execute() {
+ global $wgRequest, $wgOut, $wgContLang;
+
+ $this->skin = $this->data['skin'];
+ $action = $wgRequest->getText( 'action' );
+
+ // Build additional attributes for navigation urls
+ $nav = $this->skin->buildNavigationUrls();
+ foreach ( $nav as $section => $links ) {
+ foreach ( $links as $key => $link ) {
+ $xmlID = $key;
+ if ( isset( $link['context'] ) && $link['context'] == 'subject' ) {
+ $xmlID = 'ca-nstab-' . $xmlID;
+ } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
+ $xmlID = 'ca-talk';
+ } else {
+ $xmlID = 'ca-' . $xmlID;
+ }
+ $nav[$section][$key]['attributes'] =
+ ' id="' . Sanitizer::escapeId( $xmlID ) . '"';
+ if ( $nav[$section][$key]['class'] ) {
+ $nav[$section][$key]['attributes'] .=
+ ' class="' . htmlspecialchars( $link['class'] ) . '"';
+ unset( $nav[$section][$key]['class'] );
+ }
+ // We don't want to give the watch tab an accesskey if the page
+ // is being edited, because that conflicts with the accesskey on
+ // the watch checkbox. We also don't want to give the edit tab
+ // an accesskey, because that's fairly superfluous and conflicts
+ // with an accesskey (Ctrl-E) often used for editing in Safari.
+ if (
+ in_array( $action, array( 'edit', 'submit' ) ) &&
+ in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
+ ) {
+ $nav[$section][$key]['key'] =
+ $this->skin->tooltip( $xmlID );
+ } else {
+ $nav[$section][$key]['key'] =
+ $this->skin->tooltipAndAccesskey( $xmlID );
+ }
+ }
+ }
+ $this->data['namespace_urls'] = $nav['namespaces'];
+ $this->data['view_urls'] = $nav['views'];
+ $this->data['action_urls'] = $nav['actions'];
+ $this->data['variant_urls'] = $nav['variants'];
+ // Build additional attributes for personal_urls
+ foreach ( $this->data['personal_urls'] as $key => $item) {
+ $this->data['personal_urls'][$key]['attributes'] =
+ ' id="' . Sanitizer::escapeId( "pt-$key" ) . '"';
+ if ( isset( $item['active'] ) && $item['active'] ) {
+ $this->data['personal_urls'][$key]['attributes'] .=
+ ' class="active"';
+ }
+ $this->data['personal_urls'][$key]['key'] =
+ $this->skin->tooltipAndAccesskey('pt-'.$key);
+ }
+
+ // Generate additional footer links
+ $footerlinks = array(
+ 'info' => array(
+ 'lastmod',
+ 'viewcount',
+ 'numberofwatchingusers',
+ 'credits',
+ 'copyright',
+ 'tagline',
+ ),
+ 'places' => array(
+ 'privacy',
+ 'about',
+ 'disclaimer',
+ ),
+ );
+ // Reduce footer links down to only those which are being used
+ $validFooterLinks = array();
+ foreach( $footerlinks as $category => $links ) {
+ $validFooterLinks[$category] = array();
+ foreach( $links as $link ) {
+ if( isset( $this->data[$link] ) && $this->data[$link] ) {
+ $validFooterLinks[$category][] = $link;
+ }
+ }
+ }
+ // Reverse horizontally rendered navigation elements
+ if ( $wgContLang->isRTL() ) {
+ $this->data['view_urls'] =
+ array_reverse( $this->data['view_urls'] );
+ $this->data['namespace_urls'] =
+ array_reverse( $this->data['namespace_urls'] );
+ $this->data['personal_urls'] =
+ array_reverse( $this->data['personal_urls'] );
+ }
+ // Output HTML Page
+ $this->html( 'headelement' );
+?>
+ <div id="mw-page-base" class="noprint"></div>
+ <div id="mw-head-base" class="noprint"></div>
+ <!-- content -->
+ <div id="content" <?php $this->html('specialpageattributes') ?>>
+ <a id="top"></a>
+ <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes') ?>></div>
+ <?php if ( $this->data['sitenotice'] ): ?>
+ <!-- sitenotice -->
+ <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
+ <!-- /sitenotice -->
+ <?php endif; ?>
+ <!-- firstHeading -->
+ <h1 id="firstHeading" class="firstHeading"><?php $this->html( 'title' ) ?></h1>
+ <!-- /firstHeading -->
+ <!-- bodyContent -->
+ <div id="bodyContent">
+ <!-- tagline -->
+ <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
+ <!-- /tagline -->
+ <!-- subtitle -->
+ <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
+ <!-- /subtitle -->
+ <?php if ( $this->data['undelete'] ): ?>
+ <!-- undelete -->
+ <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
+ <!-- /undelete -->
+ <?php endif; ?>
+ <?php if($this->data['newtalk'] ): ?>
+ <!-- newtalk -->
+ <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
+ <!-- /newtalk -->
+ <?php endif; ?>
+ <?php if ( $this->data['showjumplinks'] ): ?>
+ <!-- jumpto -->
+ <div id="jump-to-nav">
+ <?php $this->msg( 'jumpto' ) ?> <a href="#mw-head"><?php $this->msg( 'jumptonavigation' ) ?></a>,
+ <a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
+ </div>
+ <!-- /jumpto -->
+ <?php endif; ?>
+ <!-- bodytext -->
+ <?php $this->html( 'bodytext' ) ?>
+ <!-- /bodytext -->
+ <?php if ( $this->data['catlinks'] ): ?>
+ <!-- catlinks -->
+ <?php $this->html( 'catlinks' ); ?>
+ <!-- /catlinks -->
+ <?php endif; ?>
+ <?php if ( $this->data['dataAfterContent'] ): ?>
+ <!-- dataAfterContent -->
+ <?php $this->html( 'dataAfterContent' ); ?>
+ <!-- /dataAfterContent -->
+ <?php endif; ?>
+ <div class="visualClear"></div>
+ </div>
+ <!-- /bodyContent -->
+ </div>
+ <!-- /content -->
+ <!-- header -->
+ <div id="mw-head" class="noprint">
+ <?php $this->renderNavigation( 'PERSONAL' ); ?>
+ <div id="left-navigation">
+ <?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
+ </div>
+ <div id="right-navigation">
+ <?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
+ </div>
+ </div>
+ <!-- /header -->
+ <!-- panel -->
+ <div id="mw-panel" class="noprint">
+ <!-- logo -->
+ <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo $this->skin->tooltipAndAccesskey( 'p-logo' ) ?>></a></div>
+ <!-- /logo -->
+ <?php $this->renderPortals( $this->data['sidebar'] ); ?>
+ </div>
+ <!-- /panel -->
+ <!-- footer -->
+ <div id="footer"<?php $this->html('userlangattributes') ?>>
+ <?php foreach( $validFooterLinks as $category => $links ): ?>
+ <?php if ( count( $links ) > 0 ): ?>
+ <ul id="footer-<?php echo $category ?>">
+ <?php foreach( $links as $link ): ?>
+ <?php if( isset( $this->data[$link] ) && $this->data[$link] ): ?>
+ <li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </ul>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ <ul id="footer-icons" class="noprint">
+ <?php if ( $this->data['poweredbyico'] ): ?>
+ <li id="footer-icon-poweredby"><?php $this->html( 'poweredbyico' ) ?></li>
+ <?php endif; ?>
+ <?php if ( $this->data['copyrightico'] ): ?>
+ <li id="footer-icon-copyright"><?php $this->html( 'copyrightico' ) ?></li>
+ <?php endif; ?>
+ </ul>
+ <div style="clear:both"></div>
+ </div>
+ <!-- /footer -->
+ <!-- fixalpha -->
+ <script type="<?php $this->text('jsmimetype') ?>"> if ( window.isMSIE55 ) fixalpha(); </script>
+ <!-- /fixalpha -->
+ <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
+ <?php $this->html( 'reporttime' ) ?>
+ <?php if ( $this->data['debug'] ): ?>
+ <!-- Debug output: <?php $this->text( 'debug' ); ?> -->
+ <?php endif; ?>
+ </body>
+</html>
+<?php
+ }
+
+ /**
+ * Render a series of portals
+ */
+ private function renderPortals( $portals ) {
+ // Force the rendering of the following portals
+ if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true;
+ if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true;
+ if ( !isset( $portals['LANGUAGES'] ) ) $portals['LANGUAGES'] = true;
+ // Render portals
+ foreach ( $portals as $name => $content ) {
+ echo "\n<!-- {$name} -->\n";
+ switch( $name ) {
+ case 'SEARCH':
+ break;
+ case 'TOOLBOX':
+?>
+<div class="portal" id="p-tb">
+ <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
+ <div class="body">
+ <ul>
+ <?php if( $this->data['notspecialpage'] ): ?>
+ <li id="t-whatlinkshere"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['whatlinkshere']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-whatlinkshere' ) ?>><?php $this->msg( 'whatlinkshere' ) ?></a></li>
+ <?php if( $this->data['nav_urls']['recentchangeslinked'] ): ?>
+ <li id="t-recentchangeslinked"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['recentchangeslinked']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-recentchangeslinked' ) ?>><?php $this->msg( 'recentchangeslinked-toolbox' ) ?></a></li>
+ <?php endif; ?>
+ <?php endif; ?>
+ <?php if( isset( $this->data['nav_urls']['trackbacklink'] ) ): ?>
+ <li id="t-trackbacklink"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['trackbacklink']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-trackbacklink' ) ?>><?php $this->msg( 'trackbacklink' ) ?></a></li>
+ <?php endif; ?>
+ <?php if( $this->data['feeds']): ?>
+ <li id="feedlinks">
+ <?php foreach( $this->data['feeds'] as $key => $feed ): ?>
+ <a id="<?php echo Sanitizer::escapeId( "feed-$key" ) ?>" href="<?php echo htmlspecialchars( $feed['href'] ) ?>" rel="alternate" type="application/<?php echo $key ?>+xml" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey( 'feed-' . $key ) ?>><?php echo htmlspecialchars( $feed['text'] ) ?></a>
+ <?php endforeach; ?>
+ </li>
+ <?php endif; ?>
+ <?php foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?>
+ <?php if( $this->data['nav_urls'][$special]): ?>
+ <li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars( $this->data['nav_urls'][$special]['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-' . $special ) ?>><?php $this->msg( $special ) ?></a></li>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ <?php if( !empty( $this->data['nav_urls']['print']['href'] ) ): ?>
+ <li id="t-print"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['print']['href'] ) ?>" rel="alternate"<?php echo $this->skin->tooltipAndAccesskey( 't-print' ) ?>><?php $this->msg( 'printableversion' ) ?></a></li>
+ <?php endif; ?>
+ <?php if ( !empty( $this->data['nav_urls']['permalink']['href'] ) ): ?>
+ <li id="t-permalink"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['permalink']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-permalink' ) ?>><?php $this->msg( 'permalink' ) ?></a></li>
+ <?php elseif ( $this->data['nav_urls']['permalink']['href'] === '' ): ?>
+ <li id="t-ispermalink"<?php echo $this->skin->tooltip( 't-ispermalink' ) ?>><?php $this->msg( 'permalink' ) ?></li>
+ <?php endif; ?>
+ <?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?>
+ </ul>
+ </div>
+</div>
+<?php
+ break;
+ case 'LANGUAGES':
+ if ( $this->data['language_urls'] ) {
+?>
+<div class="portal" id="p-lang">
+ <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'otherlanguages' ) ?></h5>
+ <div class="body">
+ <ul>
+ <?php foreach ( $this->data['language_urls'] as $langlink ): ?>
+ <li class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php echo $langlink['text'] ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+</div>
+<?php
+ }
+ break;
+ default:
+?>
+<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
+ <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?></h5>
+ <div class="body">
+ <?php if ( is_array( $content ) ): ?>
+ <ul>
+ <?php foreach( $content as $key => $val ): ?>
+ <li id="<?php echo Sanitizer::escapeId( $val['id'] ) ?>"<?php if ( $val['active'] ): ?> class="active" <?php endif; ?>><a href="<?php echo htmlspecialchars( $val['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( $val['id'] ) ?>><?php echo htmlspecialchars( $val['text'] ) ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ <?php else: ?>
+ <?php echo $content; /* Allow raw HTML block to be defined by extensions */ ?>
+ <?php endif; ?>
+ </div>
+</div>
+<?php
+ break;
+ }
+ echo "\n<!-- /{$name} -->\n";
+ }
+ }
+
+ /**
+ * Render one or more navigations elements by name, automatically reveresed
+ * when UI is in RTL mode
+ */
+ private function renderNavigation( $elements ) {
+ global $wgContLang, $wgPlanteomeUseSimpleSearch, $wgStylePath;
+
+ // If only one element was given, wrap it in an array, allowing more
+ // flexible arguments
+ if ( !is_array( $elements ) ) {
+ $elements = array( $elements );
+ // If there's a series of elements, reverse them when in RTL mode
+ } else if ( $wgContLang->isRTL() ) {
+ $elements = array_reverse( $elements );
+ }
+ // Render elements
+ foreach ( $elements as $name => $element ) {
+ echo "\n<!-- {$name} -->\n";
+ switch ( $element ) {
+ case 'NAMESPACES':
+?>
+<div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h5><?php $this->msg('namespaces') ?></h5>
+ <ul<?php $this->html('userlangattributes') ?>>
+ <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
+ <li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
+ <?php endforeach; ?>
+ </ul>
+</div>
+<?php
+ break;
+ case 'VARIANTS':
+?>
+<div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
+ <div class="menu">
+ <ul<?php $this->html('userlangattributes') ?>>
+ <?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
+ <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+</div>
+<?php
+ break;
+ case 'VIEWS':
+?>
+<div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h5><?php $this->msg('views') ?></h5>
+ <ul<?php $this->html('userlangattributes') ?>>
+ <?php foreach ($this->data['view_urls'] as $key => $link ): ?>
+ <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+</div>
+<?php
+ break;
+ case 'ACTIONS':
+?>
+<div id="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h5><span><?php $this->msg('actions') ?></span><a href="#"></a></h5>
+ <div class="menu">
+ <ul<?php $this->html('userlangattributes') ?>>
+ <?php foreach ($this->data['action_urls'] as $key => $link ): ?>
+ <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+</div>
+<?php
+ break;
+ case 'PERSONAL':
+?>
+<div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h5><?php $this->msg('personaltools') ?></h5>
+ <ul<?php $this->html('userlangattributes') ?>>
+ <?php foreach($this->data['personal_urls'] as $key => $item): ?>
+ <li <?php echo $item['attributes'] ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php echo $item['key'] ?><?php if(!empty($item['class'])): ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php endif; ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+</div>
+<?php
+ break;
+ case 'SEARCH':
+?>
+<div id="p-search">
+ <h5<?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
+ <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
+ <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
+ <?php if ( $wgPlanteomeUseSimpleSearch ): ?>
+ <div id="simpleSearch">
+ <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />
+ <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>> </button>
+ </div>
+ <?php else: ?>
+ <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />
+ <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg( 'searcharticle' ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
+ <input type="submit" name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg( 'searchbutton' ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+ <?php endif; ?>
+ </form>
+</div>
+<?php
+
+ break;
+ }
+ echo "\n<!-- /{$name} -->\n";
+ }
+ }
+}
--- /dev/null
+#
+# Handy makefile to build the RTL variant with cssjanus
+#
+
+all: main-rtl.css
+
+main-rtl.css: main-ltr.css cssjanus/cssjanus.py
+ python cssjanus/cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css
+
+# SVN version is broken; checking in our own.
+#cssjanus/cssjanus.py:
+# svn co http://cssjanus.googlecode.com/svn/trunk cssjanus
+
+#distclean: clean
+# rm -rf cssjanus
+
+clean:
+ rm -f main-rtl.css
--- /dev/null
+<public:attach event="ondocumentready" onevent="CSSHover()" />
+<script>
+// <?)|(a([^#.][^ ]+)+)):(hover|active|focus))/i,
+ REG_AFFECTED = /(.*?)\:(hover|active|focus)/i,
+ REG_PSEUDO = /[^:]+:([a-z-]+).*/i,
+ REG_SELECT = /(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi,
+ REG_CLASS = /\.([a-z0-9_-]*on(hover|active|focus))/i,
+ REG_MSIE = /msie (5|6|7)/i,
+ REG_COMPAT = /backcompat/i;
+
+ // css prefix, a leading dash would be nice (spec), but IE6 doesn't like that.
+ var CSSHOVER_PREFIX = 'csh-';
+
+ /**
+ * Local CSSHover object
+ * --------------------------
+ */
+
+ var CSSHover = {
+
+ // array of CSSHoverElements, used to unload created events
+ elements: [],
+
+ // buffer used for checking on duplicate expressions
+ callbacks: {},
+
+ // init, called once ondomcontentready via the exposed window.CSSHover function
+ init:function() {
+ // don't run in IE8 standards; expressions don't work in standards mode anyway,
+ // and the stuff we're trying to fix should already work properly
+ if(!REG_MSIE.test(navigator.userAgent) && !REG_COMPAT.test(window.document.compatMode)) return;
+
+ // start parsing the existing stylesheets
+ var sheets = window.document.styleSheets, l = sheets.length;
+ for(var i=0; i<l; i++) {
+ this.parseStylesheet(sheets[i]);
+ }
+ },
+
+ // called from init, parses individual stylesheets
+ parseStylesheet:function(sheet) {
+ // check sheet imports and parse those recursively
+ if(sheet.imports) {
+ try {
+ var imports = sheet.imports, l = imports.length;
+ for(var i=0; i<l; i++) {
+ this.parseStylesheet(sheet.imports[i]);
+ }
+ } catch(securityException){
+ // trycatch for various possible errors,
+ // todo; might need to be placed inside the for loop, since an error
+ // on an import stops following imports from being processed.
+ }
+ }
+
+ // interate the sheet's rules and send them to the parser
+ try {
+ var rules = sheet.rules, l = rules.length;
+ for(var j=0; j<l; j++) {
+ this.parseCSSRule(rules[j], sheet);
+ }
+ } catch(securityException){
+ // trycatch for various errors, most likely accessing the sheet's rules,
+ // don't see how individual rules would throw errors, but you never know.
+ }
+ },
+
+ // magic starts here ...
+ parseCSSRule:function(rule, sheet) {
+
+ // The sheet is used to insert new rules into, this must be the same sheet the rule
+ // came from, to ensure that relative paths keep pointing to the right location.
+
+ // only parse a rule if it contains an interactive pseudo.
+ var select = rule.selectorText;
+ if(REG_INTERACTIVE.test(select)) {
+ var style = rule.style.cssText,
+
+ // affected elements are found by truncating the selector after the interactive pseudo,
+ // eg: "div li:hover" >> "div li"
+ affected = REG_AFFECTED.exec(select)[1],
+
+ // that pseudo is needed for a classname, and defines the type of interaction (focus, hover, active)
+ // eg: "li:hover" >> "onhover"
+ pseudo = select.replace(REG_PSEUDO, 'on$1'),
+
+ // the new selector is going to use that classname in a new css rule,
+ // since IE6 doesn't support multiple classnames, this is merged into one classname
+ // eg: "li:hover" >> "li.onhover", "li.folder:hover" >> "li.folderonhover"
+ newSelect = select.replace(REG_SELECT, '.$2' + pseudo),
+
+ // the classname is needed for the events that are going to be set on affected nodes
+ // eg: "li.folder:hover" >> "folderonhover"
+ className = REG_CLASS.exec(newSelect)[1];
+
+ // no need to set the same callback more than once when the same selector uses the same classname
+ var hash = affected + className;
+ if(!this.callbacks[hash]) {
+
+ // affected elements are given an expression under a fake css property, the classname is used
+ // because a unique name (eg "behavior:") would be overruled (in IE6, not 7) by a following rule
+ // selecting the same element. The expression does a callback to CSSHover.patch, rerouted via the
+ // exposed window.CSSHover function.
+
+ // because the expression is added to the stylesheet, and styles are always applied to html that is
+ // dynamically added to the dom, the expression will also trigger for those new elements (provided
+ // they are selected by the affected selector).
+
+ sheet.addRule(affected, CSSHOVER_PREFIX + className + ':expression(CSSHover(this, "'+pseudo+'", "'+className+'"))');
+
+ // hash it, so an identical selector/class combo does not duplicate the expression
+ this.callbacks[hash] = true;
+ }
+
+ // duplicate expressions need not be set, but the style could differ
+ sheet.addRule(newSelect, style);
+ }
+ },
+
+ // called via the expression, patches individual nodes
+ patch:function(node, type, className) {
+
+ // the patch's type is returned to the expression. That way the expression property
+ // can be found and removed, to stop it from calling patch over and over.
+ // The if will fail the first time, since the expression has not yet received a value.
+ var property = CSSHOVER_PREFIX + className;
+ if(node.style[property]) {
+ node.style[property] = null;
+ }
+
+ // just to make sure, also keep track of patched classnames locally on the node
+ if(!node.csshover) node.csshover = [];
+
+ // and check for it to prevent duplicate events with the same classname from being set
+ if(!node.csshover[className]) {
+ node.csshover[className] = true;
+
+ // create an instance for the given type and class
+ var element = new CSSHoverElement(node, type, className);
+
+ // and store that instance for unloading later on
+ this.elements.push(element);
+ }
+
+ // returns a dummy value to the expression
+ return type;
+ },
+
+ // unload stuff onbeforeunload
+ unload:function() {
+ try {
+
+ // remove events
+ var l = this.elements.length;
+ for(var i=0; i<l; i++) {
+ this.elements[i].unload();
+ }
+
+ // and set properties to null
+ this.elements = [];
+ this.callbacks = {};
+
+ } catch (e) {
+ }
+ }
+ };
+
+ // add the unload to the onbeforeunload event
+ window.attachEvent('onbeforeunload', function(){
+ CSSHover.unload();
+ });
+
+ /**
+ * CSSHoverElement
+ * --------------------------
+ */
+
+ // the event types associated with the interactive pseudos
+ var CSSEvents = {
+ onhover: { activator: 'onmouseenter', deactivator: 'onmouseleave' },
+ onactive: { activator: 'onmousedown', deactivator: 'onmouseup' },
+ onfocus: { activator: 'onfocus', deactivator: 'onblur' }
+ };
+
+ // CSSHoverElement constructor, called via CSSHover.patch
+ function CSSHoverElement(node, type, className) {
+
+ // the CSSHoverElement patches individual nodes by manually applying the events that should
+ // have fired by the css pseudoclasses, eg mouseenter and mouseleave for :hover.
+
+ this.node = node;
+ this.type = type;
+ var replacer = new RegExp('(^|\\s)'+className+'(\\s|$)', 'g');
+
+ // store event handlers for removal onunload
+ this.activator = function(){ node.className += ' ' + className; };
+ this.deactivator = function(){ node.className = node.className.replace(replacer, ' '); };
+
+ // add the events
+ node.attachEvent(CSSEvents[type].activator, this.activator);
+ node.attachEvent(CSSEvents[type].deactivator, this.deactivator);
+ }
+
+ CSSHoverElement.prototype = {
+ // onbeforeunload, called via CSSHover.unload
+ unload:function() {
+
+ // remove events
+ this.node.detachEvent(CSSEvents[this.type].activator, this.activator);
+ this.node.detachEvent(CSSEvents[this.type].deactivator, this.deactivator);
+
+ // and set properties to null
+ this.activator = null;
+ this.deactivator = null;
+ this.node = null;
+ this.type = null;
+ }
+ };
+
+ /**
+ * Public hook
+ * --------------------------
+ */
+
+ return function(node, type, className) {
+ if(node) {
+ // called via the css expression; patches individual nodes
+ return CSSHover.patch(node, type, className);
+ } else {
+ // called ondomcontentready via the public:attach node
+ CSSHover.init();
+ }
+ };
+
+})();
+
+// ]]>
+</script>
\ No newline at end of file
--- /dev/null
+ Copyright 2008 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
--- /dev/null
+=CSSJanus=
+
+_Flips CSS from LTR to an RTL orienation and vice-versa_
+
+Author: `Lindsey Simon <elsigh@google.com>`
+
+==Introduction==
+
+CSSJanus is CSS parser utility designed to aid the conversion of a website's
+layout from left-to-right(LTR) to right-to-left(RTL). The script was born out of
+a need to convert CSS for RTL languages when tables are not being used for layout (since tables will automatically reorder TD's in RTL).
+CSSJanus will change most of the obvious CSS property names and their values as
+well as some not-so-obvious ones (cursor, background-position %, etc...).
+The script is designed to offer flexibility to account for cases when you do
+not want to change certain rules which exist to account for bidirectional text
+display bugs, as well as situations where you may or may not want to flip annotations inside of the background url string.
+Note that you can disable CSSJanus from running on an entire class or any
+rule within a class by prepending a /* @noflip */ comment before the rule(s)
+you want CSSJanus to ignore.
+
+CSSJanus itself is not always enough to make a website that works in a LTR
+language context work in a RTL language all the way, but it is a start.
+
+==Getting the code==
+
+View the trunk at:
+
+ http://cssjanus.googlecode.com/svn/trunk/
+
+Check out the latest development version anonymously with:
+
+{{{
+ $ svn checkout http://cssjanus.googlecode.com/svn/trunk/ cssjanus
+}}}
+
+==Using==
+
+Usage:
+ ./cssjanus.py < file.css > file-rtl.css
+Flags:
+ --swap_left_right_in_url: Fixes "left"/"right" string within urls.
+ Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css
+ --swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.
+ Ex: ./cssjanus.py --swap_ltr_rtl_in_url < file.css > file_rtl.css
+
+If you'd like to make use of the webapp version of cssjanus, you'll need to
+download the Google App Engine SDK
+ http://code.google.com/appengine/downloads.html
+and also drop a "django" directory into this directory, with the latest svn
+from django. You should be good to go with that setup. Please let me know
+otherwise.
+
+==Bugs, Patches==
+
+Patches and bug reports are welcome, just please keep the style
+consistent with the original source. If you find a bug, please include a diff
+of cssjanus_test.py with the bug included as a new unit test which fails. It
+will make understanding and fixing the bug easier.
+
+==Todo==
+
+* Include some helpers for some typical bidi text solutions?
+* Aural CSS (azimuth) swapping?
+
+==Contributors==
+
+Additional thanks to Mike Samuel for his work on csslex.py, Andy Perelson for
+his help coding and reviewing, Stephen Zabel for his help with i18n and my sanity,
+and to Eric Meyer for his thoughtful input.
+Thanks to Junyu Wang for the Chinese translation.
+Thanks to Masashi Kawashima for the Japanese translation.
+Thanks to Taaryk Taar and Tariq Al-Omaireeni for an updated Arabic translation.
+Thanks to Jens Meiert for the German translation.
+
+==License==
+
+{{{
+ Copyright 2008 Google Inc. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+}}}
--- /dev/null
+#!/usr/bin/python
+#
+# Copyright 2008 Google Inc. All Rights Reserved.
+
+"""Converts a LeftToRight Cascading Style Sheet into a RightToLeft one.
+
+ This is a utility script for replacing "left" oriented things in a CSS file
+ like float, padding, margin with "right" oriented values.
+ It also does the opposite.
+ The goal is to be able to conditionally serve one large, cat'd, compiled CSS
+ file appropriate for LeftToRight oriented languages and RightToLeft ones.
+ This utility will hopefully help your structural layout done in CSS in
+ terms of its RTL compatibility. It will not help with some of the more
+ complicated bidirectional text issues.
+"""
+
+__author__ = 'elsigh@google.com (Lindsey Simon)'
+__version__ = '0.1'
+
+import logging
+import re
+import sys
+import getopt
+import os
+
+import csslex
+
+logging.getLogger().setLevel(logging.INFO)
+
+# Global for the command line flags.
+SWAP_LTR_RTL_IN_URL_DEFAULT = False
+SWAP_LEFT_RIGHT_IN_URL_DEFAULT = False
+FLAGS = {'swap_ltr_rtl_in_url': SWAP_LTR_RTL_IN_URL_DEFAULT,
+ 'swap_left_right_in_url': SWAP_LEFT_RIGHT_IN_URL_DEFAULT}
+
+# Generic token delimiter character.
+TOKEN_DELIMITER = '~'
+
+# This is a temporary match token we use when swapping strings.
+TMP_TOKEN = '%sTMP%s' % (TOKEN_DELIMITER, TOKEN_DELIMITER)
+
+# Token to be used for joining lines.
+TOKEN_LINES = '%sJ%s' % (TOKEN_DELIMITER, TOKEN_DELIMITER)
+
+# Global constant text strings for CSS value matches.
+LTR = 'ltr'
+RTL = 'rtl'
+LEFT = 'left'
+RIGHT = 'right'
+
+# This is a lookbehind match to ensure that we don't replace instances
+# of our string token (left, rtl, etc...) if there's a letter in front of it.
+# Specifically, this prevents replacements like 'background: url(bright.png)'.
+LOOKBEHIND_NOT_LETTER = r'(?<![a-zA-Z])'
+
+# This is a lookahead match to make sure we don't replace left and right
+# in actual classnames, so that we don't break the HTML/CSS dependencies.
+# Read literally, it says ignore cases where the word left, for instance, is
+# directly followed by valid classname characters and a curly brace.
+# ex: .column-left {float: left} will become .column-left {float: right}
+LOOKAHEAD_NOT_OPEN_BRACE = (r'(?!(?:%s|%s|%s|#|\:|\.|\,|\+|>)*?{)' %
+ (csslex.NMCHAR, TOKEN_LINES, csslex.SPACE))
+
+
+# These two lookaheads are to test whether or not we are within a
+# background: url(HERE) situation.
+# Ref: http://www.w3.org/TR/CSS21/syndata.html#uri
+VALID_AFTER_URI_CHARS = r'[\'\"]?%s' % csslex.WHITESPACE
+LOOKAHEAD_NOT_CLOSING_PAREN = r'(?!%s?%s\))' % (csslex.URL_CHARS,
+ VALID_AFTER_URI_CHARS)
+LOOKAHEAD_FOR_CLOSING_PAREN = r'(?=%s?%s\))' % (csslex.URL_CHARS,
+ VALID_AFTER_URI_CHARS)
+
+# Compile a regex to swap left and right values in 4 part notations.
+# We need to match negatives and decimal numeric values.
+# ex. 'margin: .25em -2px 3px 0' becomes 'margin: .25em 0 3px -2px'.
+POSSIBLY_NEGATIVE_QUANTITY = r'((?:-?%s)|(?:inherit|auto))' % csslex.QUANTITY
+POSSIBLY_NEGATIVE_QUANTITY_SPACE = r'%s%s%s' % (POSSIBLY_NEGATIVE_QUANTITY,
+ csslex.SPACE,
+ csslex.WHITESPACE)
+FOUR_NOTATION_QUANTITY_RE = re.compile(r'%s%s%s%s' %
+ (POSSIBLY_NEGATIVE_QUANTITY_SPACE,
+ POSSIBLY_NEGATIVE_QUANTITY_SPACE,
+ POSSIBLY_NEGATIVE_QUANTITY_SPACE,
+ POSSIBLY_NEGATIVE_QUANTITY),
+ re.I)
+COLOR = r'(%s|%s)' % (csslex.NAME, csslex.HASH)
+COLOR_SPACE = r'%s%s' % (COLOR, csslex.SPACE)
+FOUR_NOTATION_COLOR_RE = re.compile(r'(-color%s:%s)%s%s%s(%s)' %
+ (csslex.WHITESPACE,
+ csslex.WHITESPACE,
+ COLOR_SPACE,
+ COLOR_SPACE,
+ COLOR_SPACE,
+ COLOR),
+ re.I)
+
+# Compile the cursor resize regexes
+CURSOR_EAST_RE = re.compile(LOOKBEHIND_NOT_LETTER + '([ns]?)e-resize')
+CURSOR_WEST_RE = re.compile(LOOKBEHIND_NOT_LETTER + '([ns]?)w-resize')
+
+# Matches the condition where we need to replace the horizontal component
+# of a background-position value when expressed in horizontal percentage.
+# Had to make two regexes because in the case of position-x there is only
+# one quantity, and otherwise we don't want to match and change cases with only
+# one quantity.
+BG_HORIZONTAL_PERCENTAGE_RE = re.compile(r'background(-position)?(%s:%s)'
+ '([^%%]*?)(%s)%%'
+ '(%s(?:%s|%s))' % (csslex.WHITESPACE,
+ csslex.WHITESPACE,
+ csslex.NUM,
+ csslex.WHITESPACE,
+ csslex.QUANTITY,
+ csslex.IDENT))
+
+BG_HORIZONTAL_PERCENTAGE_X_RE = re.compile(r'background-position-x(%s:%s)'
+ '(%s)%%' % (csslex.WHITESPACE,
+ csslex.WHITESPACE,
+ csslex.NUM))
+
+# Matches the opening of a body selector.
+BODY_SELECTOR = r'body%s{%s' % (csslex.WHITESPACE, csslex.WHITESPACE)
+
+# Matches anything up until the closing of a selector.
+CHARS_WITHIN_SELECTOR = r'[^\}]*?'
+
+# Matches the direction property in a selector.
+DIRECTION_RE = r'direction%s:%s' % (csslex.WHITESPACE, csslex.WHITESPACE)
+
+# These allow us to swap "ltr" with "rtl" and vice versa ONLY within the
+# body selector and on the same line.
+BODY_DIRECTION_LTR_RE = re.compile(r'(%s)(%s)(%s)(ltr)' %
+ (BODY_SELECTOR, CHARS_WITHIN_SELECTOR,
+ DIRECTION_RE),
+ re.I)
+BODY_DIRECTION_RTL_RE = re.compile(r'(%s)(%s)(%s)(rtl)' %
+ (BODY_SELECTOR, CHARS_WITHIN_SELECTOR,
+ DIRECTION_RE),
+ re.I)
+
+
+# Allows us to swap "direction:ltr" with "direction:rtl" and
+# vice versa anywhere in a line.
+DIRECTION_LTR_RE = re.compile(r'%s(ltr)' % DIRECTION_RE)
+DIRECTION_RTL_RE = re.compile(r'%s(rtl)' % DIRECTION_RE)
+
+# We want to be able to switch left with right and vice versa anywhere
+# we encounter left/right strings, EXCEPT inside the background:url(). The next
+# two regexes are for that purpose. We have alternate IN_URL versions of the
+# regexes compiled in case the user passes the flag that they do
+# actually want to have left and right swapped inside of background:urls.
+LEFT_RE = re.compile('%s(%s)%s%s' % (LOOKBEHIND_NOT_LETTER,
+ LEFT,
+ LOOKAHEAD_NOT_CLOSING_PAREN,
+ LOOKAHEAD_NOT_OPEN_BRACE),
+ re.I)
+RIGHT_RE = re.compile('%s(%s)%s%s' % (LOOKBEHIND_NOT_LETTER,
+ RIGHT,
+ LOOKAHEAD_NOT_CLOSING_PAREN,
+ LOOKAHEAD_NOT_OPEN_BRACE),
+ re.I)
+LEFT_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
+ LEFT,
+ LOOKAHEAD_FOR_CLOSING_PAREN),
+ re.I)
+RIGHT_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
+ RIGHT,
+ LOOKAHEAD_FOR_CLOSING_PAREN),
+ re.I)
+LTR_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
+ LTR,
+ LOOKAHEAD_FOR_CLOSING_PAREN),
+ re.I)
+RTL_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
+ RTL,
+ LOOKAHEAD_FOR_CLOSING_PAREN),
+ re.I)
+
+COMMENT_RE = re.compile('(%s)' % csslex.COMMENT, re.I)
+
+NOFLIP_TOKEN = r'\@noflip'
+# The NOFLIP_TOKEN inside of a comment. For now, this requires that comments
+# be in the input, which means users of a css compiler would have to run
+# this script first if they want this functionality.
+NOFLIP_ANNOTATION = r'/\*%s%s%s\*/' % (csslex.WHITESPACE,
+ NOFLIP_TOKEN,
+ csslex. WHITESPACE)
+
+# After a NOFLIP_ANNOTATION, and within a class selector, we want to be able
+# to set aside a single rule not to be flipped. We can do this by matching
+# our NOFLIP annotation and then using a lookahead to make sure there is not
+# an opening brace before the match.
+NOFLIP_SINGLE_RE = re.compile(r'(%s%s[^;}]+;?)' % (NOFLIP_ANNOTATION,
+ LOOKAHEAD_NOT_OPEN_BRACE),
+ re.I)
+
+# After a NOFLIP_ANNOTATION, we want to grab anything up until the next } which
+# means the entire following class block. This will prevent all of its
+# declarations from being flipped.
+NOFLIP_CLASS_RE = re.compile(r'(%s%s})' % (NOFLIP_ANNOTATION,
+ CHARS_WITHIN_SELECTOR),
+ re.I)
+
+
+class Tokenizer:
+ """Replaces any CSS comments with string tokens and vice versa."""
+
+ def __init__(self, token_re, token_string):
+ """Constructor for the Tokenizer.
+
+ Args:
+ token_re: A regex for the string to be replace by a token.
+ token_string: The string to put between token delimiters when tokenizing.
+ """
+ logging.debug('Tokenizer::init token_string=%s' % token_string)
+ self.token_re = token_re
+ self.token_string = token_string
+ self.originals = []
+
+ def Tokenize(self, line):
+ """Replaces any string matching token_re in line with string tokens.
+
+ By passing a function as an argument to the re.sub line below, we bypass
+ the usual rule where re.sub will only replace the left-most occurrence of
+ a match by calling the passed in function for each occurrence.
+
+ Args:
+ line: A line to replace token_re matches in.
+
+ Returns:
+ line: A line with token_re matches tokenized.
+ """
+ line = self.token_re.sub(self.TokenizeMatches, line)
+ logging.debug('Tokenizer::Tokenize returns: %s' % line)
+ return line
+
+ def DeTokenize(self, line):
+ """Replaces tokens with the original string.
+
+ Args:
+ line: A line with tokens.
+
+ Returns:
+ line with any tokens replaced by the original string.
+ """
+
+ # Put all of the comments back in by their comment token.
+ for i, original in enumerate(self.originals):
+ token = '%s%s_%s%s' % (TOKEN_DELIMITER, self.token_string, i + 1,
+ TOKEN_DELIMITER)
+ line = line.replace(token, original)
+ logging.debug('Tokenizer::DeTokenize i:%s w/%s' % (i, token))
+ logging.debug('Tokenizer::DeTokenize returns: %s' % line)
+ return line
+
+ def TokenizeMatches(self, m):
+ """Replaces matches with tokens and stores the originals.
+
+ Args:
+ m: A match object.
+
+ Returns:
+ A string token which replaces the CSS comment.
+ """
+ logging.debug('Tokenizer::TokenizeMatches %s' % m.group(1))
+ self.originals.append(m.group(1))
+ return '%s%s_%s%s' % (TOKEN_DELIMITER,
+ self.token_string,
+ len(self.originals),
+ TOKEN_DELIMITER)
+
+
+def FixBodyDirectionLtrAndRtl(line):
+ """Replaces ltr with rtl and vice versa ONLY in the body direction.
+
+ Args:
+ line: A string to replace instances of ltr with rtl.
+ Returns:
+ line with direction: ltr and direction: rtl swapped only in body selector.
+ line = FixBodyDirectionLtrAndRtl('body { direction:ltr }')
+ line will now be 'body { direction:rtl }'.
+ """
+
+ line = BODY_DIRECTION_LTR_RE.sub('\\1\\2\\3%s' % TMP_TOKEN, line)
+ line = BODY_DIRECTION_RTL_RE.sub('\\1\\2\\3%s' % LTR, line)
+ line = line.replace(TMP_TOKEN, RTL)
+ logging.debug('FixBodyDirectionLtrAndRtl returns: %s' % line)
+ return line
+
+
+def FixLeftAndRight(line):
+ """Replaces left with right and vice versa in line.
+
+ Args:
+ line: A string in which to perform the replacement.
+
+ Returns:
+ line with left and right swapped. For example:
+ line = FixLeftAndRight('padding-left: 2px; margin-right: 1px;')
+ line will now be 'padding-right: 2px; margin-left: 1px;'.
+ """
+
+ line = LEFT_RE.sub(TMP_TOKEN, line)
+ line = RIGHT_RE.sub(LEFT, line)
+ line = line.replace(TMP_TOKEN, RIGHT)
+ logging.debug('FixLeftAndRight returns: %s' % line)
+ return line
+
+
+def FixLeftAndRightInUrl(line):
+ """Replaces left with right and vice versa ONLY within background urls.
+
+ Args:
+ line: A string in which to replace left with right and vice versa.
+
+ Returns:
+ line with left and right swapped in the url string. For example:
+ line = FixLeftAndRightInUrl('background:url(right.png)')
+ line will now be 'background:url(left.png)'.
+ """
+
+ line = LEFT_IN_URL_RE.sub(TMP_TOKEN, line)
+ line = RIGHT_IN_URL_RE.sub(LEFT, line)
+ line = line.replace(TMP_TOKEN, RIGHT)
+ logging.debug('FixLeftAndRightInUrl returns: %s' % line)
+ return line
+
+
+def FixLtrAndRtlInUrl(line):
+ """Replaces ltr with rtl and vice versa ONLY within background urls.
+
+ Args:
+ line: A string in which to replace ltr with rtl and vice versa.
+
+ Returns:
+ line with left and right swapped. For example:
+ line = FixLtrAndRtlInUrl('background:url(rtl.png)')
+ line will now be 'background:url(ltr.png)'.
+ """
+
+ line = LTR_IN_URL_RE.sub(TMP_TOKEN, line)
+ line = RTL_IN_URL_RE.sub(LTR, line)
+ line = line.replace(TMP_TOKEN, RTL)
+ logging.debug('FixLtrAndRtlInUrl returns: %s' % line)
+ return line
+
+
+def FixCursorProperties(line):
+ """Fixes directional CSS cursor properties.
+
+ Args:
+ line: A string to fix CSS cursor properties in.
+
+ Returns:
+ line reformatted with the cursor properties substituted. For example:
+ line = FixCursorProperties('cursor: ne-resize')
+ line will now be 'cursor: nw-resize'.
+ """
+
+ line = CURSOR_EAST_RE.sub('\\1' + TMP_TOKEN, line)
+ line = CURSOR_WEST_RE.sub('\\1e-resize', line)
+ line = line.replace(TMP_TOKEN, 'w-resize')
+ logging.debug('FixCursorProperties returns: %s' % line)
+ return line
+
+
+def FixFourPartNotation(line):
+ """Fixes the second and fourth positions in 4 part CSS notation.
+
+ Args:
+ line: A string to fix 4 part CSS notation in.
+
+ Returns:
+ line reformatted with the 4 part notations swapped. For example:
+ line = FixFourPartNotation('padding: 1px 2px 3px 4px')
+ line will now be 'padding: 1px 4px 3px 2px'.
+ """
+ line = FOUR_NOTATION_QUANTITY_RE.sub('\\1 \\4 \\3 \\2', line)
+ line = FOUR_NOTATION_COLOR_RE.sub('\\1\\2 \\5 \\4 \\3', line)
+ logging.debug('FixFourPartNotation returns: %s' % line)
+ return line
+
+
+def FixBackgroundPosition(line):
+ """Fixes horizontal background percentage values in line.
+
+ Args:
+ line: A string to fix horizontal background position values in.
+
+ Returns:
+ line reformatted with the 4 part notations swapped.
+ """
+ line = BG_HORIZONTAL_PERCENTAGE_RE.sub(CalculateNewBackgroundPosition, line)
+ line = BG_HORIZONTAL_PERCENTAGE_X_RE.sub(CalculateNewBackgroundPositionX,
+ line)
+ logging.debug('FixBackgroundPosition returns: %s' % line)
+ return line
+
+
+def CalculateNewBackgroundPosition(m):
+ """Fixes horizontal background-position percentages.
+
+ This function should be used as an argument to re.sub since it needs to
+ perform replacement specific calculations.
+
+ Args:
+ m: A match object.
+
+ Returns:
+ A string with the horizontal background position percentage fixed.
+ BG_HORIZONTAL_PERCENTAGE_RE.sub(FixBackgroundPosition,
+ 'background-position: 75% 50%')
+ will return 'background-position: 25% 50%'.
+ """
+
+ # The flipped value is the offset from 100%
+ new_x = str(100-int(m.group(4)))
+
+ # Since m.group(1) may very well be None type and we need a string..
+ if m.group(1):
+ position_string = m.group(1)
+ else:
+ position_string = ''
+
+ return 'background%s%s%s%s%%%s' % (position_string, m.group(2), m.group(3),
+ new_x, m.group(5))
+
+
+def CalculateNewBackgroundPositionX(m):
+ """Fixes percent based background-position-x.
+
+ This function should be used as an argument to re.sub since it needs to
+ perform replacement specific calculations.
+
+ Args:
+ m: A match object.
+
+ Returns:
+ A string with the background-position-x percentage fixed.
+ BG_HORIZONTAL_PERCENTAGE_X_RE.sub(CalculateNewBackgroundPosition,
+ 'background-position-x: 75%')
+ will return 'background-position-x: 25%'.
+ """
+
+ # The flipped value is the offset from 100%
+ new_x = str(100-int(m.group(2)))
+
+ return 'background-position-x%s%s%%' % (m.group(1), new_x)
+
+
+def ChangeLeftToRightToLeft(lines,
+ swap_ltr_rtl_in_url=None,
+ swap_left_right_in_url=None):
+ """Turns lines into a stream and runs the fixing functions against it.
+
+ Args:
+ lines: An list of CSS lines.
+ swap_ltr_rtl_in_url: Overrides this flag if param is set.
+ swap_left_right_in_url: Overrides this flag if param is set.
+
+ Returns:
+ The same lines, but with left and right fixes.
+ """
+
+ global FLAGS
+
+ # Possibly override flags with params.
+ logging.debug('ChangeLeftToRightToLeft swap_ltr_rtl_in_url=%s, '
+ 'swap_left_right_in_url=%s' % (swap_ltr_rtl_in_url,
+ swap_left_right_in_url))
+ if swap_ltr_rtl_in_url is None:
+ swap_ltr_rtl_in_url = FLAGS['swap_ltr_rtl_in_url']
+ if swap_left_right_in_url is None:
+ swap_left_right_in_url = FLAGS['swap_left_right_in_url']
+
+ # Turns the array of lines into a single line stream.
+ logging.debug('LINES COUNT: %s' % len(lines))
+ line = TOKEN_LINES.join(lines)
+
+ # Tokenize any single line rules with the /* noflip */ annotation.
+ noflip_single_tokenizer = Tokenizer(NOFLIP_SINGLE_RE, 'NOFLIP_SINGLE')
+ line = noflip_single_tokenizer.Tokenize(line)
+
+ # Tokenize any class rules with the /* noflip */ annotation.
+ noflip_class_tokenizer = Tokenizer(NOFLIP_CLASS_RE, 'NOFLIP_CLASS')
+ line = noflip_class_tokenizer.Tokenize(line)
+
+ # Tokenize the comments so we can preserve them through the changes.
+ comment_tokenizer = Tokenizer(COMMENT_RE, 'C')
+ line = comment_tokenizer.Tokenize(line)
+
+ # Here starteth the various left/right orientation fixes.
+ line = FixBodyDirectionLtrAndRtl(line)
+
+ if swap_left_right_in_url:
+ line = FixLeftAndRightInUrl(line)
+
+ if swap_ltr_rtl_in_url:
+ line = FixLtrAndRtlInUrl(line)
+
+ line = FixLeftAndRight(line)
+ line = FixCursorProperties(line)
+ line = FixFourPartNotation(line)
+ line = FixBackgroundPosition(line)
+
+ # DeTokenize the single line noflips.
+ line = noflip_single_tokenizer.DeTokenize(line)
+
+ # DeTokenize the class-level noflips.
+ line = noflip_class_tokenizer.DeTokenize(line)
+
+ # DeTokenize the comments.
+ line = comment_tokenizer.DeTokenize(line)
+
+ # Rejoin the lines back together.
+ lines = line.split(TOKEN_LINES)
+
+ return lines
+
+def usage():
+ """Prints out usage information."""
+
+ print 'Usage:'
+ print ' ./cssjanus.py < file.css > file-rtl.css'
+ print 'Flags:'
+ print ' --swap_left_right_in_url: Fixes "left"/"right" string within urls.'
+ print ' Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css'
+ print ' --swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.'
+ print ' Ex: ./cssjanus --swap_ltr_rtl_in_url < file.css > file_rtl.css'
+
+def setflags(opts):
+ """Parse the passed in command line arguments and set the FLAGS global.
+
+ Args:
+ opts: getopt iterable intercepted from argv.
+ """
+
+ global FLAGS
+
+ # Parse the arguments.
+ for opt, arg in opts:
+ logging.debug('opt: %s, arg: %s' % (opt, arg))
+ if opt in ("-h", "--help"):
+ usage()
+ sys.exit()
+ elif opt in ("-d", "--debug"):
+ logging.getLogger().setLevel(logging.DEBUG)
+ elif opt == '--swap_ltr_rtl_in_url':
+ FLAGS['swap_ltr_rtl_in_url'] = True
+ elif opt == '--swap_left_right_in_url':
+ FLAGS['swap_left_right_in_url'] = True
+
+
+def main(argv):
+ """Sends stdin lines to ChangeLeftToRightToLeft and writes to stdout."""
+
+ # Define the flags.
+ try:
+ opts, args = getopt.getopt(argv, 'hd', ['help', 'debug',
+ 'swap_left_right_in_url',
+ 'swap_ltr_rtl_in_url'])
+ except getopt.GetoptError:
+ usage()
+ sys.exit(2)
+
+ # Parse and set the flags.
+ setflags(opts)
+
+ # Call the main routine with all our functionality.
+ fixed_lines = ChangeLeftToRightToLeft(sys.stdin.readlines())
+ sys.stdout.write(''.join(fixed_lines))
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
--- /dev/null
+#!/usr/bin/python
+#
+# Copyright 2007 Google Inc. All Rights Reserved.
+
+"""CSS Lexical Grammar rules.
+
+CSS lexical grammar from http://www.w3.org/TR/CSS21/grammar.html
+"""
+
+__author__ = ['elsigh@google.com (Lindsey Simon)',
+ 'msamuel@google.com (Mike Samuel)']
+
+# public symbols
+__all__ = [ "NEWLINE", "HEX", "NON_ASCII", "UNICODE", "ESCAPE", "NMSTART", "NMCHAR", "STRING1", "STRING2", "IDENT", "NAME", "HASH", "NUM", "STRING", "URL", "SPACE", "WHITESPACE", "COMMENT", "QUANTITY", "PUNC" ]
+
+# The comments below are mostly copied verbatim from the grammar.
+
+# "@import" {return IMPORT_SYM;}
+# "@page" {return PAGE_SYM;}
+# "@media" {return MEDIA_SYM;}
+# "@charset" {return CHARSET_SYM;}
+KEYWORD = r'(?:\@(?:import|page|media|charset))'
+
+# nl \n|\r\n|\r|\f ; a newline
+NEWLINE = r'\n|\r\n|\r|\f'
+
+# h [0-9a-f] ; a hexadecimal digit
+HEX = r'[0-9a-f]'
+
+# nonascii [\200-\377]
+NON_ASCII = r'[\200-\377]'
+
+# unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
+UNICODE = r'(?:(?:\\' + HEX + r'{1,6})(?:\r\n|[ \t\r\n\f])?)'
+
+# escape {unicode}|\\[^\r\n\f0-9a-f]
+ESCAPE = r'(?:' + UNICODE + r'|\\[^\r\n\f0-9a-f])'
+
+# nmstart [_a-z]|{nonascii}|{escape}
+NMSTART = r'(?:[_a-z]|' + NON_ASCII + r'|' + ESCAPE + r')'
+
+# nmchar [_a-z0-9-]|{nonascii}|{escape}
+NMCHAR = r'(?:[_a-z0-9-]|' + NON_ASCII + r'|' + ESCAPE + r')'
+
+# ident -?{nmstart}{nmchar}*
+IDENT = r'-?' + NMSTART + NMCHAR + '*'
+
+# name {nmchar}+
+NAME = NMCHAR + r'+'
+
+# hash
+HASH = r'#' + NAME
+
+# string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\" ; "string"
+STRING1 = r'"(?:[^\"\\]|\\.)*"'
+
+# string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\' ; 'string'
+STRING2 = r"'(?:[^\'\\]|\\.)*'"
+
+# string {string1}|{string2}
+STRING = '(?:' + STRING1 + r'|' + STRING2 + ')'
+
+# num [0-9]+|[0-9]*"."[0-9]+
+NUM = r'(?:[0-9]*\.[0-9]+|[0-9]+)'
+
+# s [ \t\r\n\f]
+SPACE = r'[ \t\r\n\f]'
+
+# w {s}*
+WHITESPACE = '(?:' + SPACE + r'*)'
+
+# url special chars
+URL_SPECIAL_CHARS = r'[!#$%&*-~]'
+
+# url chars ({url_special_chars}|{nonascii}|{escape})*
+URL_CHARS = r'(?:%s|%s|%s)*' % (URL_SPECIAL_CHARS, NON_ASCII, ESCAPE)
+
+# url
+URL = r'url\(%s(%s|%s)%s\)' % (WHITESPACE, STRING, URL_CHARS, WHITESPACE)
+
+# comments
+# see http://www.w3.org/TR/CSS21/grammar.html
+COMMENT = r'/\*[^*]*\*+([^/*][^*]*\*+)*/'
+
+# {E}{M} {return EMS;}
+# {E}{X} {return EXS;}
+# {P}{X} {return LENGTH;}
+# {C}{M} {return LENGTH;}
+# {M}{M} {return LENGTH;}
+# {I}{N} {return LENGTH;}
+# {P}{T} {return LENGTH;}
+# {P}{C} {return LENGTH;}
+# {D}{E}{G} {return ANGLE;}
+# {R}{A}{D} {return ANGLE;}
+# {G}{R}{A}{D} {return ANGLE;}
+# {M}{S} {return TIME;}
+# {S} {return TIME;}
+# {H}{Z} {return FREQ;}
+# {K}{H}{Z} {return FREQ;}
+# % {return PERCENTAGE;}
+UNIT = r'(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)'
+
+# {num}{UNIT|IDENT} {return NUMBER;}
+QUANTITY = '%s(?:%s%s|%s)?' % (NUM, WHITESPACE, UNIT, IDENT)
+
+# "<!--" {return CDO;}
+# "-->" {return CDC;}
+# "~=" {return INCLUDES;}
+# "|=" {return DASHMATCH;}
+# {w}"{" {return LBRACE;}
+# {w}"+" {return PLUS;}
+# {w}">" {return GREATER;}
+# {w}"," {return COMMA;}
+PUNC = r'<!--|-->|~=|\|=|[\{\+>,:;]'
--- /dev/null
+/* Babaco Color Scheme A */
+
+
+a:visited,
+a:visited div.vectorTabs li.selected a:visited span {
+ color: #260e9c;
+}
+
+html .thumbimage,
+#toc, .toc, .mw-warning, div.thumbinner {
+ border-color: #cccccc;
+ background-color: #f7f7f7;
+}
+
+/* Framework */
+#mw-page-base {
+ background-color: inherit !important;
+ background-image: none !important;
+}
+body {
+ background-color: #f9f9f9 !important;
+ background-image:url(images/page-base-updated.png);
+}
+
+/* Links */
+a {
+ color: #0066cc;
+}
+a:visited {
+ color: #004d99;
+}
+a:active {
+ color: #ff6600;
+}
+a.stub {
+ color: #56228b;
+}
+a.new, #p-personal a.new {
+ color: #a31205 !important;
+}
+a.new:visited, #p-personal a.new:visited {
+ color: #a31205;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ border-color:#999999;
+ font-family:georgia, times, serif;
+ font-weight:bold;
+}
+#firstHeading {
+ font-size:1.5em;
+}
+h2 .editsection,
+.portal h5{
+ font-family:sans-serif;
+ font-weight:normal;
+
+}
+#toc h2, .toc h2 {
+ font-family:sans-serif;
+ font-weight:normal;
+}
+body #mw-panel div.portal div.body {
+ background-image:url(images/new-portal-break-ltr.png);
+}
+body.rtl #mw-panel div.portal div.body {
+ background-image:url(images/new-portal-break-rtl.png);
+}
+body div.vectorTabs li a, div.vectorTabs li a span{
+ color:#4d4d4d;
+}
+body div.vectorTabs li.selected a,
+body div.vectorTabs li.selected a span,
+body div.vectorTabs li.selected a:visited
+body div.vectorTabs li.selected a:visited span {
+ color: #ff9900 !important;
+ font-weight:bold;
+}
+div.vectorTabs li.new a,
+div.vectorTabs li.new a span,
+div.vectorTabs li.new a:visited,
+div.vectorTabs li.new a:visited span {
+ color:#a31205;
+}
+#toc,
+.toc,
+.mw-warning,
+div.gallerybox div.thumb,
+table.gallery,
+#preferences fieldset.prefsection fieldset,
+#preferences,
+html .thumbimage,
+.usermessage,
+img.thumbborder,
+div.thumbinner{
+ border: 1px solid #cccccc;
+ background-color: #f7f7f7;
+}
+#mw-panel div.portal h5 {
+ font-weight:bold;
+ margin-bottom:0;
+ padding-bottom:0.05em;
+ color:#000000;
+}
--- /dev/null
+/* Babaco Color Scheme A */
+
+
+html .thumbimage,
+#toc, .toc, .mw-warning, div.thumbinner {
+ border-color: #cccccc;
+ background-color: #f7f7f7;
+}
+
+/* Framework */
+#mw-page-base {
+ background-color: inherit !important;
+ background-image: none !important;
+}
+body {
+ background-color: #f9f9f9 !important;
+ background-image:url(images/page-base-updated.png);
+}
+/* Links */
+a {
+ color: #003cb3;
+}
+a.stub {
+ color: #772233;
+}
+a.new, #p-personal a.new {
+ color: #a31205 !important;
+}
+{
+ color: #260e9c;
+}
+a:visited,
+a:visited div.vectorTabs li.selected a:visited span,
+a.new:visited,
+#p-personal a.new:visited {
+ color: #260e9c;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ border-color:#999999;
+}
+
+div.vectorTabs li.new a,
+div.vectorTabs li.new a span,
+div.vectorTabs li.new a:visited,
+div.vectorTabs li.new a:visited span {
+ color:#a31205;
+}
+
+#toc,
+.toc,
+.mw-warning,
+div.gallerybox div.thumb,
+table.gallery,
+#preferences fieldset.prefsection fieldset,
+#preferences,
+html .thumbimage,
+.usermessage,
+img.thumbborder,
+div.thumbinner{
+ border: 1px solid #cccccc;
+ background-color: #f7f7f7;
+}
--- /dev/null
+/* Babaco Color Scheme C */
+
+/* ridding ourselves of the gradient */
+#mw-page-base {
+ background-color: inherit !important;
+ background-image: none !important;
+}
+
+a:visited,
+a:visited div.vectorTabs li.selected a:visited span {
+ color: #260e9c;
+}
+
+html .thumbimage,
+#toc, .toc, .mw-warning, div.thumbinner {
+ border-color: #cccccc;
+ background-color: #f7f7f7;
+}
+
+/* Framework */
+body {
+ background-color: #f9f9f9 !important;
+ background-image:url(images/page-base-updated.png);
+}
+
+/* Links */
+a {
+ color: #0066cc;
+}
+a:visited {
+ color: #004d99;
+}
+a:active {
+ color: #ff6600;
+}
+a.stub {
+ color: #56228b;
+}
+a.new, #p-personal a.new {
+ color: #a31205 !important;
+}
+a.new:visited, #p-personal a.new:visited {
+ color: #a31205;
+}
+
+#firstHeading {
+ font-size:1.5em;
+}
+h2 .editsection,
+.portal h5 {
+ font-weight:normal;
+}
+#toc h2, .toc h2 {
+ font-weight:normal;
+}
+body #mw-panel div.portal div.body {
+ background-image:url(images/new-portal-break-ltr.png);
+}
+
+div.vectorTabs li.new a,
+div.vectorTabs li.new a span,
+div.vectorTabs li.new a:visited,
+div.vectorTabs li.new a:visited span {
+ color:#a31205;
+}
+#toc,
+.toc,
+.mw-warning,
+div.gallerybox div.thumb,
+table.gallery,
+#preferences fieldset.prefsection fieldset,
+#preferences,
+html .thumbimage,
+.usermessage,
+img.thumbborder,
+div.thumbinner {
+ border: 1px solid #cccccc;
+ background-color: #f7f7f7;
+}
+#mw-panel div.portal h5 {
+ font-weight:bold;
+ margin-bottom:0;
+ padding-bottom:0.05em;
+ color:#000000;
+}
+div.vectorTabs li.selected a,
+div.vectorTabs li.selected a span,
+div.vectorTabs li.selected a:visited
+div.vectorTabs li.selected a:visited span {
+ color: #333333 !important;
+}
\ No newline at end of file
--- /dev/null
+/* new border color */
+#content {
+ background-image: url(images/new-border.png);
+}
+
+#footer {
+ background-image: url(images/new-border.png);
+}
+ body div#left-navigation,
+ body div#right-navigation {
+ top:3.2em;
+ }
+ body div#right-navigation {
+ margin-top:3.2em;
+ }
+ body #p-search form,
+ body #p-search input,
+ body #simpleSearch {
+ margin-top:0;
+ }
+ body div#p-cactions {
+ margin-top:0;
+ }
+ /* Namespaces and Views */
+ /* @noflip */
+ div.vectorTabs {
+ float: left;
+ }
+ body div.vectorTabs {
+ background-image: none;
+ padding-left: 0;
+ }
+ /* @noflip */
+ div.vectorTabs ul {
+ float: left;
+ }
+ div.vectorTabs ul {
+ height: 100%;
+ list-style: none;
+ background-image:none;
+ margin: 0;
+ padding: 0;
+ }
+ /* @noflip */
+ div.vectorTabs ul li {
+ float: left;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ body div.vectorTabs ul li {
+ line-height: 1em;
+ display: inline-block;
+ height: 2em;
+ margin: 0 1px 0 0;
+ padding: 0;
+ background:none;
+ overflow:hidden;
+ white-space:nowrap;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorTabs ul > li {
+ display: block;
+ }
+ body div.vectorTabs li.selected {
+ background-image: none;
+ border:none;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ body div.vectorTabs li a {
+ border-top:1px solid #cccccc;
+ border-left:1px solid #cccccc;
+ border-right:1px solid #cccccc;
+ display: inline-block;
+ height: 1.7em;
+ padding-left: 0.6em;
+ padding-right: 0.6em;
+ background-image:url(images/tab-fade.png);
+ background-position:bottom left;
+ background-repeat:repeat-x;
+ background-color:#ffffff;
+ }
+ body div.vectorTabs li.new a{
+ background-image:url(images/tab-new-fade.png);
+
+ }
+ div.vectorTabs li a,
+ div.vectorTabs li a span {
+ cursor: pointer;
+ }
+ div.vectorTabs li a span {
+ font-size: 0.8em;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorTabs li > a {
+ display: block;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ body div.vectorTabs a span {
+ display: inline-block;
+ padding-top: 0.5em;
+ }
+ /* IGNORED BY IE6 */
+ /* @noflip */
+ div.vectorTabs a > span {
+ float: left;
+ display: block;
+ }
+ body div.vectorTabs li.last {
+ background-image: url(images/tab-last.png);
+ background-repeat:no-repeat;
+ background-position:top right;
+ border:none;
+ }
+ body div.vectorTabs li.last a {
+ margin-right:7px;
+ padding-left:0.4em;
+ padding-right:0;
+ border-left:1px solid #cccccc;
+ border-top:1px solid #cccccc;
+ border-right:none;
+ background-image:url(images/tab-fade.png);
+ background-position:top left;
+ background-repeat:repeat-x;
+ }
+ body div.vectorTabs li.first {
+ background-image: url(images/tab-first.png);
+ background-repeat:no-repeat;
+ background-position:top left;
+ border:none;
+ }
+ body div.vectorTabs li.first a {
+ margin-left:7px;
+ padding-left:0em;
+ padding-right:0.4em;
+ border-right:1px solid #cccccc;
+ border-top:1px solid #cccccc;
+ background-image:url(images/tab-fade.png);
+ background-position:top left;
+ background-repeat:repeat-x;
+ }
+
+ div.vectorTabs li.selected a,
+ div.vectorTabs li.selected a span,
+ div.vectorTabs li.selected a:visited
+ div.vectorTabs li.selected a:visited span {
+ color: #be5900 !important;
+ text-decoration: none;
+ }
+
+ body div.vectorTabs li.selected a {
+ border-top:1px solid #6cc8f3;
+ border-right:1px solid #6cc8f3;
+ border-left:1px solid #6cc8f3;
+ background-color:#fff;
+ height:1.75em;
+ background-image:none;
+ }
+ body div.vectorTabs li.selected.first {
+ background-image: url(images/tab-active-first.png);
+ background-repeat:no-repeat;
+ background-position:top left;
+ }
+ body div.vectorTabs li.selected.first a {
+ margin-left:7px;
+ padding-right:0.6em;
+ padding-left:0.4em;
+ border-left:none;
+ }
+ body div.vectorTabs li.selected.last {
+ background-image: url(images/tab-active-last.png);
+ background-repeat:no-repeat;
+ background-position:top right;
+ }
+ body div.vectorTabs li.selected.last a {
+ margin-right:7px;
+ padding-left:0.6em;
+ padding-right:0.4em;
+ border-right:none;
+ }
+
+ /* Variants and Actions */
+ /* @noflip */
+ div.vectorMenu {
+ background-image:url(images/tab-fade.png);
+ background-position:bottom left;
+ background-repeat:repeat-x;
+ border-top:1px solid #cccccc;
+ border-left:1px solid #cccccc;
+ border-right:1px solid #cccccc;
+ }
+ body.rtl div.vectorMenu {
+ direction: rtl;
+ }
+ /* @noflip */
+ body #mw-head div.vectorMenu h5 {
+ background-image: url(../images/arrow-down-icon.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ padding-left: 0;
+ margin-left: 0px;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ body div.vectorMenu h5 a {
+ display: inline-block;
+ width: 24px;
+ height:1.5em;
+ background-image: none !important;
+
+ }
+ /* IGNORED BY IE6 */
+ div.vectorMenu h5 > a {
+ display: block;
+ }
+ div.vectorMenu div.menu {
+ position: relative;
+ left:1px;
+ display: none;
+ clear: both;
+ text-align: left;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ body.rtl div.vectorMenu div.menu {
+ margin-right: 24px;
+ }
+ /* IGNORED BY IE6 */
+ body.rtl div.vectorMenu > div.menu {
+ margin-right: auto;
+ }
+ /* Fixes old versions of FireFox */
+ body.rtl div.vectorMenu > div.menu,
+ x:-moz-any-link {
+ margin-right: 24px;
+ }
+ div.vectorMenu:hover div.menu {
+ display: block;
+ }
+ div.vectorMenu ul {
+ position: absolute;
+ background-color: white;
+ border: solid 1px silver;
+ border-top-width: 0;
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ margin-left: -1px;
+ text-align: left;
+ }
+ /* Fixes old versions of FireFox */
+ div.vectorMenu ul,
+ x:-moz-any-link {
+ min-width: 5em;
+ }
+ /* Returns things back to normal in modern versions of FireFox */
+ div.vectorMenu ul,
+ x:-moz-any-link,
+ x:default {
+ min-width: 0;
+ }
+ div.vectorMenu li {
+ padding: 0;
+ margin: 0;
+ text-align: left;
+ line-height: 1em;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorMenu li a {
+ display: inline-block;
+ padding: 0.5em;
+ white-space: nowrap;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorMenu li > a {
+ display: block;
+ }
+ div.vectorMenu li a {
+ color: #0645ad;
+ cursor: pointer;
+ font-size: 0.8em;
+ }
+ div.vectorMenu li.selected a,
+ div.vectorMenu li.selected a:visited {
+ color: #333333;
+ text-decoration: none;
+ }
+#ca-unwatch.icon,
+#ca-watch.icon {
+ background-color:#ffffff;
+ height:1.75em !important;
+ background-image:url(images/tab-fade.png);
+ background-position:bottom left;
+ background-repeat:repeat-x;
+}
+#ca-unwatch.icon a,
+#ca-watch.icon a {
+ height: 1.7em !important;
+ border-bottom:none;
+ background-color:transparent;
+}
+#ca-watch.icon a,
+#ca-unwatch.icon a {
+ background-repeat:no-repeat;
+}
+.wikiEditor-ui-tabs {
+ border: none;
+ height: 2.15em;
+}
+.wikiEditor-ui-buttons {
+ height: 2.15em;
+}
+.wikiEditor-ui-tabs div {
+ border: 1px solid silver;
+ margin-right: 1px;
+ height: 2.15em;
+}
+.wikiEditor-ui-tabs div a {
+ line-height: 2.15em;
+ background: #FFFFFF url(images/tab-fade.png) repeat-x 0 100%;
+}
+.wikiEditor-ui-tabs div.current a {
+ background: #FFFFFF;
+}
--- /dev/null
+/*
+ * main-rtl.css is automatically generated using CSSJanus, a python script for
+ * creating RTL versions of otherwise LTR stylesheets.
+ *
+ * You may download the tool to rebuild this stylesheet
+ * http://code.google.com/p/cssjanus/
+ *
+ * An online version of this tool can be used at:
+ * http://cssjanus.commoner.com/
+ *
+ * The following command is used to generate the RTL version of this file
+ * ./cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css
+ *
+ * Any rules which should not be flipped should be prepended with @noflip in
+ * a comment block.
+ */
+/* Framework */
+html,
+body {
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+body {
+ /*background-color: #f3f3f3;*/
+ /*background-color: #b7c8b7;*/
+ /*background-image: url(images/page-base.png);*/
+
+ /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
+ /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
+ /* fallback (Opera) */
+ background: #b7c8b7;
+ /* Mozilla: */
+ background: -moz-linear-gradient(top, #b7c8b7, #e7f8e7);
+ /* Chrome, Safari:*/
+ background: -webkit-gradient(linear,
+ left top, left bottom, from(#b7c8b7), to(#e7f8e7));
+ /* MSIE */
+ filter: progid:DXImageTransform.Microsoft.Gradient(
+ StartColorStr='#b7c8b7', EndColorStr='#e7f8e7', GradientType=0);
+}
+
+/* Content */
+#content {
+ margin-left: 10em;
+ padding: 1em;
+ background-image: url(images/border.png);
+ background-position: top left;
+ background-repeat: repeat-y;
+ /* fallback (Opera) */
+ background: white;
+ /* Mozilla: */
+ background: -moz-linear-gradient(top, white, #c7b3cc);
+ /* Chrome, Safari:*/
+ background: -webkit-gradient(linear,
+ left top, left bottom, from(white), to(#c7b3cc));
+ /* MSIE */
+ filter: progid:DXImageTransform.Microsoft.Gradient(
+ StartColorStr='white', EndColorStr='#c7b3cc', GradientType=0);
+ /*background-color: white;*/
+}
+/* Head */
+#mw-page-base {
+ height: 5em;
+ /*background-color: grey;*/
+ background-image: url(images/page-fade.png);
+ opacity: 0.0;
+ background-position: bottom left;
+ background-repeat: repeat-x;
+}
+#mw-head-base {
+ margin-top: -5em;
+ margin-left: 10em;
+ height: 5em;
+ background-image: url(images/border.png);
+ background-position: bottom left;
+ background-repeat: repeat-x;
+}
+#mw-head {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 100%;
+}
+#mw-head h5 {
+ margin: 0;
+ padding: 0;
+}
+ /* Hide empty portlets */
+ div.emptyPortlet {
+ display: none;
+ }
+ /* Personal */
+ #p-personal {
+ position: absolute;
+ top: 0;
+ margin-left: 10em;
+ right: 0.75em;
+ }
+ #p-personal h5 {
+ display: none;
+ }
+ #p-personal ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ /* @noflip */
+ #p-personal li {
+ line-height: 1.125em;
+ float: left;
+ }
+ #p-personal li {
+ margin-left: 0.75em;
+ margin-top: 0.5em;
+ font-size: 0.75em;
+ }
+ /* Navigation Containers */
+ #left-navigation {
+ position: absolute;
+ left: 10em;
+ top: 2.5em;
+ }
+ #right-navigation {
+ float: right;
+ margin-top: 2.5em;
+ }
+ /* Navigation Labels */
+ div.vectorTabs h5,
+ div.vectorMenu h5 span {
+ display: none;
+ }
+ /* Namespaces and Views */
+ /* @noflip */
+ div.vectorTabs {
+ float: left;
+ }
+ div.vectorTabs {
+ background-image: url(images/tab-break.png);
+ background-position: bottom left;
+ background-repeat: no-repeat;
+ padding-left: 1px;
+ }
+ /* @noflip */
+ div.vectorTabs ul {
+ float: left;
+ }
+ div.vectorTabs ul {
+ height: 100%;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ /* @noflip */
+ div.vectorTabs ul li {
+ float: left;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorTabs ul li {
+ line-height: 1.125em;
+ display: inline-block;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+
+ /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
+ /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
+ /* fallback (Opera) */
+ background: #b7c8b7;
+ /* Mozilla: */
+ background: -moz-linear-gradient(top, #b7c8b7, #aaaaaa);
+ /* Chrome, Safari:*/
+ background: -webkit-gradient(linear,
+ left top, left bottom, from(#b7c8b7), to(#aaaaaa));
+ /* MSIE */
+ filter: progid:DXImageTransform.Microsoft.Gradient(
+ StartColorStr='#b7c8b7', EndColorStr='#aaaaaa', GradientType=0);
+
+ /*background-color: #f3f3f3;*/
+ /*background-color: #b7c8b7;*/
+ /*background-image: url(images/tab-normal-fade.png);*/
+ background-position: bottom left;
+ background-repeat: repeat-x;
+ white-space:nowrap;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorTabs ul > li {
+ display: block;
+ }
+ div.vectorTabs li.selected {
+
+ /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
+ /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
+ /* fallback (Opera) */
+ background: #b7c8b7;
+ /* Mozilla: */
+ background: -moz-linear-gradient(top, #b7c8b7, white);
+ /* Chrome, Safari:*/
+ background: -webkit-gradient(linear,
+ left top, left bottom, from(#b7c8b7), to(white));
+ /* MSIE */
+ filter: progid:DXImageTransform.Microsoft.Gradient(
+ StartColorStr='#b7c8b7', EndColorStr='white', GradientType=0);
+
+ /*background-image: url(images/tab-current-fade.png);*/
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorTabs li a {
+ display: inline-block;
+ height: 2.5em;
+ padding-left: 0.4em;
+ padding-right: 0.4em;
+ background-image: url(images/tab-break.png);
+ background-position: bottom right;
+ background-repeat: no-repeat;
+ }
+ div.vectorTabs li a,
+ div.vectorTabs li a span {
+ /*color: #0645ad;*/
+ color: #67536c;
+ cursor: pointer;
+ }
+ div.vectorTabs li a span {
+ font-size: 0.8em;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorTabs li > a {
+ display: block;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorTabs a span {
+ display: inline-block;
+ padding-top: 1.25em;
+ }
+ /* IGNORED BY IE6 */
+ /* @noflip */
+ div.vectorTabs a > span {
+ float: left;
+ display: block;
+ }
+ div.vectorTabs li.selected a,
+ div.vectorTabs li.selected a span,
+ div.vectorTabs li.selected a:visited
+ div.vectorTabs li.selected a:visited span {
+ color: #333333;
+ text-decoration: none;
+ }
+ div.vectorTabs li.new a,
+ div.vectorTabs li.new a span,
+ div.vectorTabs li.new a:visited,
+ div.vectorTabs li.new a:visited span {
+ color: #a55858;
+ }
+ /* Variants and Actions */
+ /* @noflip */
+ div.vectorMenu {
+ direction: ltr;
+ float: left;
+ background-image: url(images/arrow-down-icon.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ }
+ /* @noflip */
+ body.rtl div.vectorMenu {
+ direction: rtl;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ /* @noflip */
+ #mw-head div.vectorMenu h5 {
+ float: left;
+ background-image: url(images/tab-break.png);
+ background-repeat: no-repeat;
+ }
+ /* IGNORED BY IE6 */
+ #mw-head div.vectorMenu > h5 {
+ background-image: none;
+ }
+ #mw-head div.vectorMenu h5 {
+ background-position: bottom left;
+ margin-left: -1px;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ /* @noflip */
+ div.vectorMenu h5 a {
+ display: inline-block;
+ width: 24px;
+ height: 2.5em;
+ text-decoration: none;
+ background-image: url(images/tab-break.png);
+ background-repeat: no-repeat;
+ }
+ div.vectorMenu h5 a{
+ background-position: bottom right;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorMenu h5 > a {
+ display: block;
+ }
+ div.vectorMenu div.menu {
+ position: relative;
+ display: none;
+ clear: both;
+ text-align: left;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ /* @noflip */
+ body.rtl div.vectorMenu div.menu {
+ margin-left: 24px;
+ }
+ /* IGNORED BY IE6 */
+ /* @noflip */
+ body.rtl div.vectorMenu > div.menu {
+ margin-left: auto;
+ }
+ /* Fixes old versions of FireFox */
+ /* @noflip */
+ body.rtl div.vectorMenu > div.menu,
+ x:-moz-any-link {
+ margin-left: 23px;
+ }
+ div.vectorMenu:hover div.menu {
+ display: block;
+ }
+ div.vectorMenu ul {
+ position: absolute;
+
+ /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
+ /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
+ /* fallback (Opera) */
+ background: white;
+ /* Mozilla: */
+ background: -moz-linear-gradient(top, white, #b7c8b7);
+ /* Chrome, Safari:*/
+ background: -webkit-gradient(linear,
+ left top, left bottom, from(white), to(#b7c8b7));
+ /* MSIE */
+ filter: progid:DXImageTransform.Microsoft.Gradient(
+ StartColorStr='white', EndColorStr='#b7c8b7', GradientType=0);
+
+ /*background-color: white;*/
+ border: solid 1px silver;
+ border-top-width: 0;
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ margin-left: -1px;
+ text-align: left;
+ }
+ /* Fixes old versions of FireFox */
+ div.vectorMenu ul,
+ x:-moz-any-link {
+ min-width: 5em;
+ }
+ /* Returns things back to normal in modern versions of FireFox */
+ div.vectorMenu ul,
+ x:-moz-any-link,
+ x:default {
+ min-width: 0;
+ }
+ div.vectorMenu li {
+ padding: 0;
+ margin: 0;
+ text-align: left;
+ line-height: 1em;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorMenu li a {
+ display: inline-block;
+ padding: 0.5em;
+ white-space: nowrap;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorMenu li > a {
+ display: block;
+ }
+ div.vectorMenu li a {
+ color: #0645ad;
+ cursor: pointer;
+ font-size: 0.8em;
+ }
+ div.vectorMenu li.selected a,
+ div.vectorMenu li.selected a:visited {
+ color: #333333;
+ text-decoration: none;
+ }
+ /* Search */
+ #p-search h5 {
+ display: none;
+ }
+ /* @noflip */
+ #p-search {
+ float: left;
+ }
+ #p-search {
+ margin-right: 0.5em;
+ margin-left: 0.5em;
+ }
+ #p-search form,
+ #p-search input {
+ margin: 0;
+ margin-top: 0.4em;
+ }
+ #simpleSearch {
+ margin-top: 0.5em;
+ position: relative;
+ border: solid 1px #AAAAAA;
+ background-color: white;
+ background-image: url(images/search-fade.png);
+ background-position: top left;
+ background-repeat: repeat-x;
+ }
+ #simpleSearch label {
+ font-size: 0.8em;
+ top: 0.25em;
+ }
+ #simpleSearch input#searchInput {
+ margin: 0;
+ border-width: 0;
+ padding: 0.25em;
+ line-height: 1em;
+ font-size: 0.8em;
+ width: 9em;
+ background-color: transparent;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ #simpleSearch button#searchButton {
+ margin: 0;
+ padding: 0;
+ width: 1.75em;
+ height: 1.5em;
+ border: none;
+ cursor: pointer;
+ background-color: transparent;
+ background-image: url(images/search-ltr.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ }
+ /* IGNORED BY IE6 */
+ #simpleSearch > button#searchButton {
+ height: 100%;
+ }
+ .suggestions-special .special-label {
+ font-size: 0.8em;
+ color: gray;
+ }
+ .suggestions-special .special-query {
+ color: black;
+ font-style: italic;
+ }
+ .suggestions-special .special-hover {
+ background-color: silver;
+ }
+/* Panel */
+#mw-panel {
+ position: absolute;
+ top: 160px;
+ padding-top: 1em;
+ width: 10em;
+ left: 0;
+}
+ #mw-panel div.portal {
+ padding-bottom: 1.5em;
+ }
+ #mw-panel div.portal h5 {
+ font-weight: normal;
+ color: #444444;
+ padding: 0.25em;
+ padding-top: 0;
+ padding-left: 1.75em;
+ cursor: default;
+ border: none;
+ font-size: 0.75em;
+ }
+ #mw-panel div.portal div.body {
+ margin: 0;
+ padding-top: 0.5em;
+ margin-left: 1.25em;
+ background-image: url(images/portal-break.png);
+ background-repeat: no-repeat;
+ background-position: top left;
+ }
+ #mw-panel div.portal div.body ul {
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ }
+ #mw-panel div.portal div.body ul li {
+ line-height: 1.125em;
+ padding: 0;
+ padding-bottom: 0.5em;
+ margin: 0;
+ overflow: hidden;
+ font-size: 0.75em;
+ }
+ #mw-panel div.portal div.body ul li a {
+ color: #0645ad;
+ }
+ #mw-panel div.portal div.body ul li a:visited {
+ color: #0b0080;
+ }
+/* Footer */
+#footer {
+ margin-left: 10em;
+ margin-top: 0;
+ padding: 0.75em;
+ background-image: url(images/border.png);
+ background-position: top left;
+ background-repeat: repeat-x;
+}
+#footer ul {
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+#footer ul li {
+ margin: 0;
+ padding: 0;
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ color: #333333;
+ font-size: 0.7em;
+}
+#footer #footer-icons {
+ float: right;
+}
+/* @noflip */
+body.ltr #footer #footer-places {
+ float: left;
+}
+#footer #footer-info li {
+ line-height: 1.4em;
+}
+#footer #footer-icons li {
+ float: left;
+ margin-left: 0.5em;
+ line-height: 2em;
+}
+#footer #footer-places li {
+ float: left;
+ margin-right: 1em;
+ line-height: 2em;
+}
+/* Logo */
+#p-logo {
+ position: absolute;
+ top: -160px;
+ left: 0;
+ width: 10em;
+ height: 160px;
+}
+#p-logo a {
+ display: block;
+ width: 10em;
+ height: 160px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ text-decoration: none;
+}
+
+/*
+ *
+ * The following code is highly modified from monobook. It would be nice if the
+ * preftoc id was more human readable like preferences-toc for instance,
+ * howerver this would require backporting the other skins.
+ */
+
+/* Preferences */
+#preftoc {
+ /* Tabs */
+ width: 100%;
+ float: left;
+ clear: both;
+ margin: 0 !important;
+ padding: 0 !important;
+ background-image: url(images/preferences-break.png);
+ background-position: bottom left;
+ background-repeat: no-repeat;
+}
+ #preftoc li {
+ /* Tab */
+ float: left;
+ margin: 0;
+ padding: 0;
+ padding-right: 1px;
+ height: 2.25em;
+ white-space: nowrap;
+ list-style-type: none;
+ list-style-image: none;
+ background-image: url(images/preferences-break.png);
+ background-position: bottom right;
+ background-repeat: no-repeat;
+ }
+ /* IGNORED BY IE6 */
+ #preftoc li:first-child {
+ margin-left: 1px;
+ }
+ #preftoc a,
+ #preftoc a:active {
+ display: inline-block;
+ position: relative;
+ color: #0645ad;
+ padding: 0.5em;
+ text-decoration: none;
+ background-image: none;
+ font-size: 0.9em;
+ }
+ #preftoc a:hover {
+ text-decoration: underline;
+ }
+ #preftoc li.selected a {
+ background-image: url(images/preferences-fade.png);
+ background-position: bottom;
+ background-repeat: repeat-x;
+ color: #333333;
+ text-decoration: none;
+ }
+#preferences {
+ float: left;
+ width: 100%;
+ margin: 0;
+ margin-top: -2px;
+ clear: both;
+ border: solid 1px #cccccc;
+ background-color: #f9f9f9;
+ background-image: url(images/preferences-base.png);
+}
+#preferences fieldset.prefsection {
+ border: none;
+ padding: 0;
+ margin: 1em;
+}
+#preferences fieldset.prefsection fieldset {
+ border: none;
+ border-top: solid 1px #cccccc;
+}
+#preferences legend {
+ color: #666666;
+}
+#preferences fieldset.prefsection legend.mainLegend {
+ display: none;
+}
+#preferences td {
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+}
+#preferences td.htmlform-tip {
+ font-size: x-small;
+ padding: .2em 2em;
+ color: #666666;
+}
+#preferences div.mw-prefs-buttons {
+ padding: 1em;
+}
+#preferences div.mw-prefs-buttons input {
+ margin-right: 0.25em;
+}
+
+/*
+ * Styles for the user login and create account forms
+ */
+#userlogin, #userloginForm {
+ border: solid 1px #cccccc;
+ padding: 1.2em;
+ margin: .5em;
+ float: left;
+}
+
+#userlogin {
+ min-width: 20em;
+ max-width: 90%;
+ width: 40em;
+}
+
+/*
+ *
+ * The following code is slightly modified from monobook
+ *
+ */
+#content {
+ line-height: 1.5em;
+}
+#bodyContent {
+ font-size: 0.8em;
+}
+/* Links */
+a {
+ text-decoration: none;
+ color: #0645ad;
+ /*color: #67536c;*/
+ background: none;
+}
+a:visited {
+ color: #0b0080;
+}
+a:active {
+ color: #faa700;
+}
+a:hover {
+ text-decoration: underline;
+}
+a.stub {
+ color: #772233;
+}
+a.new, #p-personal a.new {
+ color: #ba0000;
+}
+a.new:visited, #p-personal a.new:visited {
+ color: #a55858;
+}
+
+/* Inline Elements */
+img {
+ border: none;
+ vertical-align: middle;
+}
+hr {
+ height: 1px;
+ color: #aaa;
+ background-color: #aaa;
+ border: 0;
+ margin: .2em 0 .2em 0;
+}
+
+/* Structural Elements */
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ /*color: black;*/
+ color: #67536c;
+ background: none;
+ font-weight: normal;
+ margin: 0;
+ padding-top: .5em;
+ padding-bottom: .17em;
+ border-bottom: 1px solid #aaa;
+ width: auto;
+}
+h1 { font-size: 188%; }
+h1 .editsection { font-size: 53%; }
+h2 { font-size: 150%; }
+h2 .editsection { font-size: 67%; }
+h3,
+h4,
+h5,
+h6 {
+ border-bottom: none;
+ font-weight: bold;
+}
+h3 { font-size: 132%; }
+h3 .editsection { font-size: 76%; font-weight: normal; }
+h4 { font-size: 116%; }
+h4 .editsection { font-size: 86%; font-weight: normal; }
+h5 { font-size: 100%; }
+h5 .editsection { font-weight: normal; }
+h6 { font-size: 80%; }
+h6 .editsection { font-size: 125%; font-weight: normal; }
+p {
+ margin: .4em 0 .5em 0;
+ line-height: 1.5em;
+}
+ p img {
+ margin: 0;
+ }
+abbr,
+acronym,
+.explain {
+ border-bottom: 1px dotted black;
+ color: black;
+ background: none;
+ cursor: help;
+}
+q {
+ font-family: Times, "Times New Roman", serif;
+ font-style: italic;
+}
+/* Disabled for now
+blockquote {
+ font-family: Times, "Times New Roman", serif;
+ font-style: italic;
+}*/
+code {
+ background-color: #f9f9f9;
+}
+pre {
+ padding: 1em;
+ border: 1px dashed #2f6fab;
+ color: black;
+ background-color: #f9f9f9;
+ line-height: 1.1em;
+}
+ul {
+ line-height: 1.5em;
+ list-style-type: square;
+ margin: .3em 0 0 1.5em;
+ padding: 0;
+ list-style-image: url(images/bullet-icon.png);
+}
+ol {
+ line-height: 1.5em;
+ margin: .3em 0 0 3.2em;
+ padding: 0;
+ list-style-image: none;
+}
+li {
+ margin-bottom: .1em;
+}
+dt {
+ font-weight: bold;
+ margin-bottom: .1em;
+}
+dl {
+ margin-top: .2em;
+ margin-bottom: .5em;
+}
+dd {
+ line-height: 1.5em;
+ margin-left: 2em;
+ margin-bottom: .1em;
+}
+/* Tables */
+table {
+ font-size: 100%;
+ color: black;
+ /* we don't want the bottom borders of <h2>s to be visible through
+ * floated tables */
+ background-color: white;
+}
+fieldset table {
+ /* but keep table layouts in forms clean... */
+ background: none;
+}
+/* Forms */
+fieldset {
+ border: 1px solid #2f6fab;
+ margin: 1em 0 1em 0;
+ padding: 0 1em 1em;
+ line-height: 1.5em;
+}
+ fieldset.nested {
+ margin: 0 0 0.5em 0;
+ padding: 0 0.5em 0.5em;
+ }
+legend {
+ padding: .5em;
+ font-size: 95%;
+}
+form {
+ border: none;
+ margin: 0;
+}
+textarea {
+ width: 100%;
+ padding: .1em;
+}
+select {
+ vertical-align: top;
+}
+/* Table of Contents */
+#toc,
+.toc,
+.mw-warning {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ font-size: 95%;
+}
+#toc h2,
+.toc h2 {
+ display: inline;
+ border: none;
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
+}
+#toc #toctitle,
+.toc #toctitle,
+#toc .toctitle,
+.toc .toctitle {
+ text-align: center;
+}
+#toc ul,
+.toc ul {
+ list-style-type: none;
+ list-style-image: none;
+ margin-left: 0;
+ padding-left: 0;
+ text-align: left;
+}
+#toc ul ul,
+.toc ul ul {
+ margin: 0 0 0 2em;
+}
+#toc .toctoggle,
+.toc .toctoggle {
+ font-size: 94%;
+}
+/* Images */
+div.floatright, table.floatright {
+ clear: right;
+ float: right;
+ position: relative;
+ margin: 0 0 .5em .5em;
+ border: 0;
+}
+div.floatright p { font-style: italic; }
+div.floatleft, table.floatleft {
+ float: left;
+ clear: left;
+ position: relative;
+ margin: 0 .5em .5em 0;
+ border: 0;
+}
+div.floatleft p { font-style: italic; }
+/* Thumbnails */
+div.thumb {
+ margin-bottom: .5em;
+ border-style: solid;
+ border-color: white;
+ width: auto;
+ background-color: transparent;
+}
+div.thumbinner {
+ border: 1px solid #cccccc;
+ padding: 3px !important;
+ background-color: #f9f9f9;
+ font-size: 94%;
+ text-align: center;
+ overflow: hidden;
+}
+html .thumbimage {
+ border: 1px solid #ccc;
+}
+html .thumbcaption {
+ border: none;
+ text-align: left;
+ line-height: 1.4em;
+ padding: 3px !important;
+ font-size: 94%;
+}
+div.magnify {
+ float: right;
+ border: none !important;
+ background: none !important;
+}
+div.magnify a, div.magnify img {
+ display: block;
+ border: none !important;
+ background: none !important;
+}
+div.tright {
+ clear: right;
+ float: right;
+ border-width: .5em 0 .8em 1.4em;
+}
+div.tleft {
+ float: left;
+ clear: left;
+ margin-right: .5em;
+ border-width: .5em 1.4em .8em 0;
+}
+img.thumbborder {
+ border: 1px solid #dddddd;
+}
+.hiddenStructure {
+ display: none;
+}
+/* Warning */
+.mw-warning {
+ margin-left: 50px;
+ margin-right: 50px;
+ text-align: center;
+}
+/* User Message */
+.usermessage {
+ background-color: #ffce7b;
+ border: 1px solid #ffa500;
+ color: black;
+ font-weight: bold;
+ margin: 2em 0 1em;
+ padding: .5em 1em;
+ vertical-align: middle;
+}
+/* Site Notice */
+#siteNotice {
+ text-align: center;
+ font-size: 0.8em;
+ margin: 0;
+}
+ #siteNotice div,
+ #siteNotice p {
+ margin: 0;
+ padding: 0;
+ margin-bottom: 0.9em;
+ }
+/* Categories */
+.catlinks {
+ border: 1px solid #888;
+ background-color: #cccccc;
+ padding: 5px;
+ margin-top: 1em;
+ clear: both;
+}
+/* Sub-navigation */
+#siteSub {
+ display: none;
+}
+#jump-to-nav {
+ display: none;
+}
+#contentSub, #contentSub2 {
+ font-size: 84%;
+ line-height: 1.2em;
+ margin: 0 0 1.4em 1em;
+ color: #7d7d7d;
+ width: auto;
+}
+span.subpages {
+ display: block;
+}
+/* Emulate Center */
+.center {
+ width: 100%;
+ text-align: center;
+}
+*.center * {
+ margin-left: auto;
+ margin-right: auto;
+}
+/* Small for tables and similar */
+.small, .small * {
+ font-size: 94%;
+}
+table.small {
+ font-size: 100%;
+}
+/* Edge Cases for Content */
+h1, h2 {
+ margin-bottom: .6em;
+}
+h3, h4, h5 {
+ margin-bottom: .3em;
+}
+#firstHeading {
+ padding-top: 0;
+ margin-top: 0;
+ padding-top: 0;
+ margin-bottom: 0.1em;
+ line-height: 1.2em;
+ font-size: 1.6em;
+ padding-bottom: 0;
+}
+#content a.external,
+#content a[href ^="gopher://"] {
+ background: url(images/external-link-ltr-icon.png) center right no-repeat;
+ padding: 0 13px 0 0;
+}
+#content a[href ^="https://"],
+.link-https {
+ background: url(images/lock-icon.png) center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a[href ^="mailto:"],
+.link-mailto {
+ background: url(images/mail-icon.png) center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a[href ^="news://"] {
+ background: url(images/news-icon.png) center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a[href ^="ftp://"],
+.link-ftp {
+ background: url(images/file-icon.png) center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a[href ^="irc://"],
+#content a.extiw[href ^="irc://"],
+.link-irc {
+ background: url(images/talk-icon.png) center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a.external[href $=".ogg"], #content a.external[href $=".OGG"],
+#content a.external[href $=".mid"], #content a.external[href $=".MID"],
+#content a.external[href $=".midi"], #content a.external[href $=".MIDI"],
+#content a.external[href $=".mp3"], #content a.external[href $=".MP3"],
+#content a.external[href $=".wav"], #content a.external[href $=".WAV"],
+#content a.external[href $=".wma"], #content a.external[href $=".WMA"],
+.link-audio {
+ background: url("images/audio-icon.png") center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a.external[href $=".ogm"], #content a.external[href $=".OGM"],
+#content a.external[href $=".avi"], #content a.external[href $=".AVI"],
+#content a.external[href $=".mpeg"], #content a.external[href $=".MPEG"],
+#content a.external[href $=".mpg"], #content a.external[href $=".MPG"],
+.link-video {
+ background: url("images/video-icon.png") center right no-repeat;
+ padding: 0 18px 0 0;
+}
+#content a.external[href $=".pdf"], #content a.external[href $=".PDF"],
+#content a.external[href *=".pdf#"], #content a.external[href *=".PDF#"],
+#content a.external[href *=".pdf?"], #content a.external[href *=".PDF?"],
+.link-document {
+ background: url("images/document-icon.png") center right no-repeat;
+ padding: 0 18px 0 0;
+}
+/* Interwiki Styling (Disabled) */
+#content a.extiw,
+#content a.extiw:active {
+ color: #36b;
+ background: none;
+ padding: 0;
+}
+#content a.external {
+ color: #36b;
+}
+#content .printfooter {
+ display: none;
+}
+/* Icon for Usernames */
+#pt-userpage,
+#pt-anonuserpage,
+#pt-login {
+ background: url(images/user-icon.png) left top no-repeat;
+ padding-left: 15px !important;
+ text-transform: none;
+}
+
+.toccolours {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ font-size: 95%;
+}
+#bodyContent {
+ position: relative;
+ width: 100%;
+}
+#mw-js-message {
+ font-size: 0.8em;
+}
+div#bodyContent {
+ line-height: 1.5em;
+}
+
+/* Watch/Unwatch Icon Styling */
+#ca-unwatch.icon,
+#ca-watch.icon {
+ margin-right:1px;
+}
+#ca-unwatch.icon a,
+#ca-watch.icon a {
+ margin: 0;
+ padding: 0;
+ outline: none;
+ display: block;
+ width: 26px;
+ height: 2.5em;
+}
+#ca-unwatch.icon a {
+ background-image: url(images/watch-icons.png);
+ background-position: -43px 60%;
+}
+#ca-watch.icon a {
+ background-image: url(images/watch-icons.png);
+ background-position: 5px 60%;
+}
+#ca-unwatch.icon a:hover {
+ background-image: url(images/watch-icons.png);
+ background-position: -67px 60%;
+}
+#ca-watch.icon a:hover {
+ background-image: url(images/watch-icons.png);
+ background-position: -19px 60%;
+}
+#ca-unwatch.icon a.loading,
+#ca-watch.icon a.loading {
+ background-image: url(images/watch-icon-loading.gif);
+ background-position: center 60%;
+}
+#ca-unwatch.icon a span,
+#ca-watch.icon a span {
+ display: none;
+}
+div.vectorTabs ul {
+ background-image:url(images/tab-break.png);
+ background-position:right bottom;
+ background-repeat:no-repeat;
+}
--- /dev/null
+/*
+ * main-rtl.css is automatically generated using CSSJanus, a python script for
+ * creating RTL versions of otherwise LTR stylesheets.
+ *
+ * You may download the tool to rebuild this stylesheet
+ * http://code.google.com/p/cssjanus/
+ *
+ * An online version of this tool can be used at:
+ * http://cssjanus.commoner.com/
+ *
+ * The following command is used to generate the RTL version of this file
+ * ./cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css
+ *
+ * Any rules which should not be flipped should be prepended with @noflip in
+ * a comment block.
+ */
+/* Framework */
+html,
+body {
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+body {
+ background-color: #f3f3f3;
+ background-image: url(images/page-base.png);
+}
+/* Content */
+#content {
+ margin-right: 10em;
+ padding: 1em;
+ background-image: url(images/border.png);
+ background-position: top right;
+ background-repeat: repeat-y;
+ background-color: white;
+}
+/* Head */
+#mw-page-base {
+ height: 5em;
+ background-color: white;
+ background-image: url(images/page-fade.png);
+ background-position: bottom right;
+ background-repeat: repeat-x;
+}
+#mw-head-base {
+ margin-top: -5em;
+ margin-right: 10em;
+ height: 5em;
+ background-image: url(images/border.png);
+ background-position: bottom right;
+ background-repeat: repeat-x;
+}
+#mw-head {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+}
+#mw-head h5 {
+ margin: 0;
+ padding: 0;
+}
+ /* Hide empty portlets */
+ div.emptyPortlet {
+ display: none;
+ }
+ /* Personal */
+ #p-personal {
+ position: absolute;
+ top: 0;
+ margin-right: 10em;
+ left: 0.75em;
+ }
+ #p-personal h5 {
+ display: none;
+ }
+ #p-personal ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ /* @noflip */
+ #p-personal li {
+ line-height: 1.125em;
+ float: left;
+ }
+ #p-personal li {
+ margin-right: 0.75em;
+ margin-top: 0.5em;
+ font-size: 0.75em;
+ }
+ /* Navigation Containers */
+ #left-navigation {
+ position: absolute;
+ right: 10em;
+ top: 2.5em;
+ }
+ #right-navigation {
+ float: left;
+ margin-top: 2.5em;
+ }
+ /* Navigation Labels */
+ div.vectorTabs h5,
+ div.vectorMenu h5 span {
+ display: none;
+ }
+ /* Namespaces and Views */
+ /* @noflip */
+ div.vectorTabs {
+ float: left;
+ }
+ div.vectorTabs {
+ background-image: url(images/tab-break.png);
+ background-position: bottom right;
+ background-repeat: no-repeat;
+ padding-right: 1px;
+ }
+ /* @noflip */
+ div.vectorTabs ul {
+ float: left;
+ }
+ div.vectorTabs ul {
+ height: 100%;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ /* @noflip */
+ div.vectorTabs ul li {
+ float: left;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorTabs ul li {
+ line-height: 1.125em;
+ display: inline-block;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ background-color: #f3f3f3;
+ background-image: url(images/tab-normal-fade.png);
+ background-position: bottom right;
+ background-repeat: repeat-x;
+ white-space:nowrap;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorTabs ul > li {
+ display: block;
+ }
+ div.vectorTabs li.selected {
+ background-image: url(images/tab-current-fade.png);
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorTabs li a {
+ display: inline-block;
+ height: 2.5em;
+ padding-right: 0.4em;
+ padding-left: 0.4em;
+ background-image: url(images/tab-break.png);
+ background-position: bottom left;
+ background-repeat: no-repeat;
+ }
+ div.vectorTabs li a,
+ div.vectorTabs li a span {
+ color: #0645ad;
+ cursor: pointer;
+ }
+ div.vectorTabs li a span {
+ font-size: 0.8em;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorTabs li > a {
+ display: block;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorTabs a span {
+ display: inline-block;
+ padding-top: 1.25em;
+ }
+ /* IGNORED BY IE6 */
+ /* @noflip */
+ div.vectorTabs a > span {
+ float: left;
+ display: block;
+ }
+ div.vectorTabs li.selected a,
+ div.vectorTabs li.selected a span,
+ div.vectorTabs li.selected a:visited
+ div.vectorTabs li.selected a:visited span {
+ color: #333333;
+ text-decoration: none;
+ }
+ div.vectorTabs li.new a,
+ div.vectorTabs li.new a span,
+ div.vectorTabs li.new a:visited,
+ div.vectorTabs li.new a:visited span {
+ color: #a55858;
+ }
+ /* Variants and Actions */
+ /* @noflip */
+ div.vectorMenu {
+ direction: ltr;
+ float: left;
+ background-image: url(images/arrow-down-icon.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ }
+ /* @noflip */
+ body.rtl div.vectorMenu {
+ direction: rtl;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ /* @noflip */
+ #mw-head div.vectorMenu h5 {
+ float: left;
+ background-image: url(images/tab-break.png);
+ background-repeat: no-repeat;
+ }
+ /* IGNORED BY IE6 */
+ #mw-head div.vectorMenu > h5 {
+ background-image: none;
+ }
+ #mw-head div.vectorMenu h5 {
+ background-position: bottom right;
+ margin-right: -1px;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ /* @noflip */
+ div.vectorMenu h5 a {
+ display: inline-block;
+ width: 24px;
+ height: 2.5em;
+ text-decoration: none;
+ background-image: url(images/tab-break.png);
+ background-repeat: no-repeat;
+ }
+ div.vectorMenu h5 a{
+ background-position: bottom left;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorMenu h5 > a {
+ display: block;
+ }
+ div.vectorMenu div.menu {
+ position: relative;
+ display: none;
+ clear: both;
+ text-align: right;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ /* @noflip */
+ body.rtl div.vectorMenu div.menu {
+ margin-left: 24px;
+ }
+ /* IGNORED BY IE6 */
+ /* @noflip */
+ body.rtl div.vectorMenu > div.menu {
+ margin-left: auto;
+ }
+ /* Fixes old versions of FireFox */
+ /* @noflip */
+ body.rtl div.vectorMenu > div.menu,
+ x:-moz-any-link {
+ margin-left: 23px;
+ }
+ div.vectorMenu:hover div.menu {
+ display: block;
+ }
+ div.vectorMenu ul {
+ position: absolute;
+ background-color: white;
+ border: solid 1px silver;
+ border-top-width: 0;
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ margin-right: -1px;
+ text-align: right;
+ }
+ /* Fixes old versions of FireFox */
+ div.vectorMenu ul,
+ x:-moz-any-link {
+ min-width: 5em;
+ }
+ /* Returns things back to normal in modern versions of FireFox */
+ div.vectorMenu ul,
+ x:-moz-any-link,
+ x:default {
+ min-width: 0;
+ }
+ div.vectorMenu li {
+ padding: 0;
+ margin: 0;
+ text-align: right;
+ line-height: 1em;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ div.vectorMenu li a {
+ display: inline-block;
+ padding: 0.5em;
+ white-space: nowrap;
+ }
+ /* IGNORED BY IE6 */
+ div.vectorMenu li > a {
+ display: block;
+ }
+ div.vectorMenu li a {
+ color: #0645ad;
+ cursor: pointer;
+ font-size: 0.8em;
+ }
+ div.vectorMenu li.selected a,
+ div.vectorMenu li.selected a:visited {
+ color: #333333;
+ text-decoration: none;
+ }
+ /* Search */
+ #p-search h5 {
+ display: none;
+ }
+ /* @noflip */
+ #p-search {
+ float: left;
+ }
+ #p-search {
+ margin-left: 0.5em;
+ margin-right: 0.5em;
+ }
+ #p-search form,
+ #p-search input {
+ margin: 0;
+ margin-top: 0.4em;
+ }
+ #simpleSearch {
+ margin-top: 0.5em;
+ position: relative;
+ border: solid 1px #AAAAAA;
+ background-color: white;
+ background-image: url(images/search-fade.png);
+ background-position: top right;
+ background-repeat: repeat-x;
+ }
+ #simpleSearch label {
+ font-size: 0.8em;
+ top: 0.25em;
+ }
+ #simpleSearch input#searchInput {
+ margin: 0;
+ border-width: 0;
+ padding: 0.25em;
+ line-height: 1em;
+ font-size: 0.8em;
+ width: 9em;
+ background-color: transparent;
+ }
+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
+ #simpleSearch button#searchButton {
+ margin: 0;
+ padding: 0;
+ width: 1.75em;
+ height: 1.5em;
+ border: none;
+ cursor: pointer;
+ background-color: transparent;
+ background-image: url(images/search-rtl.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ }
+ /* IGNORED BY IE6 */
+ #simpleSearch > button#searchButton {
+ height: 100%;
+ }
+ .suggestions-special .special-label {
+ font-size: 0.8em;
+ color: gray;
+ }
+ .suggestions-special .special-query {
+ color: black;
+ font-style: italic;
+ }
+ .suggestions-special .special-hover {
+ background-color: silver;
+ }
+/* Panel */
+#mw-panel {
+ position: absolute;
+ top: 160px;
+ padding-top: 1em;
+ width: 10em;
+ right: 0;
+}
+ #mw-panel div.portal {
+ padding-bottom: 1.5em;
+ }
+ #mw-panel div.portal h5 {
+ font-weight: normal;
+ color: #444444;
+ padding: 0.25em;
+ padding-top: 0;
+ padding-right: 1.75em;
+ cursor: default;
+ border: none;
+ font-size: 0.75em;
+ }
+ #mw-panel div.portal div.body {
+ margin: 0;
+ padding-top: 0.5em;
+ margin-right: 1.25em;
+ background-image: url(images/portal-break.png);
+ background-repeat: no-repeat;
+ background-position: top right;
+ }
+ #mw-panel div.portal div.body ul {
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ }
+ #mw-panel div.portal div.body ul li {
+ line-height: 1.125em;
+ padding: 0;
+ padding-bottom: 0.5em;
+ margin: 0;
+ overflow: hidden;
+ font-size: 0.75em;
+ }
+ #mw-panel div.portal div.body ul li a {
+ color: #0645ad;
+ }
+ #mw-panel div.portal div.body ul li a:visited {
+ color: #0b0080;
+ }
+/* Footer */
+#footer {
+ margin-right: 10em;
+ margin-top: 0;
+ padding: 0.75em;
+ background-image: url(images/border.png);
+ background-position: top right;
+ background-repeat: repeat-x;
+}
+#footer ul {
+ list-style: none;
+ list-style-image: none;
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+#footer ul li {
+ margin: 0;
+ padding: 0;
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ color: #333333;
+ font-size: 0.7em;
+}
+#footer #footer-icons {
+ float: left;
+}
+/* @noflip */
+body.ltr #footer #footer-places {
+ float: left;
+}
+#footer #footer-info li {
+ line-height: 1.4em;
+}
+#footer #footer-icons li {
+ float: right;
+ margin-right: 0.5em;
+ line-height: 2em;
+}
+#footer #footer-places li {
+ float: right;
+ margin-left: 1em;
+ line-height: 2em;
+}
+/* Logo */
+#p-logo {
+ position: absolute;
+ top: -160px;
+ right: 0;
+ width: 10em;
+ height: 160px;
+}
+#p-logo a {
+ display: block;
+ width: 10em;
+ height: 160px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ text-decoration: none;
+}
+
+/*
+ *
+ * The following code is highly modified from monobook. It would be nice if the
+ * preftoc id was more human readable like preferences-toc for instance,
+ * howerver this would require backporting the other skins.
+ */
+
+/* Preferences */
+#preftoc {
+ /* Tabs */
+ width: 100%;
+ float: right;
+ clear: both;
+ margin: 0 !important;
+ padding: 0 !important;
+ background-image: url(images/preferences-break.png);
+ background-position: bottom right;
+ background-repeat: no-repeat;
+}
+ #preftoc li {
+ /* Tab */
+ float: right;
+ margin: 0;
+ padding: 0;
+ padding-left: 1px;
+ height: 2.25em;
+ white-space: nowrap;
+ list-style-type: none;
+ list-style-image: none;
+ background-image: url(images/preferences-break.png);
+ background-position: bottom left;
+ background-repeat: no-repeat;
+ }
+ /* IGNORED BY IE6 */
+ #preftoc li:first-child {
+ margin-right: 1px;
+ }
+ #preftoc a,
+ #preftoc a:active {
+ display: inline-block;
+ position: relative;
+ color: #0645ad;
+ padding: 0.5em;
+ text-decoration: none;
+ background-image: none;
+ font-size: 0.9em;
+ }
+ #preftoc a:hover {
+ text-decoration: underline;
+ }
+ #preftoc li.selected a {
+ background-image: url(images/preferences-fade.png);
+ background-position: bottom;
+ background-repeat: repeat-x;
+ color: #333333;
+ text-decoration: none;
+ }
+#preferences {
+ float: right;
+ width: 100%;
+ margin: 0;
+ margin-top: -2px;
+ clear: both;
+ border: solid 1px #cccccc;
+ background-color: #f9f9f9;
+ background-image: url(images/preferences-base.png);
+}
+#preferences fieldset.prefsection {
+ border: none;
+ padding: 0;
+ margin: 1em;
+}
+#preferences fieldset.prefsection fieldset {
+ border: none;
+ border-top: solid 1px #cccccc;
+}
+#preferences legend {
+ color: #666666;
+}
+#preferences fieldset.prefsection legend.mainLegend {
+ display: none;
+}
+#preferences td {
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+}
+#preferences td.htmlform-tip {
+ font-size: x-small;
+ padding: .2em 2em;
+ color: #666666;
+}
+#preferences div.mw-prefs-buttons {
+ padding: 1em;
+}
+#preferences div.mw-prefs-buttons input {
+ margin-left: 0.25em;
+}
+
+/*
+ * Styles for the user login and create account forms
+ */
+#userlogin, #userloginForm {
+ border: solid 1px #cccccc;
+ padding: 1.2em;
+ margin: .5em;
+ float: right;
+}
+
+#userlogin {
+ min-width: 20em;
+ max-width: 90%;
+ width: 40em;
+}
+
+/*
+ *
+ * The following code is slightly modified from monobook
+ *
+ */
+#content {
+ line-height: 1.5em;
+}
+#bodyContent {
+ font-size: 0.8em;
+}
+/* Links */
+a {
+ text-decoration: none;
+ color: #0645ad;
+ background: none;
+}
+a:visited {
+ color: #0b0080;
+}
+a:active {
+ color: #faa700;
+}
+a:hover {
+ text-decoration: underline;
+}
+a.stub {
+ color: #772233;
+}
+a.new, #p-personal a.new {
+ color: #ba0000;
+}
+a.new:visited, #p-personal a.new:visited {
+ color: #a55858;
+}
+
+/* Inline Elements */
+img {
+ border: none;
+ vertical-align: middle;
+}
+hr {
+ height: 1px;
+ color: #aaa;
+ background-color: #aaa;
+ border: 0;
+ margin: .2em 0 .2em 0;
+}
+
+/* Structural Elements */
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ color: black;
+ background: none;
+ font-weight: normal;
+ margin: 0;
+ padding-top: .5em;
+ padding-bottom: .17em;
+ border-bottom: 1px solid #aaa;
+ width: auto;
+}
+h1 { font-size: 188%; }
+h1 .editsection { font-size: 53%; }
+h2 { font-size: 150%; }
+h2 .editsection { font-size: 67%; }
+h3,
+h4,
+h5,
+h6 {
+ border-bottom: none;
+ font-weight: bold;
+}
+h3 { font-size: 132%; }
+h3 .editsection { font-size: 76%; font-weight: normal; }
+h4 { font-size: 116%; }
+h4 .editsection { font-size: 86%; font-weight: normal; }
+h5 { font-size: 100%; }
+h5 .editsection { font-weight: normal; }
+h6 { font-size: 80%; }
+h6 .editsection { font-size: 125%; font-weight: normal; }
+p {
+ margin: .4em 0 .5em 0;
+ line-height: 1.5em;
+}
+ p img {
+ margin: 0;
+ }
+abbr,
+acronym,
+.explain {
+ border-bottom: 1px dotted black;
+ color: black;
+ background: none;
+ cursor: help;
+}
+q {
+ font-family: Times, "Times New Roman", serif;
+ font-style: italic;
+}
+/* Disabled for now
+blockquote {
+ font-family: Times, "Times New Roman", serif;
+ font-style: italic;
+}*/
+code {
+ background-color: #f9f9f9;
+}
+pre {
+ padding: 1em;
+ border: 1px dashed #2f6fab;
+ color: black;
+ background-color: #f9f9f9;
+ line-height: 1.1em;
+}
+ul {
+ line-height: 1.5em;
+ list-style-type: square;
+ margin: .3em 1.5em 0 0;
+ padding: 0;
+ list-style-image: url(images/bullet-icon.png);
+}
+ol {
+ line-height: 1.5em;
+ margin: .3em 3.2em 0 0;
+ padding: 0;
+ list-style-image: none;
+}
+li {
+ margin-bottom: .1em;
+}
+dt {
+ font-weight: bold;
+ margin-bottom: .1em;
+}
+dl {
+ margin-top: .2em;
+ margin-bottom: .5em;
+}
+dd {
+ line-height: 1.5em;
+ margin-right: 2em;
+ margin-bottom: .1em;
+}
+/* Tables */
+table {
+ font-size: 100%;
+ color: black;
+ /* we don't want the bottom borders of <h2>s to be visible through
+ * floated tables */
+ background-color: white;
+}
+fieldset table {
+ /* but keep table layouts in forms clean... */
+ background: none;
+}
+/* Forms */
+fieldset {
+ border: 1px solid #2f6fab;
+ margin: 1em 0 1em 0;
+ padding: 0 1em 1em;
+ line-height: 1.5em;
+}
+ fieldset.nested {
+ margin: 0 0 0.5em 0;
+ padding: 0 0.5em 0.5em;
+ }
+legend {
+ padding: .5em;
+ font-size: 95%;
+}
+form {
+ border: none;
+ margin: 0;
+}
+textarea {
+ width: 100%;
+ padding: .1em;
+}
+select {
+ vertical-align: top;
+}
+/* Table of Contents */
+#toc,
+.toc,
+.mw-warning {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ font-size: 95%;
+}
+#toc h2,
+.toc h2 {
+ display: inline;
+ border: none;
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
+}
+#toc #toctitle,
+.toc #toctitle,
+#toc .toctitle,
+.toc .toctitle {
+ text-align: center;
+}
+#toc ul,
+.toc ul {
+ list-style-type: none;
+ list-style-image: none;
+ margin-right: 0;
+ padding-right: 0;
+ text-align: right;
+}
+#toc ul ul,
+.toc ul ul {
+ margin: 0 2em 0 0;
+}
+#toc .toctoggle,
+.toc .toctoggle {
+ font-size: 94%;
+}
+/* Images */
+div.floatright, table.floatright {
+ clear: left;
+ float: left;
+ position: relative;
+ margin: 0 .5em .5em 0;
+ border: 0;
+}
+div.floatright p { font-style: italic; }
+div.floatleft, table.floatleft {
+ float: right;
+ clear: right;
+ position: relative;
+ margin: 0 0 .5em .5em;
+ border: 0;
+}
+div.floatleft p { font-style: italic; }
+/* Thumbnails */
+div.thumb {
+ margin-bottom: .5em;
+ border-style: solid;
+ border-color: white;
+ width: auto;
+ background-color: transparent;
+}
+div.thumbinner {
+ border: 1px solid #ccc;
+ padding: 3px !important;
+ background-color: #f9f9f9;
+ font-size: 94%;
+ text-align: center;
+ overflow: hidden;
+}
+html .thumbimage {
+ border: 1px solid #ccc;
+}
+html .thumbcaption {
+ border: none;
+ text-align: right;
+ line-height: 1.4em;
+ padding: 3px !important;
+ font-size: 94%;
+}
+div.magnify {
+ float: left;
+ border: none !important;
+ background: none !important;
+}
+div.magnify a, div.magnify img {
+ display: block;
+ border: none !important;
+ background: none !important;
+}
+div.tright {
+ clear: left;
+ float: left;
+ border-width: .5em 1.4em .8em 0;
+}
+div.tleft {
+ float: right;
+ clear: right;
+ margin-left: .5em;
+ border-width: .5em 0 .8em 1.4em;
+}
+img.thumbborder {
+ border: 1px solid #dddddd;
+}
+.hiddenStructure {
+ display: none;
+}
+/* Warning */
+.mw-warning {
+ margin-right: 50px;
+ margin-left: 50px;
+ text-align: center;
+}
+/* User Message */
+.usermessage {
+ background-color: #ffce7b;
+ border: 1px solid #ffa500;
+ color: black;
+ font-weight: bold;
+ margin: 2em 0 1em;
+ padding: .5em 1em;
+ vertical-align: middle;
+}
+/* Site Notice */
+#siteNotice {
+ text-align: center;
+ font-size: 0.8em;
+ margin: 0;
+}
+ #siteNotice div,
+ #siteNotice p {
+ margin: 0;
+ padding: 0;
+ margin-bottom: 0.9em;
+ }
+/* Categories */
+.catlinks {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ margin-top: 1em;
+ clear: both;
+}
+/* Sub-navigation */
+#siteSub {
+ display: none;
+}
+#jump-to-nav {
+ display: none;
+}
+#contentSub, #contentSub2 {
+ font-size: 84%;
+ line-height: 1.2em;
+ margin: 0 1em 1.4em 0;
+ color: #7d7d7d;
+ width: auto;
+}
+span.subpages {
+ display: block;
+}
+/* Emulate Center */
+.center {
+ width: 100%;
+ text-align: center;
+}
+*.center * {
+ margin-right: auto;
+ margin-left: auto;
+}
+/* Small for tables and similar */
+.small, .small * {
+ font-size: 94%;
+}
+table.small {
+ font-size: 100%;
+}
+/* Edge Cases for Content */
+h1, h2 {
+ margin-bottom: .6em;
+}
+h3, h4, h5 {
+ margin-bottom: .3em;
+}
+#firstHeading {
+ padding-top: 0;
+ margin-top: 0;
+ padding-top: 0;
+ margin-bottom: 0.1em;
+ line-height: 1.2em;
+ font-size: 1.6em;
+ padding-bottom: 0;
+}
+#content a.external,
+#content a[href ^="gopher://"] {
+ background: url(images/external-link-rtl-icon.png) center left no-repeat;
+ padding: 0 0 0 13px;
+}
+#content a[href ^="https://"],
+.link-https {
+ background: url(images/lock-icon.png) center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a[href ^="mailto:"],
+.link-mailto {
+ background: url(images/mail-icon.png) center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a[href ^="news://"] {
+ background: url(images/news-icon.png) center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a[href ^="ftp://"],
+.link-ftp {
+ background: url(images/file-icon.png) center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a[href ^="irc://"],
+#content a.extiw[href ^="irc://"],
+.link-irc {
+ background: url(images/talk-icon.png) center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a.external[href $=".ogg"], #content a.external[href $=".OGG"],
+#content a.external[href $=".mid"], #content a.external[href $=".MID"],
+#content a.external[href $=".midi"], #content a.external[href $=".MIDI"],
+#content a.external[href $=".mp3"], #content a.external[href $=".MP3"],
+#content a.external[href $=".wav"], #content a.external[href $=".WAV"],
+#content a.external[href $=".wma"], #content a.external[href $=".WMA"],
+.link-audio {
+ background: url("images/audio-icon.png") center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a.external[href $=".ogm"], #content a.external[href $=".OGM"],
+#content a.external[href $=".avi"], #content a.external[href $=".AVI"],
+#content a.external[href $=".mpeg"], #content a.external[href $=".MPEG"],
+#content a.external[href $=".mpg"], #content a.external[href $=".MPG"],
+.link-video {
+ background: url("images/video-icon.png") center left no-repeat;
+ padding: 0 0 0 18px;
+}
+#content a.external[href $=".pdf"], #content a.external[href $=".PDF"],
+#content a.external[href *=".pdf#"], #content a.external[href *=".PDF#"],
+#content a.external[href *=".pdf?"], #content a.external[href *=".PDF?"],
+.link-document {
+ background: url("images/document-icon.png") center left no-repeat;
+ padding: 0 0 0 18px;
+}
+/* Interwiki Styling (Disabled) */
+#content a.extiw,
+#content a.extiw:active {
+ color: #36b;
+ background: none;
+ padding: 0;
+}
+#content a.external {
+ color: #36b;
+}
+#content .printfooter {
+ display: none;
+}
+/* Icon for Usernames */
+#pt-userpage,
+#pt-anonuserpage,
+#pt-login {
+ background: url(images/user-icon.png) right top no-repeat;
+ padding-right: 15px !important;
+ text-transform: none;
+}
+
+.toccolours {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ font-size: 95%;
+}
+#bodyContent {
+ position: relative;
+ width: 100%;
+}
+#mw-js-message {
+ font-size: 0.8em;
+}
+div#bodyContent {
+ line-height: 1.5em;
+}
+
+/* Watch/Unwatch Icon Styling */
+#ca-unwatch.icon,
+#ca-watch.icon {
+ margin-left:1px;
+}
+#ca-unwatch.icon a,
+#ca-watch.icon a {
+ margin: 0;
+ padding: 0;
+ outline: none;
+ display: block;
+ width: 26px;
+ height: 2.5em;
+}
+#ca-unwatch.icon a {
+ background-image: url(images/watch-icons.png);
+ background-position: -43px 60%;
+}
+#ca-watch.icon a {
+ background-image: url(images/watch-icons.png);
+ background-position: 5px 60%;
+}
+#ca-unwatch.icon a:hover {
+ background-image: url(images/watch-icons.png);
+ background-position: -67px 60%;
+}
+#ca-watch.icon a:hover {
+ background-image: url(images/watch-icons.png);
+ background-position: -19px 60%;
+}
+#ca-unwatch.icon a.loading,
+#ca-watch.icon a.loading {
+ background-image: url(images/watch-icon-loading.gif);
+ background-position: center 60%;
+}
+#ca-unwatch.icon a span,
+#ca-watch.icon a span {
+ display: none;
+}
+div.vectorTabs ul {
+ background-image:url(images/tab-break.png);
+ background-position:left bottom;
+ background-repeat:no-repeat;
+}
--- /dev/null
+<noinclude>
+This is the "Annotation" template.
+It should be called in the following format:
+<pre>
+{{Annotation
+|Species Name=
+|Species ID=
+|Gene Symbol=
+|Gene Name=
+|Gene Locus=
+|Gene Type=
+|EC Number(s)=
+|Chromosome=
+|Has Phenotype=
+|Annotation Description=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>__NOTOC__
+<font size=6 color="#67536c">'''[[Has Gene Symbol::{{{Gene Symbol|}}}]] (''[[Has Species Name::{{{Species Name|}}}]]'')'''</font>
+
+{{#get_web_data:
+ |url=http://eutils.ncbi.nlm.nih.gov/entrez/eutils//esearch.fcgi?db=taxonomy&term={{{Species Name|}}}
+ |format=XML
+ |data=species_id=id
+}}
+{{#set:Has Species ID={{#external_value:species_id}} }}
+
+= Annotation =
+
+{| class="wikitable"
+! Species Name
+| [[Has Species Name::{{{Species Name|}}}]]
+|-
+! Species ID
+| NCBI:[[Has Species ID::{{#external_value:species_id}}]]
+|-
+! Gene Symbol
+| [[Has Gene Symbol::{{{Gene Symbol|}}}]]
+|-
+! Gene Name
+| [[Has Gene Name::{{{Gene Name|}}}]]
+|-
+! Gene Synonyms
+| {{#if: {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}}]]
+ | ?is_Gene_Synonym
+ | headers=hide
+ | mainlabel=-
+ | format=list
+ }}
+ | None available
+}}
+|-
+! Gene Locus
+| [[Has Gene Locus::{{{Gene Locus|}}}]]
+|-
+! Gene Type
+| [[Has Gene Type::{{{Gene Type|}}}]]
+|-
+! EC number(s)
+| {{#arraymap:{{{EC Numbers|}}}|,|x|[[Has EC Numbers::x]]}}
+|-
+! Chromosome
+| [[Exists On Chromosome Number::{{{Chromosome|}}}]]
+|-
+! Has Phenotype?
+| [[Has Phenotype::{{{Has Phenotype|}}}]]
+|}
+
+{| class="wikitable"
+! Description
+| [[Has Annotation Description::{{{Annotation Description|}}}]]
+|}
+
+{{#ifexist: {{PAGENAME}}/Provenance
+ | To review the provenance of this data, click [[{{PAGENAME}}/Provenance|here]].
+ |
+}}
+
+= External References =
+
+{{#if: {{#ask:[[Category:External_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | {{#ask:[[Is External Reference::~{{PAGENAME}}/External_References]]
+ | mainlabel=-
+ |? from_External_Source
+ |? has_External_Accession_ID
+ }}
+ | There are no external references available for this annotation.
+}}
+
+= Ontologies =
+
+{{#if: {{#ask:[[Category:Ontological_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | {{#ask:[[Is Ontological Reference::~{{PAGENAME}}/Ontologies]]
+ | mainlabel=-
+ |? from_Ontology
+ |? has_Term_ID
+ |? has_Term_Name
+ |? has_Aspect
+ |? has_Evidence_Code
+ |? has_Evidence
+ }}
+ | There are no ontological associations available for this gene annotation.
+}}
+
+= Sequences =
+
+{{#if: {{#ask:[[Category:Sequences]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
+ | {{#ask:[[Is Sequence Reference::~{{PAGENAME}}/Sequences]]
+ | mainlabel=-
+ |? has_Sequence_Type
+ |? has_Sequence_Source
+ |? has_External_Accession_ID
+ }}
+ | There is no sequence data available for this gene annotation.
+}}
+
+= Literature =
+
+{{#if: {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] }}
+ | {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]]
+ |? has First Author
+ |? has Publication Title
+ |? has Journal Name
+ |? has Publication ID
+ }}
+ | There are no publications associated with this annotation.
+}}
+<headertabs/>
+[[Category:Annotations]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "External Reference Repeater" template.
+It should be called in the following format:
+<pre>
+{{External Reference Repeater
+|External Source=
+|External Accession ID=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{{#set_internal:is_External_Reference
+|from_External_Source={{{External Source|}}}
+|has_External_Accession_ID={{{External Accession ID|}}}
+}}
+
+{| class="wikitable"
+! Source
+| [[From External Source::{{{External Source|}}}]]
+|-
+! Accession ID
+| [[Has External Accession ID::{{{External Accession ID|}}}]]
+|}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "External References" template.
+It should be called in the following format:
+<pre>
+{{External References
+|Annotation Page=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Annotation Page
+| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
+|}
+
+[[Category:External References]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Gene Ontology Reference Repeater" template.
+It should be called in the following format:
+<pre>
+{{Gene Ontology Reference Repeater
+|Term ID=
+|Term Name=
+|Aspect=
+|Evidence Code=
+|Evidence=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{{#get_web_data:
+ |url=http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&field={{#if:{{{Term Name|}}}|name|acc}}&type=term_detail&ontology=go&qval={{#if:{{{Term Name|}}}|{{{Term Name|}}}|{{{Term ID|}}}}}&format=json
+ |format=JSON
+ |data=term_name=name,term_id=id,term_aspect=aspect,term_definition=definition,term_comment=comment
+}}
+{{#set_internal:is_Ontological_Reference
+|from_Ontology=Gene Ontology
+|has_Term_ID={{#external_value:term_id}}
+|has_Term_Name={{#external_value:term_name}}
+|has_Aspect={{#external_value:term_aspect}}
+|has_Evidence_Code#list={{{Evidence Code|}}}
+|has_Evidence#list={{{Evidence|}}}
+}}
+{| class="wikitable"
+! Ontology
+| Gene Ontology
+|-
+! Term Name
+| [[Has Term Name::{{#external_value:term_name}}]]
+|-
+! Term ID
+| [[Has Term ID::{{#external_value:term_id}}]]
+|-
+! Branch
+| {{#external_value:term_aspect}}
+|-
+! Definition
+| {{#external_value:term_definition}}
+{{#if: {{#external_value:term_comment}}
+ | {{!}}-
+! Comment
+{{!}} {{#external_value:term_comment}}
+ |
+}}
+|-
+! Evidence Code
+| {{#arraymap:{{{Evidence Code|}}}|,|x|[[Has Evidence Code::x]]}}
+|-
+! Evidence
+| {{#arraymap:{{{Evidence|}}}|,|x|[[Has Evidence::x]]}}
+|}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Gene Synonym Repeater" template.
+It should be called in the following format:
+<pre>
+{{Gene Synonym Repeater
+|Gene Synonym=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{| class="wikitable"
+! Gene Synonym
+| [[Is Gene Synonym::{{{Gene Synonym|}}}]]
+|}<nowiki/></includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Gene Synonyms" template.
+It should be called in the following format:
+<pre>
+{{Gene Synonyms
+|Annotation Page=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Annotation Page
+| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
+|-
+! Gene Name
+| {{#show: {{{Annotation Page|}}}|?has_Gene_Name}}
+|}
+
+[[Category:Gene Synonyms]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Ontological Reference Repeater" template.
+It should be called in the following format:
+<pre>
+{{Ontological Reference Repeater
+|Ontology=
+|Term ID=
+|Term Name=
+|Aspect=
+|Evidence Code=
+|Evidence=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{{#set_internal:is_Ontological_Reference
+|from_Ontology={{{Ontology|}}}
+|has_Term_ID={{{Term ID|}}}
+|has_Term_Name={{{Term Name|}}}
+|has_Aspect={{{Aspect|}}}
+|has_Evidence_Code#list={{{Evidence Code|}}}
+|has_Evidence#list={{{Evidence|}}}
+}}
+{| class="wikitable"
+! Ontology
+| [[From Ontology::{{{Ontology|}}}]]
+|-
+! Term Name
+| [[Has Term Name::{{{Term Name|}}}]]
+|-
+! Term ID
+| [[Has Term ID::{{{Term ID|}}}]]
+|-
+! Branch
+| [[Has Aspect::{{{Aspect|}}}]]
+|-
+! Evidence Code
+| {{#arraymap:{{{Evidence Code|}}}|,|x|[[Has Evidence Code::x]]}}
+|-
+! Evidence
+| {{#arraymap:{{{Evidence|}}}|,|x|[[Has Evidence::x]]}}
+|}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Ontological References" template.
+It should be called in the following format:
+<pre>
+{{Ontological References
+|Annotation Page=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Annotation Page
+| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
+|}
+
+[[Category:Ontological References]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Plant Ontology Reference Repeater" template.
+It should be called in the following format:
+<pre>
+{{Plant Ontology Reference Repeater
+|Term ID=
+|Term Name=
+|Aspect=
+|Evidence Code=
+|Evidence=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{{#get_web_data:
+ |url=http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&field={{#if:{{{Term Name|}}}|name|acc}}&type=term_detail&ontology=po&qval={{#if:{{{Term Name|}}}|{{{Term Name|}}}|{{{Term ID|}}}}}&format=json
+ |format=JSON
+ |data=term_name=name,term_id=id,term_aspect=aspect,term_definition=definition,term_comment=comment
+}}
+{{#set_internal:is_Ontological_Reference
+|from_Ontology=Plant Ontology
+|has_Term_ID={{#external_value:term_id}}
+|has_Term_Name={{#external_value:term_name}}
+|has_Aspect={{#external_value:term_aspect}}
+|has_Evidence_Code#list={{{Evidence Code|}}}
+|has_Evidence#list={{{Evidence|}}}
+}}
+[[Has Term Search Type::{{{Term Search Type|}}}]]
+{| class="wikitable"
+! Ontology
+| Plant Ontology
+|-
+! Term Name
+| [[Has Term Name::{{#external_value:term_name}}]]
+|-
+! Term ID
+| [[Has Term ID::{{#external_value:term_id}}]]
+|-
+! Branch
+| [[Has Aspect::{{#external_value:term_aspect}}]]
+|-
+! Definition
+| {{#external_value:term_definition}}
+{{#if: {{#external_value:term_comment}}
+ | {{!}}-
+! Comment
+{{!}} {{#external_value:term_comment}}
+ |
+}}
+|-
+! Evidence Code
+| {{#arraymap:{{{Evidence Code|}}}|,|x|[[Has Evidence Code::x]]}}
+|-
+! Evidence
+| {{#arraymap:{{{Evidence|}}}|,|x|[[Has Evidence::x]]}}
+|}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Provenance" template.
+It should be called in the following format:
+<pre>
+{{Provenance
+|Annotation Page=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Annotation
+| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
+|}
+
+[[Category:Provenance]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Provenance Repeater" template.
+It should be called in the following format:
+<pre>
+{{Provenance Repeater
+|Source=
+|Source Accession ID=
+|Source Category=
+|Source Field or Object=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{{#set_internal:is_Provenance
+|has_Source={{{Source|}}}
+|has_Source_Accession_ID={{{Source Accession ID|}}}
+|is_Associated_With_Field_Or_Object={{{Source Field or Object|}}}
+|is_Associated_With_Category={{{Source Category|}}} }}
+
+{| class="wikitable"
+! Source
+| [[Has Source::{{{Source|}}}]]
+|-
+! Accession ID
+| [[Has Source Accession ID::{{{Source Accession ID|}}}]]
+|-
+! Field
+| [[Is Associated With Field Or Object::{{{Source Field or Object|}}}]] (''Category'': {{{Source Category|}}})
+|}<nowiki/></includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Publication" template.
+It should be called in the following format:
+<pre>
+{{Publication
+|Publication=
+|Publication ID=
+|Publication Title=
+|First Author=
+|Journal Name=
+|Volume=
+|Year=
+|Pages=
+|Annotation References=
+|New Annotation Reference=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Publication
+| [[Has Publication Type::{{{Publication|}}}]]
+|-
+! Publication Identifier
+| [[Has Publication ID::{{{Publication ID|}}}]]
+|-
+! Publication Title
+| [[Has Publication Title::{{{Publication Title|}}}]]
+|-
+! First Author
+| [[Has First Author::{{{First Author|}}}]]
+|-
+! Journal Name
+| [[Has Journal Name::{{{Journal Name|}}}]]
+|-
+! Volume
+| [[Has Publication Volume::{{{Volume|}}}]]
+|-
+! Year
+| [[Has Publication Year::{{{Year|}}}]]
+|-
+! Pages
+| [[Has Publication Pages::{{{Pages|}}}]]
+|-
+! Annotation References
+| {{#arraymap:{{{Annotation References|}}}|,|x|[[Is Associated With Annotations::x]]}}
+|-
+! New Annotation Reference (to be hidden)
+| [[Has New Annotation Association::{{{New Annotation Reference|}}}]]
+|}
+
+[[Category:Publications]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Reference Publication" template.
+It should be called in the following format:
+<pre>
+{{Reference Publication
+|Publication=
+|Publication ID=
+|Publication Title=
+|First Author=
+|Journal Name=
+|Volume=
+|Year=
+|Pages=
+|Annotation References=
+|New Annotation Reference=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+
+{{#get_web_data:
+url=http://dev.planteome.org/w/services/NCBI_eDocSummary.php?pub_id={{{Publication ID|}}}
+|format=XML
+|data=pub_id=Id,year=PubDate,first_author=LastAuthor,journal_name=FullJournalName,title=Title,volume=Volume,pages=Pages
+}}
+
+{| class="wikitable"
+! Publication Catalogue
+| [[Has Publication Type::{{{Publication|}}}]]
+|-
+! Publication Identifier
+| [[Has Publication ID::{{{Publication ID|}}}]]
+|-
+! Publication Title
+| [[Has Publication Title::{{#for_external_table:{{{title}}} }}]]
+|-
+! First Author
+| [[Has First Author::{{#for_external_table:{{{first_author}}} }}]]
+|-
+! Journal Name
+| [[Has Journal Name::{{#for_external_table:{{{journal_name}}} }}]]
+|-
+! Volume
+| [[Has Publication Volume::{{#for_external_table:{{{volume}}} }}]]
+|-
+! Year
+| [[Has Publication Year::{{#for_external_table:{{{year}}} }}]]
+|-
+! Pages
+| [[Has Publication Pages::{{#for_external_table:{{{pages}}} }}]]
+|-
+! Annotation References
+| {{#arraymap:{{{Annotation References|}}}|,|x|[[Is Associated With Annotations::x]]}}
+|}
+
+<!--[[Has New Annotation Association::{{{New Annotation Reference|}}}]]-->
+
+[[Category:Reference Publications]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Sequence Repeater" template.
+It should be called in the following format:
+<pre>
+{{Sequence Repeater
+|Sequence Type=
+|Sequence Source=
+|External Accession ID=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>{{#set_internal:is_Sequence_Reference
+|has_Sequence_Type={{{Sequence Type}}}
+|has_Sequence_Source={{{Sequence Source|}}}
+|has_External_Accession_ID={{{External Accession ID|}}}
+}}
+{| class="wikitable"
+! Sequence Type
+| [[Has Sequence Type::{{{Sequence Type|}}}]]
+|-
+! Sequence Source
+| [[Has Sequence Source::{{{Sequence Source|}}}]]
+|-
+! Accession ID
+| [[Has External Accession ID::{{{External Accession ID|}}}]]
+|}
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Sequences" template.
+It should be called in the following format:
+<pre>
+{{Sequences
+|Annotation Page=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Annotation Page
+| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
+|}
+
+[[Category:Sequences]]
+</includeonly>
+
--- /dev/null
+<noinclude>
+This is the "Source" template.
+It should be called in the following format:
+<pre>
+{{Source
+|Source Date Stamp=
+|Source Database=
+|Source Version=
+|Source URI=
+|Source File=
+}}
+</pre>
+Edit the page to see the template text.
+</noinclude><includeonly>
+{| class="wikitable"
+! Release Date
+| [[Has Date Stamp::{{{Source Date Stamp|}}}]]
+|-
+! Data Source
+| [[Has Source Database::{{{Source Database|}}}]]
+|-
+! Version
+| [[Has Source Version::{{{Source Version|}}}]]
+|-
+! Web Address
+| [[From Source URI::{{{Source URI|}}}]]
+|-
+! File
+| [[From Source File::{{{Source File|}}}]]
+|}
+
+[[Category:Sources]]
+</includeonly>
+
+++ /dev/null
-#!usr/bin/perl -w
-use strict;
-
-system 'clear';
-
-# determine mapped ChEBI molecules listed in arabidopsis but not in rice,
-# and vice-versa
-
-my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/ara_rice_exclusive_sets/";
-my @rice;
-my @ara;
-
-open(IN_FILE, $dir . "Rice_ReferenceNameToChEBIId.txt") or die;
-while (<IN_FILE>) {
- my $line = $_;
- chomp $line;
- push(@rice,$line);
-}
-close IN_FILE;
-
-open(IN_FILE, $dir . "Ara_ReferenceNameToChEBIId.txt") or die;
-while (<IN_FILE>) {
- my $line = $_;
- chomp $line;
- push(@ara,$line);
-}
-close IN_FILE;
-
-my %ara_seen; # lookup tbl
-my @rice_only; #exclusive to rice
-
-# build lookup tbl
-@ara_seen{@ara} = ();
-
-foreach my $item (@rice) {
- push(@rice_only, $item) unless exists $ara_seen{$item};
-}
-
-my %rice_seen; # lookup tbl
-my @ara_only; #exclusive to rice
-
-# build lookup tbl
-@rice_seen{@rice} = ();
-
-foreach my $item (@ara) {
- push(@ara_only, $item) unless exists $rice_seen{$item};
-}
-
-my $exc_rice_count = 0;
-print "-- [EXCLUSIVE RICE MOLECULES] --\n";
-foreach my $item (@rice_only) {
- $exc_rice_count++;
- print "$exc_rice_count: $item\n";
-}
-
-#print "$exc_rice_count\n\n";
-
-my $exc_ara_count = 0;
-print "-- [EXCLUSIVE ARABIDOPSIS MOLECULES] --\n";
-foreach my $item (@ara_only) {
- $exc_ara_count++;
- print "$exc_ara_count: $item\n";
-}
-
-print "$exc_ara_count\n\n";
-
-# clean up
-exit;
+++ /dev/null
-#!usr/bin/perl -w
-use strict;
-
-system 'clear';
-
-# temp script used to fix <bp:AUTHORS> elements that mistakenly refer to years in
-# parentheses. replaces those elements with <bp:YEAR>.
-
-my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/aracyc_data/";
-
-open(in_file, $dir . "aracyc_v8_0_biopax-level2_STOIdouble.owl");
-open(out_file, ">>" . $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR.owl");
-
-my $i = 0; # limiter for testing
-
-while (<in_file>)
-{
- $i++;
-
- # read the next line of the file
- my $line = $_;
- chomp $line;
-
- # is it a bad author?
- if ($line =~ /<bp:AUTHORS rdf:datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">\(/)
- {
- print "$i: $line\n";
- # change the line to a well-formatted year tag
- $line =~ s/AUTHORS/YEAR/g;
- $line =~ s/\(//;
- $line =~ s/\)//;
- $line =~ s/string/int/;
- print "$i: $line\n";
- }
- print out_file "$line\n";
-
- #last if $i > 1000; # let's test w/ low numbers for now
-}
-
-close in_file;
-close out_file;
-
-# clean up
-exit;
+++ /dev/null
-#!usr/bin/perl -w
-use strict;
-
-system 'clear';
-
-# temp script used to fix <bp:STEP-INTERACTION> elements that mistakenly refer to years in
-# parentheses. replaces those elements with <bp:YEAR>.
-# Example:
-# BEFORE: <bp:STEP-INTERACTIONS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">catalysis42055</bp:STEP-INTERACTIONS>
-# AFTER: <bp:STEP-INTERACTIONS rdf:resource="#catalysis42055"/>
-
-my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/aracyc_data/";
-
-open(in_file, $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR.owl");
-open(out_file, ">>" . $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR_STEPINT.owl");
-
-my $i = 0; # limiter for testing
-
-while (<in_file>)
-{
- $i++;
-
- # read the next line of the file
- my $line = $_;
- chomp $line;
-
- # is it a bad step interaction?
- if ($line =~ /<bp:STEP-INTERACTIONS rdf:datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">/)
- {
- print "$i: $line\n";
- # change the line to a well-formatted STEP-INTERACTION tag
- $line =~ s/datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">/resource="\#/g;
- $line =~ s/<\/bp:STEP-INTERACTIONS>/"\/>/;
- print "$i: $line\n";
- }
- print out_file "$line\n";
-
- #last if $i > 1000; # let's test w/ low numbers for now
-}
-
-close in_file;
-close out_file;
-
-# clean up
-exit;
+++ /dev/null
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-Pathway Gene Swapper
-
-=head1 VERSION
-
-0.2
-
-=head1 DESCRIPTION
-
-Swap out one set of genes (or gene representations) for another in an
-existing PathVisio GPML file. Optionally removes literature references.
-
-If multiple replacement genes map to a single original gene,
-multiple PathVisio boxes will be drawn in place of the
-original.
-
-If a group associating multiple gene boxes already existed,
-that group will extend to any replacement genes. If no group
-existed previously, and multiple replacement gene boxes are required,
-a new group will be created.
-
-If an original gene had multiple instances (homologs) displayed on the pathway
-diagram, each instance will be subjected to the replacement process. There
-is a "heat-map" option avaliable to help highlight homolog sets.
-
-There is also an option to read in an extra column of gene symbols, if the
-user wishes to provide their own. Otherwise, the application will
-continue to use the label prefix and auto-numbering suffix settings.
-
-The replacement gene symbols can be prefixed to separate them from the
-original, and an ordinal suffix ('-#') will be added to a group of
-replacement genes.
-
-Any new gene boxes may be painted with a custom color and border, and
-will be stacked and offset for ease of visualization (much like a deck
-of cards).
-
-=head1 FUTURE CHANGES
-
-Add a legend for the heat map (upper right-hand corner).
-
-Add a comment containing the NCBI species id of the new homolog (for
-the purpose of multi-species pathway comparison or host-pathogen
-interaction diagrams).
-
-=head1 USAGE
-
-pathway_gene_swapper.pl -i INPUT_FILE -g GENE_MAPPING_FILE -c CONFIG_FILE -o OUTPUT_FILE [-shLvGd]
-
-=head1 OPTIONS
-
- -i Name of input GPML file.
- -g CSV file containing the genes to swap
- -c config file containing color, label, and placement preferences
- -o Name of output GPML file.
- (NOTE: if no path supplied for input files,
- current working directory is assumed)
- -s use provided gene symbols instead of config file's LabelPrefix
- -h apply a heat-map to any multi-mapped set of homologs
- (NOTE: precludes custom box-coloring for homologs)
- -L Remove literature references.
- -v View verbose information
- -G Display GPML input/output documents
- -d View debugging information
-
-=head1 DEPENDENCIES and PREREQUISITES
-
- - Non-standard Perl modules: Switch, Data::Dumper, XML::DOM
- - The input file must be a valid GPML file
- - The CSV file must have a single-line column header.
-
- The first column must have one and only one gene -- the
- "original" gene.
-
- The second column may have one and only one gene variant or
- homolog -- the "replacement" gene(s).
-
- An optional "gene symbol" column may be placed between the
- first two columns, if the user would prefer to use a list of
- symbols for the new homologous genes.
-
- - The config file may have any or all of the following entries,
- in addition to the required fields (in any order):
-
- Source= (required)
- Database= (required)
- Version= (required)
- Title=
- Author=
- Maintainer=
- Organism=
- CommentPrefix= (will precede back-reference to prior source,
- default: "Previously labeled as: ")
- LabelPrefix= (precedes current gene label)
- BoxBorder= (RRGGBB hex, default: black)
- BoxColor= (RRGGBB hex, default: white)
- BoxWidth= (integer, in px, default: 60)
- X-Offset= (integer, in px, default: 5px)
- Y-Offset= (integer, in px, default: 4px)
-
-=head1 AUTHORS
-
-Justin Preece and Mamatha Hanumappa
- Faculty Research Assistants
- Jaiswal Lab, Botany & Plant Pathology
- Oregon State University
- L<mailto:preecej@science.oregonstate.edu>
- L<mailto:hanumapm@science.oregonstate.edu>
-
-=cut
-
-# ---------------------------------------------------------------------------
-# modules
-# ---------------------------------------------------------------------------
-
-# general
-use strict;
-use Cwd;
-use Switch;
-use Getopt::Std;
-use Data::Dumper;
-
-# specific
-use Graphics::ColorUtils qw( :gradients );
-use XML::DOM;
-
-# ---------------------------------------------------------------------------
-# declarations
-# ---------------------------------------------------------------------------
-
-# command-line options
-my %opts; # arg options
-my $input_gpml_file;
-my $input_gene_file;
-my $input_config_file;
-my $output_file;
-my $apply_homolog_heat = 0;
-my $remove_lit = 0; # flag to remove literature and lit references
-my $use_symbols = 0; # flag to indicate use of provided gene symbols
-my $verbose = 0; # flag for verbose output
-my $doc_mode = 0; # flag for extra GPML doc output
-my $debug = 0; # debugging switch
-
-# global data containers
-my %configs; # configuration settings
-my %swap_genes; # original and swapped genes
-my $gpml_doc; # imported GPML data for manipulation and output
-my %unmapped_genes; # original genes not mapped to homologs
-my %gradient; # blue-red gradient used for opt. heat map box-coloring
-my $max_homolog_count = 0; # count for heat map calibration
-
-$Data::Dumper::Pad = "... ";
-
-# ---------------------------------------------------------------------------
-=head1 FUNCTIONS
-
-=over
-
-=cut
-# ---------------------------------------------------------------------------
-
-
-# ---------------------------------------------------------------------------
-=item B<hash config($file_path)>
-Accepts a config file path.
-Reads a configuration file and sets config values.
-Returns a hash with config values set.
-=cut
-# ---------------------------------------------------------------------------
-sub config($)
-{
-
- print "Opening configuration file and reading data...\n\n";
- my %local_config_hash;
-
- open(CONFIG_FILE, $_[0]) or die("Could not open $_[0]");
-
- while (<CONFIG_FILE>)
- {
- my $line = $_;
- chomp $line;
- my @line_ary = split('=',$line);
- my $data_field = $line_ary[0];
- my $data_val = $line_ary[1];
-
- if ($data_val)
- {
- $local_config_hash{$data_field} = $data_val;
- }
- }
-
- close(CONFIG_FILE);
-
- # check for required settings
- if (!$local_config_hash{"Source"}) {
- die("You are required to provide a Source for your new data.\n"
- . "Run \"perldoc pathway_gene_swapper.pl\" for more information.\n\n"); }
- if (!$local_config_hash{"Database"}) {
- die("You are required to identify a Database for your new data.\n"
- . "Run \"perldoc pathway_gene_swapper.pl\" for more information.\n\n"); }
- if (!$local_config_hash{"Version"}) {
- die("You are required to provide a Version idenifier for your new data.\n"
- . "Run \"perldoc pathway_gene_swapper.pl\" for more information.\n\n"); }
-
- # set defaults, if none declared
- if (!$local_config_hash{"CommentPrefix"}) {
- $local_config_hash{"CommentPrefix"} = "Previously labeled as: ";
- }
- if (!$local_config_hash{"BoxWidth"}) {
- $local_config_hash{"BoxWidth"} = 60;
- }
- if (!$local_config_hash{"X-Offset"}) {
- $local_config_hash{"X-Offset"} = 4;
- }
- if (!$local_config_hash{"Y-Offset"}) {
- $local_config_hash{"Y-Offset"} = 3;
- }
-
- return %local_config_hash;
-}
-
-
-# ---------------------------------------------------------------------------
-=item B<void init()>
-Reads in command-line values, calls for config settings, and begins
-screen output.
-=cut
-# ---------------------------------------------------------------------------
-sub init
-{
- # read and set options
- getopts('i:g:c:o:hLsvGd', \%opts);
-
- foreach my $key (keys %opts) {
- my $value = $opts{$key};
- switch ($key) {
- case "i" {
- if ($value =~ /\//) { # assume path
- $input_gpml_file = $value;
- } else {
- $input_gpml_file = getcwd() . "\/$value";
- }
- }
- case "g" {
- if ($value =~ /\//) { # assume path
- $input_gene_file = $value;
- } else {
- $input_gene_file = getcwd() . "\/$value";
- }
- }
- case "c" {
- if ($value =~ /\//) { # assume path
- $input_config_file = $value;
- } else {
- $input_config_file = getcwd() . "\/$value";
- }
- }
- case "o" {
- if ($value =~ /\//) { # assume path
- $output_file = $value;
- } else {
- $output_file = getcwd() . "\/$value";
- }
- }
- case "s" { $use_symbols = 1; }
- case "h" { $apply_homolog_heat = 1; }
- case "L" { $remove_lit = 1; }
- case "v" { $verbose = 1; }
- case "G" { $doc_mode = 1; }
- case "d" { $debug = 1; }
- }
- }
-
- system "clear";
- print "\n"
- . "------------------------------------------------------------\n"
- . "------------------ Pathway Gene Swapper --------------------\n"
- . "------------------------------------------------------------\n"
- . "\n"
- . "Input Files:\n"
- . " - PathVisio File (GPML): $input_gpml_file\n"
- . " - Gene List (CSV): $input_gene_file\n"
- . " - Configuration settings: $input_config_file\n"
- . "\n"
- . "Output File: $output_file\n"
- . "\n"
- . "Use provided gene symbols? " . ($use_symbols ? "Yes" : "No") . "\n"
- . "Provide homolog heat-map? " . ($apply_homolog_heat ? "Yes" : "No") . "\n"
- . "Remove literature references? " . ($remove_lit ? "Yes" : "No") . "\n"
- . "Running in verbose mode? " . ($verbose ? "Yes" : "No") . "\n"
- . "Running in document mode? " . ($doc_mode ? "Yes" : "No") . "\n"
- . "Running in debug mode? " . ($debug ? "Yes" : "No") . "\n"
- . "\n"
- . "------------------------------------------------------------\n"
- . "------------------------------------------------------------\n"
- . "------------------------------------------------------------\n"
- . "\n";
-
- %configs = config($input_config_file);
-}
-
-
-# ---------------------------------------------------------------------------
-=item B<hash set_gradient(int $max_homolog_count)>
-Accepts: The maximum number of homologs for one gene in this data set
-Creates a blue-red gradient and stores it in a hash.
-Returns: A hash of RRGGBB color values, keyed to the number set of
-possible homologs (1..n).
-=cut
-# ---------------------------------------------------------------------------
-sub set_gradient($)
-{
- my @blue_red_array;
-
- for (my $i=0; $i<256; $i++) {
- push @blue_red_array, [$i, 0, (255-$i)];
- }
-
- register_gradient("blue_red",\@blue_red_array);
-
- my %blue_red_gradient;
- my $max_grad = $_[0];
- my $inc = sprintf("%.2f", 1/$max_grad);
- my $count = 1;
-
- for (my $i=$inc; $i<=0.99; $i=$i+$inc) {
- my $tmp_hex = grad2rgb("blue_red",$i);
- $tmp_hex =~ s/\#//;
- $blue_red_gradient{$count} = $tmp_hex;
- $count++;
- }
-
- return %blue_red_gradient;
-}
-
-
-# ---------------------------------------------------------------------------
-=item B<void import_data()>
-Reads, parses, and stores gene mapping file and source GPML.
-=cut
-# ---------------------------------------------------------------------------
-sub import_data
-{
- print "Opening gene mapping file and reading data...\n\n";
-
- open(GENE_FILE, $input_gene_file) or die("Could not open $input_gene_file");
-
- # used to generate total counts of each species' gene list; sanity check
- my $original_gene_count = 0;
- my $replacement_homolog_count = 0;
-
- my $orig_data_item;
- my $new_symbol = "";
- my $new_data_item;
-
- # ignore header
- my $line = <GENE_FILE>;
-
- while (<GENE_FILE>)
- {
- $line = $_;
- chomp $line;
- my @line_ary = split(',',$line);
- my $orig_data_item = $line_ary[0];
-
- if ($use_symbols) {
- if (scalar(@line_ary) != 3) {
- die("If you specify that your gene-mapping file includes "
- . "symbols, then your CSV input file must have three "
- . "columns of data (in this order): "
- . "old gene, new symbol, new gene\n");
- }
- $new_symbol = $line_ary[1];
- $new_data_item = $line_ary[2];
- }
- else
- {
- $new_data_item = $line_ary[1];
- }
-
- #Does ath_gene exist?
- if (!exists $swap_genes{$orig_data_item})
- {
- $original_gene_count++;
- }
- $replacement_homolog_count++; # count this every time
-
- # add new gene to hash value (array) for old gene hash key
- push @{$swap_genes{$orig_data_item}},
- { "symbol"=>$new_symbol, "new_item"=>$new_data_item };
-
- $new_symbol = ""; # reset for next iter.
- }
-
- # determine the original gene(s) with the highest # of homologs in the new
- # gene set
- my @most_popular_genes; # identity of the gene(s) with the highest number of homologs
- foreach my $orig_gene_key (keys %swap_genes)
- {
- if ($max_homolog_count < scalar(@{$swap_genes{$orig_gene_key}}))
- {
- $max_homolog_count = scalar(@{$swap_genes{$orig_gene_key}});
- @most_popular_genes = (); # new max; refresh
- push @most_popular_genes, $orig_gene_key;
- }
- else
- {
- if ($max_homolog_count == scalar(@{$swap_genes{$orig_gene_key}}))
- {
- push @most_popular_genes, $orig_gene_key;
- }
- }
- }
-
- if ($verbose) # give add'l stats on gene and homolog counts
- {
- print "[Total number of original genes and homologs]\n"
- . "Original gene count: " . $original_gene_count . "\n"
- . "Replacement homolog count: $replacement_homolog_count\n\n";
-
- print "[Highest number of homologs per gene]\n";
- print "Number of homologs: $max_homolog_count\n";
- print "Gene(s): @most_popular_genes\n\n";
-
- print "[Number of homologs per original gene]\n";
- foreach my $orig_gene_key (keys %swap_genes)
- {
- print "$orig_gene_key: " . scalar(@{$swap_genes{$orig_gene_key}}) . "\n";
- }
- print "\n";
- }
-
- close(GENE_FILE);
-
- # initialize the blue-red gradient for heat mapping
- if ($apply_homolog_heat)
- {
- %gradient = set_gradient($max_homolog_count);
- }
-
- print "Opening GPML pathway file and reading data...\n\n";
-
- my $parser = new XML::DOM::Parser;
- $gpml_doc = $parser->parsefile($input_gpml_file);
-}
-
-
-# ---------------------------------------------------------------------------
-=item B<void show_input()>
-Spits out the data to make sure you've read in the files correctly.
-Verbose only.
-=cut
-# ---------------------------------------------------------------------------
-sub show_input
-{
- if ($verbose)
- {
- print "[Configuration Settings]\n";
- print Dumper(\%configs) . "\n\n";
- print "\n";
-
- print "[Gene Mappings]\n";
- print Dumper(\%swap_genes) . "\n\n";
- print "\n";
- }
- if ($doc_mode)
- {
- print "[Source GPML]\n";
- print $gpml_doc->toString;
- print "\n";
- }
-}
-
-# ---------------------------------------------------------------------------
-=item B<string create_unique_hex_id($hash_ref, $string_id_type)>
-Accepts a reference to a hash of existing hex ids and a string as
-the "type" of ID (e.g. "Group.GraphId"). The latter is currently for
-documentary purposes only.
-Generates a "random" 5-digit hexadecimal id, checks to see if it
-already exists in the hex list, and if not, adds it to the list
-of hex ids already present in the GPML doc. Otherwise, generates
-another "random" id and repeats the process until a new unique id
-is identified.
-Returns a string containing the new hex id.
-=cut
-# ---------------------------------------------------------------------------
-sub create_unique_hex_id($$)
-{
- # NOTE: This algorithm breaks down at VERY large scale (100K genes+). The
- # larger the number of original genes, groups, and new homologs you need to
- # create, the more inefficient it becomes to make sure your "random" 5-digit
- # hex number is not already present in your "existing ids" list via
- # recursion. However, for a few hundred or thousand genes, it should be ok.
-
- my $first_digit; # limited to a..f
- my $last_four_digits; # 0..f
-
- $first_digit = (('a'..'f')[rand(6)]);
- $last_four_digits .= ((0..9,'a'..'f')[rand(16)]) for 1..4;
-
- my $candidate_id = $first_digit . $last_four_digits;
-
- # recurse if you haven't generated a unique id yet
- if (exists ${$_[0]}{$candidate_id})
- {
- # print "not unique...\n"; # TEST
- # the '&' suppresses prototype checking and avoids a runtime warning
- # since this is a recursive call
- $candidate_id = &create_unique_hex_id($_[0],$_[1]);
- }
- else
- {
- # print "unique!\n"; # TEST
- ${$_[0]}{$candidate_id} = $_[1];
- }
-
- return $candidate_id;
-}
-
-# ---------------------------------------------------------------------------
-=item B<void swap_genes()>
-Substitutes gene data.
-=cut
-# ---------------------------------------------------------------------------
-sub swap_genes
-{
- print "Swapping gene data and making other document modifications...\n\n";
-
- my $pathway_node = ($gpml_doc->getElementsByTagName("Pathway"))[0];
-
- # change Pathway header info to config settings
- if ($configs{"Title"}) {
- $pathway_node->setAttribute("Name",$configs{"Title"}); }
- if ($configs{"Author"}) {
- $pathway_node->setAttribute("Author",$configs{"Author"}); }
- if ($configs{"Maintainer"}) {
- $pathway_node->setAttribute("Maintainer",$configs{"Maintainer"}); }
- if ($configs{"Version"}) {
- $pathway_node->setAttribute("Version",$configs{"Version"}); }
- if ($configs{"Organism"}) {
- $pathway_node->setAttribute("Organism",$configs{"Organism"}); }
-
- # get all "gene box" data nodes
- my $data_nodes = $pathway_node->getElementsByTagName("DataNode");
- # print $data_nodes->getLength . "\n"; # TEST
-
- # remove all <BiopaxRef> and <bp:PublicationXref> elements and children
- if ($remove_lit)
- {
- print "Removing literature references...\n\n";
- my $biopax_node = ($pathway_node->getElementsByTagName("Biopax"))[0];
- $pathway_node->removeChild($biopax_node);
-
- for (@$data_nodes)
- {
- my $curr_datanode = $_;
- my $biopaxref_nodes = $curr_datanode->getElementsByTagName("BiopaxRef");
- for (@$biopaxref_nodes)
- {
- # print $_->getTagName . "\n"; # TEST
- $curr_datanode->removeChild($_);
- }
- }
- }
-
- # will hold a convenient nested hash of data node references in the gpml doc,
- # indexed by the id of the gene located in the <Xref> element for each
- # node, and sub-indexed by the GraphId of each corresponding node
- my %data_nodes_by_gene_id;
-
- if ($verbose) {
- print "[Original genes]\n";
- }
-
- # create a hash of all 5-digit hex ids in the gpml doc (this is the black list)
- # one list of DataNode.GraphId, Group.GroupId, and Group.GraphId
- my %existing_hex_ids;
- for (@$data_nodes)
- {
- # print $_ . "\n"; # TEST
-
- if ($_->getAttributeNode("GraphId"))
- {
- $existing_hex_ids{$_->getAttributeNode("GraphId")->getValue}
- = $_->getTagName . ".GraphId";
- }
-
- # also build a data node hash to make lookup easier in the next section
- my $curr_xref_id = ($_->getElementsByTagName("Xref"))[0]
- ->getAttributeNode("ID")->getValue;
- my $curr_graph_id = $_->getAttributeNode("GraphId")->getValue;
-
- $curr_xref_id =~ s/\s+$//; # rtrim whitespace
- $curr_xref_id =~ s/^\s+//; # ltrim whitespace
-
- if ($verbose) {
- my $curr_text_label = $_->getAttributeNode('TextLabel')->getValue;
- $curr_text_label =~ s/^\s+|\s+$//; # trim whitespace
- print "$curr_text_label\t$curr_xref_id\n";
- }
-
- if (length($curr_xref_id) > 0)
- {
- #if ($curr_xref_id eq "AT3G12810") { print "** hit on AT3G12810\n"; } # TEST
- $data_nodes_by_gene_id{$curr_xref_id}{$curr_graph_id} = $_;
- }
- else
- {
- if ($verbose) {
- print "WARNING: Found DataNode (TextLabel: "
- . $_->getAttributeNode('TextLabel')->getValue . ") "
- . "with missing Xref ID.\n"
- }
- }
- }
- print "\n";
-
- if ($debug) {
- print "...<DEBUG: \%data_nodes_by_gene_id>\n";
- foreach my $tmp_gene (keys %data_nodes_by_gene_id) {
- foreach my $tmp_node (keys %{$data_nodes_by_gene_id{$tmp_gene}}) {
- print "... $tmp_gene => $tmp_node => $data_nodes_by_gene_id{$tmp_gene}{$tmp_node}\n";
- #if ($tmp_gene eq "AT3G12810") { print "** hit on AT3G12810 node\n"; } # TEST
- }
- }
- print "\n";
- }
-
- my $group_nodes = $pathway_node->getElementsByTagName("Group");
- for (@$group_nodes)
- {
- if ($_->getAttributeNode("GroupId"))
- {
- $existing_hex_ids{$_->getAttributeNode("GroupId")->getValue}
- = $_->getTagName . ".GroupId";
- }
- if ($_->getAttributeNode("GraphId"))
- {
- $existing_hex_ids{$_->getAttributeNode("GraphId")->getValue}
- = $_->getTagName . ".GraphId";
- }
- }
-
- if ($debug) { print "...<DEBUG: \%existing_hex_ids>\n"
- . Dumper(\%existing_hex_ids) . "\n\n"; }
-
- # iterate through gene mappings from csv file
- foreach my $old_gene (keys %swap_genes)
- {
- # print $old_gene . "\n"; # TEST
-
- # find curr old gene nodes in doc
- if (exists $data_nodes_by_gene_id{$old_gene})
- {
- # iterate through each node by its GraphId
- foreach my $curr_old_genes_by_hex_id (keys %{$data_nodes_by_gene_id{$old_gene}})
- {
- my $curr_old_gene_node = $data_nodes_by_gene_id{$old_gene}{$curr_old_genes_by_hex_id};
- # print $curr_old_gene_node . "\n"; # TEST
-
- # holds list of newly-created nodes, used to replace old node
- my @new_nodes_map;
-
- # iterate through new gene replacements
- for (@{$swap_genes{$old_gene}})
- {
- # copy the curr old gene node
- my $new_node = $curr_old_gene_node->cloneNode("deep");
-
- # print "[$_]\n$new_node->toString\n\n"; # TEST
-
- # add to new nodes ary
- push @new_nodes_map, [$new_node, $_];
- }
- # print "@new_nodes_map\n"; # TEST
-
- # if more than one new homolog exists, and the old gene doesn't
- # already belong to a group, you'll need a new Group for multiple
- # gene boxes
- my $new_GroupId;
-
- if (scalar(@new_nodes_map) > 1)
- {
- # if curr old gene does not belong to a group
-
- # print $curr_old_gene_node->toString . "\n"; # TEST
- # print $curr_old_gene_node->getAttribute("GroupRef"); # TEST
-
- if (!$curr_old_gene_node->getAttribute("GroupRef"))
- {
- #print "no existing group ref\n"; # TEST
-
- # generate a new GroupId and Group.GraphId hex ids not
- # already in use
- $new_GroupId = create_unique_hex_id(\%existing_hex_ids,"Group.GroupId");
- # my $new_Group_GraphId = create_unique_hex_id(\%existing_hex_ids,"Group.GraphId");
- #print "new group id: $new_GroupId\n"; # TEST
- # print "$new_GroupId, $new_Group_GraphId\n"; # TEST
-
- # create a new group node
- my $new_group = $gpml_doc->createElement("Group");
- $new_group->setAttribute("GroupId",$new_GroupId);
- #$new_group->setAttribute("GraphId",$new_Group_GraphId);
- $new_group->setAttribute("Style","Group");
-
- # add to beginning of group nodes
- $pathway_node->insertBefore($new_group,${$group_nodes}[0]);
- }
- }
-
- # flag for determining if there are one or many replacement homologs
- my $is_first_homolog = 1;
-
- # makes sure each box is increasingly offset from the original
- # (in all three dimensions)
- my $offset_multiplier = 0;
- my $gene_suffix_counter = 0; # used to affix numbers to multiple new gene symbols
-
- # for new nodes ary
- for (@new_nodes_map)
- {
- if (scalar(@new_nodes_map) > 1)
- {
- $gene_suffix_counter++;
- }
-
- my $curr_new_node = $$_[0];
- my $curr_symbol = ${$$_[1]}{"symbol"};
- my $curr_homolog = ${$$_[1]}{"new_item"};
-
- #print "$_: $curr_new_node, $curr_symbol, $curr_homolog\n"; # TEST
- #print "[Curr New Node before editing...]\n" . $curr_new_node->toString . "\n\n"; # TEST
-
- # update all new nodes w/ attributes...
-
- # grab original text label
- my $old_label = $curr_new_node->getAttributeNode("TextLabel")->getValue;
-
- # rename TextLabel...
- if ($use_symbols && length($curr_symbol) > 0) # apply the provided gene symbol
- {
- $curr_new_node->setAttribute("TextLabel", $curr_symbol);
- }
- else # prefix (from config), suffix: new '-#' for multiple homologs
- {
- $curr_new_node->setAttribute("TextLabel",
- (($configs{"LabelPrefix"}) ? $configs{"LabelPrefix"} : "")
- . $curr_new_node->getAttributeNode("TextLabel")->getValue
- . (($gene_suffix_counter > 0) ? "-$gene_suffix_counter" : ""));
- }
-
- # add new GroupRef if necessary
- if ($new_GroupId)
- {
- $curr_new_node->setAttribute("GroupRef",$new_GroupId);
- }
-
- # add Comment back-referencing TAIR locus id (use "source" attribute)
- # NOTE: order is important in GPML; the <Comment> tags are first
- my $new_comment = $gpml_doc->createElement("Comment");
- $new_comment->setAttribute("Source",$configs{"Source"});
- $new_comment->addText($configs{"CommentPrefix"} . " $old_gene ($old_label).");
- $curr_new_node->insertBefore($new_comment,$curr_new_node->getFirstChild); # assumes other child nodes
-
- # edit <Xref Database="JGI" ID="Egrandis..." />
- my $curr_xref = ($curr_new_node->getElementsByTagName("Xref"))[0];
- $curr_xref->setAttribute("Database",$configs{"Database"});
- $curr_xref->setAttribute("ID",$curr_homolog);
-
- # change box width and colors (<Graphics...Color="4488ff" ... />)
- my $curr_graphics = ($curr_new_node->getElementsByTagName("Graphics"))[0];
- $curr_graphics->setAttribute("Width",$configs{"BoxWidth"});
-
- # add "heat" to genes with multiple homologs
- if ($apply_homolog_heat && ($gene_suffix_counter > 0))
- {
- $curr_graphics->setAttribute("FillColor", $gradient{scalar(@new_nodes_map)});
- $curr_graphics->setAttribute("Color","8888ff");
- }
- else
- {
- if ($configs{"BoxColor"}) {
- $curr_graphics->setAttribute("FillColor",$configs{"BoxColor"}); }
- if ($configs{"BoxBorder"}) {
- $curr_graphics->setAttribute("Color",$configs{"BoxBorder"}); }
- }
-
- if ($is_first_homolog)
- {
- # print "that was the first homolog...\n"; # TEST
- $is_first_homolog = 0; # first homolog complete
- }
- else # add'l homologs required
- {
- $offset_multiplier++;
-
- # print "that was an add'l homolog, change more attrs...\n"; # TEST
- # update add'l nodes w/ special attributes...
-
- # generate a new DataNode GraphId not already in use
- my $new_GraphId =
- create_unique_hex_id(\%existing_hex_ids,"DataNode.GraphId");
- # print $new_GraphId . "\n"; # TEST
- $curr_new_node->setAttribute("GraphId",$new_GraphId);
-
- # decrement the Z-order
- $curr_graphics->setAttribute("ZOrder",
- $curr_graphics->getAttributeNode("ZOrder")->getValue
- - $offset_multiplier);
- # stagger the extra boxes by decrementing the coords
- $curr_graphics->setAttribute("CenterX",
- $curr_graphics->getAttributeNode("CenterX")->getValue
- - ($configs{"X-Offset"} * $offset_multiplier));
- $curr_graphics->setAttribute("CenterY",
- $curr_graphics->getAttributeNode("CenterY")->getValue
- - ($configs{"Y-Offset"} * $offset_multiplier));
- }
- }
- undef $new_GroupId; # clear this out so we can test against its existence next time
-
- # replace old node w/ new node(s)
- for (@new_nodes_map) {
- # add all the new nodes...
- $pathway_node->insertBefore($$_[0],$curr_old_gene_node);
- }
- # ...and remove the original node
- $pathway_node->removeChild($curr_old_gene_node);
- }
- # once mapped, remove the old gene so we are left with a list of
- # unmapped original genes (for show_ouput())
- delete($data_nodes_by_gene_id{$old_gene});
- }
- else
- {
- print "ALERT: Gene identifier $old_gene is not present in this "
- . "PathVisio GPML document.\n";
- }
- }
- %unmapped_genes = %data_nodes_by_gene_id; # whatever is left over
-}
-
-# ---------------------------------------------------------------------------
-=item B<void show_output()>
-Displays the transformed data. Verbose only.
-=cut
-# ---------------------------------------------------------------------------
-sub show_output
-{
- if ($verbose) {
- print "[Unmapped original genes]\n";
- my $count = 0;
- foreach my $tmp_gene (keys %unmapped_genes)
- {
- foreach my $tmp_node (keys %{$unmapped_genes{$tmp_gene}})
- {
- $count++;
- print $unmapped_genes{$tmp_gene}{$tmp_node}
- ->getAttributeNode("TextLabel")->getValue
- . "\t($tmp_gene)\n";
- }
- }
- print "\nTotal unmapped genes: $count\n";
- }
- if ($doc_mode)
- {
- print "\n[Modified GPML Output]\n";
- print $gpml_doc->toString;
- print "\n";
- }
-}
-
-# ---------------------------------------------------------------------------
-=item B<void export_data()>
-Writes the transformed GPML doc out to the specified output file.
-=cut
-# ---------------------------------------------------------------------------
-sub export_data
-{
- print "\nWriting GPML to output file...\n\n";
-
- # ensures utf-8 encoding (for accent marks, etc.)
- open my $out_file_handle, ">:utf8", "$output_file" or die $!;
-
- $gpml_doc->print($out_file_handle);
-}
-
-=back
-=cut
-
-# ---------------------------------------------------------------------------
-# main
-# ---------------------------------------------------------------------------
-
-init;
-import_data;
-show_input;
-swap_genes();
-show_output;
-export_data;
-
-$gpml_doc->dispose; # cleanup
-exit;
-
-# ---------------------------------------------------------------------------
-# end
-# ---------------------------------------------------------------------------
-
+++ /dev/null
-#!/usr/bin/perl -w
-use strict;
-
-# ---------------------------------------------------------------------------
-# Reactome - CHEBI Ontology Mapping Script
-#
-# Justin Preece, 10/06/10
-# v1.0: 10/13/10 (svn rev. 66)
-# v1.1: 10/20/10 (svn rev. 70)
-# v1.2: 02/07/11 (svn rev. 86)
-#
-# Purpose: Map CHEBI ontology terms onto the Reactome database.
-#
-# Inputs:
-#
-# CHEBI OBO file (preset)
-#
-# Reactome file (preset, provided by Guanming Wu)
-# (Header) [ReactomeID] [Compound_Name] [CAS] [LIGAND] [Cyc]
-# (Row) 923893 S-adenosyl-L-methionine 29908-03-0 C00019 S-ADENOSYLMETHIONINE ** the '-' (dash) symbol will be applied to any empty columns
-#
-# Outputs: tab-del mapping file (reactome_chebi_mapping_complete_sorted.txt)
-#
-# [ReactomeID] [CHEBI] [XREF_Type] [XREF_ID]
-# 923893 15414 CAS 29908-03-0
-# 923893 15414 LIGAND C00019
-# 923893 15414 CompoundTerm S-ADENOSYLMETHIONINE
-# 923893 15414 CompoundSynonym s-AdenosylMethionine
-# 923893 15414 CycTerm S-ADENOSYLMETHIONINE ** optional
-# 923893 15414 CycSynonym s-adenosylmethionine ** optional
-# ---------------------------------------------------------------------------
-
-
-# ---------------------------------------------------------------------------
-# modules
-# ---------------------------------------------------------------------------
-
-use GO::Parser;
-
-# ---------------------------------------------------------------------------
-# declarations
-# ---------------------------------------------------------------------------
-
-# set paths to data files
-my $data_path = "/home/preecej/Documents/projects/reactome/reactome_to_chebi_mapping/AraCyc/gk_central_041811/no_synonyms/";
-my $chebi_obo_file = "../../chebi_v78.obo";
-my $reactome_file = "AraReferenceMolecules.txt";
-my $mapped_output_file = "1.2_reactome_chebi_mapping_complete.txt";
-my $sorted_output_file = "1.2_reactome_chebi_mapping_complete_sorted.txt";
-my $unique_mappings = "1.2_reactome_unique_mappings.txt";
-my $sorted_no_match_file = "1.2_reactome_entries_with_no_chebi_match.txt";
-
-# options
-my $allow_obsolete_terms = 1;
-my $allow_cyc = 0;
-my $allow_synonyms = 0;
-
-my $ont; # chebi ontology
-
-my %reactome_CompoundName; # reactome Compound Name hash
-my %reactome_CAS; # reactome CAS hash
-my %reactome_LIGAND; # reactome LIGAND hash
-my %reactome_Cyc; # reactome Cyc hash
-
-my @map_results = (); # successful mappings between chebi and reactome
-
-
-# ---------------------------------------------------------------------------
-# functions
-# ---------------------------------------------------------------------------
-
-
-# setup chebi parser and reactome data
-# ---------------------------------------------------------------------------
-sub init
-{
- # init ontology parser and ontology
- my $parser = GO::Parser->new({handler=>'obj'});
- $parser->parse($data_path . $chebi_obo_file);
- $ont = $parser->handler->graph;
-
- # read reactome file into 3 separate hashes
- open(REACTOME_FILE,$data_path . $reactome_file);
-
- my $line = <REACTOME_FILE>; # skip the header
- my $reactome_count = 0;
-
- while (<REACTOME_FILE>)
- {
- $line = $_;
- chomp $line;
- $reactome_count++;
- my @reactome_entry = split(/\t/, $line); # break up our tab-del line
-
- # load up this reactome entry's Compound_Name, ID, CAS, LIGAND, and Cyc values
- my $reactome_id = $reactome_entry[0];
- my $compound_name = uc $reactome_entry[1]; # for case-insensitivity
-
- # strips off "AN " and "A " indefinite articles
- $compound_name =~ s/^ //;
- $compound_name =~ s/^AN //;
- $compound_name =~ s/^A //;
-
- my $CAS_id = $reactome_entry[2];
- my $LIGAND_id = $reactome_entry[3];
- my $Cyc_term = uc $reactome_entry[4]; # for case-insensitivity
-
- # There is a possibility that a single CAS, LIGAND, or Cyc
- # identifier may appear in more than one reactome entry. This
- # temp array allows each matched hash value to hold more than
- # one ReactomeID, if necessary.
-
- # --CAS Hash Load--
- if ($CAS_id ne "-") { # keep those "-" placeholders out
- # build the CAS hash; each value may hold 1...n reactome
- # ids (as an array)
- push @{$reactome_CAS{$CAS_id}}, $reactome_id;
- }
-
- # similarly...
-
- # --LIGAND Hash Load--
- if ($LIGAND_id ne "-") {
- push @{$reactome_LIGAND{$LIGAND_id}}, $reactome_id;
- }
-
- # --CompoundName Hash Load--
- if ($compound_name ne "-") {
- push @{$reactome_CompoundName{"$compound_name"}}, $reactome_id;
- }
-
- # --Cyc Hash Load--
- if ($allow_cyc)
- {
- if ($Cyc_term ne "-") {
- push @{$reactome_Cyc{"$Cyc_term"}}, $reactome_id;
- }
-
- }
- }
- close REACTOME_FILE;
-
- print "\n[Reactome Stats]",
- "\nTotal Reactome Entries: $reactome_count\n";
-
-}
-
-
-# spit out some data to make sure you've read in the files correctly
-# ---------------------------------------------------------------------------
-sub test_inputs
-{
- # basic ontology info
- print "[Node Count]: " . $ont->node_count . "\n";
-
- # get all chebi terms in the ontology
- my $terms = $ont->get_all_nodes;
-
- # output contents of parsed ontology
- foreach my $term (@$terms)
- {
- print "\n" . $term->acc . " " . $term->name . "\n[SYNONYMS]\n";
-
- my $synonyms = $term->synonym_list;
- foreach my $synonym (@$synonyms) {
- print $synonym . "\n";
- }
-
- print "[XREFS]\n";
- my $xrefs = $term->dbxref_list;
- foreach my $xref (@$xrefs) {
- print $xref->xref_key . ",",
- $xref->xref_keytype . ",",
- $xref->xref_dbname . ",",
- $xref->xref_desc . "\n";
- }
- print "\n";
- }
-
- # show dupes in reactome hashes - give data to Pankaj;
- # this is important b/c the duplicates may represent erroneous data in
- # the Reactome dataset
- my $k; my @v;
- print "\n[Reactome Hashes - Dupes]\n";
- print "\n--CAS Hash--\n";
- for $k (keys %reactome_CAS) {
- if (@{$reactome_CAS{$k}} > 1) {
- print "$k: @{$reactome_CAS{$k}}\n";
- }
- }
- print "\n--LIGAND Hash--\n";
- for $k (keys %reactome_LIGAND) {
- if (@{$reactome_LIGAND{$k}} > 1) {
- print "$k: @{$reactome_LIGAND{$k}}\n";
- }
- }
- print "\n--CompoundName Hash--\n";
- for $k (keys %reactome_CompoundName) {
- if (@{$reactome_CompoundName{$k}} > 1) {
- print "$k: @{$reactome_CompoundName{$k}}\n";
- }
- }
- if ($allow_cyc)
- {
- print "\n--Cyc Hash--\n";
- for $k (keys %reactome_Cyc) {
- if (@{$reactome_Cyc{$k}} > 1) {
- print "$k: @{$reactome_Cyc{$k}}\n";
- }
- }
- }
-}
-
-
-# map the chebi terms to the reactome entries
-# ---------------------------------------------------------------------------
-sub perform_map
-{
- my $chebi_obo_terms = $ont->get_all_nodes;
-
- # vars for mapping stats
- my $attempted_mappings = 0;
- my $successful_mappings = 0;
- my $attempted_CAS_mappings = 0;
- my $successful_CAS_mappings = 0;
- my $attempted_LIGAND_mappings = 0;
- my $successful_LIGAND_mappings = 0;
- my $attempted_name_mappings = 0;
- my $successful_name_mappings = 0;
- my $attempted_synonym_mappings = 0;
- my $successful_synonym_mappings = 0;
-
- # loop through each chebi term
- foreach my $term (@$chebi_obo_terms)
- {
- # eliminate "typedef" nodes (non-CHEBI terms), also check for obsolete
- # terms and whether to allow them
- if (($term->acc =~ m/^CHEBI:/)
- && (!$term->is_obsolete || ($term->is_obsolete && $allow_obsolete_terms)))
- {
- # attempt CHEBI match on CAS and LIGAND ID's
- $attempted_mappings++;
- my $xrefs = $term->dbxref_list;
- foreach my $xref (@$xrefs)
- {
- $attempted_CAS_mappings++;
- $attempted_LIGAND_mappings++;
-
- # temp-foo to skirt an interpolation problem
- my $tmp_key = $xref->xref_key;
-
- if (defined($reactome_CAS{"$tmp_key"}))
- {
- foreach my $tmp_reactome_id (@{$reactome_CAS{$tmp_key}})
- {
- $successful_CAS_mappings++;
- push (@map_results, "$tmp_reactome_id\t" .
- $term->acc . "\t" .
- "CAS\t" .
- $tmp_key);
- }
- }
-
- if (defined($reactome_LIGAND{"$tmp_key"}))
- {
- foreach my $tmp_reactome_id (@{$reactome_LIGAND{$tmp_key}})
- {
- $successful_LIGAND_mappings++;
- push (@map_results, "$tmp_reactome_id\t" .
- $term->acc . "\t" .
- "LIGAND\t" .
- $tmp_key);
- }
- }
- }
-
- # attempt CHEBI match on Reactome Compound Names (and optional Cyc names/synonyms)...
- $attempted_name_mappings++;
-
- # more temp-foo to skirt said interpolation problem
- my $tmp_name = uc $term->name;
-
- # reactome compound names...
- if (defined($reactome_CompoundName{"$tmp_name"}))
- {
- foreach my $tmp_reactome_id (@{$reactome_CompoundName{$tmp_name}})
- {
- $successful_name_mappings++;
- push (@map_results, "$tmp_reactome_id\t" .
- $term->acc . "\t" .
- "CompoundTerm\t" .
- $term->name);
- }
- }
- # ...and synonyms (optional)
- if ($allow_synonyms)
- {
- my $synonyms = $term->synonym_list;
- foreach my $synonym (@$synonyms)
- {
- $attempted_synonym_mappings++;
-
- # yet more temp-foo to skirt interpolation problem
- my $tmp_syn = "\U$synonym";
-
- if (defined($reactome_CompoundName{$tmp_syn}))
- {
- foreach my $tmp_reactome_id (@{$reactome_CompoundName{$tmp_syn}})
- {
- $successful_synonym_mappings++;
- push (@map_results, "$tmp_reactome_id\t" .
- $term->acc . "\t" .
- "CompoundSynonym\t" .
- $synonym);
- }
- }
- }
- }
-
- # Cyc names...
- if ($allow_cyc)
- {
- if (defined($reactome_Cyc{"$tmp_name"}))
- {
- foreach my $tmp_reactome_id (@{$reactome_Cyc{$tmp_name}})
- {
- $successful_name_mappings++;
- push (@map_results, "$tmp_reactome_id\t" .
- $term->acc . "\t" .
- "CycTerm\t" .
- $term->name);
- }
- }
- # ...and synonyms (optional)
- if ($allow_synonyms)
- {
- my $synonyms = $term->synonym_list;
- foreach my $synonym (@$synonyms)
- {
- $attempted_synonym_mappings++;
-
- # yet more temp-foo to skirt interpolation problem
- my $tmp_syn = "\U$synonym";
-
- if (defined($reactome_Cyc{$tmp_syn}))
- {
- foreach my $tmp_reactome_id (@{$reactome_Cyc{$tmp_syn}})
- {
- $successful_synonym_mappings++;
- push (@map_results, "$tmp_reactome_id\t" .
- $term->acc . "\t" .
- "CycSynonym\t" .
- $synonym);
- }
- }
- }
- }
- }
- }
- }
- # send up some stats on the mapping process
- $successful_mappings =
- + $successful_CAS_mappings
- + $successful_LIGAND_mappings
- + $successful_name_mappings
- + $successful_synonym_mappings;
-
- print "\n[ChEBI Stats]",
- "\nNodes in File: " . $ont->node_count,
- "\nTotal Attempted Mappings (with usable ChEBI terms): " . $attempted_mappings,
- "\nTotal Successful Mappings: " . $successful_mappings . "\n";
-
- print "\n[Mapping Breakdown by Type]",
- "\nCAS (matches/attempts): ",
- "$successful_CAS_mappings/$attempted_CAS_mappings ",
- "(note: can include ChemIDplus and KEGG COMPUND db duplicates)",
- "\nLIGAND: ",
- "$successful_LIGAND_mappings/$attempted_LIGAND_mappings",
- "\nTerm Names " . ($allow_cyc ? "includes Cyc terms and synonyms" : "") . ": ",
- "$successful_name_mappings/$attempted_name_mappings";
- if ($allow_synonyms)
- {
- print "\nTerm Synonyms: ",
- "$successful_synonym_mappings/$attempted_synonym_mappings";
- }
- print "\n\n";
-}
-
-
-# put the results in the mapped output file
-# ---------------------------------------------------------------------------
-sub create_mapfile
-{
- if (@map_results > 0)
- {
- # add a header to the results array
- unshift (@map_results, "ReactomeID\tCHEBI\tXREF_Type\tXREF_ID");
-
- # setup output file
- open(OUTPUT_FILE,">" . $data_path . $mapped_output_file);
-
- #format results for file output
- print OUTPUT_FILE "$_\n" foreach @map_results;
-
- close OUTPUT_FILE;
-
- # sort on all cols (keep the header at the top), remove exact dupes
- system "awk 'NR == 1; NR > 1 {print \$0 | \"sort\"}' $data_path$mapped_output_file | uniq > $data_path$sorted_output_file";
-
- # also produce files listing unique Reactome entries having a match...and those without a match
- system "awk 'NR == 1; NR > 1 {print \$1}' $data_path$sorted_output_file | uniq > $data_path$unique_mappings";
- system "cat $data_path$reactome_file | grep -vf $data_path$unique_mappings | sort > $data_path$sorted_no_match_file";
- } else {
- print "\n\nSorry, there are no mapped results.\n\n";
- }
-}
-
-
-# ---------------------------------------------------------------------------
-# main
-# ---------------------------------------------------------------------------
-
-init;
-#test_inputs;
-perform_map;
-create_mapfile;
-
-exit;
+++ /dev/null
-#!/usr/bin/perl -w
-use strict;
-use Data::Dumper;
-
-my $CoGe_genes_file_name = $ARGV[0];
-my $assoc_file_name = $ARGV[1];
-
-# read in CoGe file (arg 0), build hash of gene model ids to symbols/gene names
-
-open(IN_FILE, $CoGe_genes_file_name);
-
-my %classical_genes_by_gene_model;
-
-my $line = <IN_FILE>;
-
-while (<IN_FILE>)
-{
- $line = $_;
- chomp $line;
-
- my @curr_line = split(',',$line);
-
- my $gene_symbol = $curr_line[0];
- $gene_symbol =~ tr/"//d;
- my $gene_name = $curr_line[2];
- $gene_name =~ tr/"//d;
- my $gene_model_id = $curr_line[8];
- $gene_model_id =~ tr/"//d;
-
- #print $gene_symbol . "\|" . $gene_name . "\|" . $gene_model_id . "\n";
-
- my $gene_model_expr = "^(GRMZM)";
- if ($gene_model_id =~ $gene_model_expr) {
- $classical_genes_by_gene_model{$gene_model_id} = [ $gene_symbol, $gene_name ];
- }
-}
-
-close (IN_FILE);
-
-#print Dumper(\%classical_genes_by_gene_model) . "\n\n";
-
-# read in assoc file (arg 1)
-
-open(ASSOC_IN_FILE, $ARGV[1]);
-
-open(OUT_FILE,">" . (split('\.',$assoc_file_name))[0] . "_named.assoc");
-
-while (<ASSOC_IN_FILE>)
-{
- $line = $_;
- chomp $line;
-
- if (length($line) > 0) {
-
- #print $line. "\n";
-
- my @curr_line = split('\t',$line);
-
- # look for each annotation's hashed gene model id
- if (defined $classical_genes_by_gene_model{$curr_line[1]}) {
- # add/replace the appropriate cols
- $curr_line[2] = ${$classical_genes_by_gene_model{$curr_line[1]}}[0];
- $curr_line[9] = ${$classical_genes_by_gene_model{$curr_line[1]}}[1];
-
- }
- # output to new assoc file with appended name
- #print join("\t", @curr_line) . "\n";
- print OUT_FILE join("\t", @curr_line) . "\n";
- }
-}
-
-close (ASSOC_IN_FILE);
-close (OUT_FILE);
-exit;
+++ /dev/null
-<?php
-// JSON web service for PO terms: autocomplete and search methods
-
-/* require the user as the parameter */
-if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
-
- $arr_field_names = array('name','acc');
-
- /* read the params and/or set our own */
- $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
-
- // security measures; helps to avoid SQL injection attacks
- $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
- ? $_GET['field']
- : die('"field" is a required parameter and must match an available data field.');
-
- $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
- if ($number_of_terms > 50) { $number_of_terms = 50; }
-
- $qval = $_GET['qval'];
-
- $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
- ? strtolower($_GET['qval'])
- : die('Please provide a searchable value');
-
- $format = strtolower($_GET['format']) != 'json'
- ? strtolower($_GET['format'])
- : 'json'; //json is the default
-
- /* connect to the db */
- $link = mysql_connect($_SERVER['mysql_host'], $_SERVER['mysql_user'], $_SERVER['mysql_pw']) or die('Cannot connect to the DB');
- mysql_select_db($_SERVER['mysql_db'],$link) or die('Cannot select the DB');
-
- switch ($type) {
- case 'autocomplete':
- /* grab the terms from the db */
- $query = "SELECT t.$field FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.$field LIKE '%$qval%'"
- . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY name LIMIT $number_of_terms";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- $terms[] = array('term'=>$term[$field]);
- }
- }
-
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('PO_term_lookup_response'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
-
- case 'term_detail':
- /* grab the ontology data from the db */
- $query = "SELECT DISTINCT t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
- . " FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.name = '$qval'"
- . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY t.name LIMIT 1";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- $terms[] = array(
- 'accession_id'=>$term['acc'],
- 'aspect'=>$term['type'] == "plant_anatomy" ? "Plant Anatomy" : "Plant Growth and Development Stage",
- 'definition'=>$term['definition'],
- 'comment'=>$term['comment']);
- }
- }
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('PO_term_detail_response'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
- default:
- die('Sorry, this web service method is not available.');
- }
- /* disconnect from the db */
- @mysql_close($link);
-}
-else { die('Not authorized.'); }
-?>
-
+++ /dev/null
-<?php
-
-print "test start\n";
-
-$doc = new DOMDocument();
-$doc->load('/home/preecej/Documents/projects/pathvisio/Ath_scratch.gpml');
-
-$entry = $doc->getElementsByTagName("Pathway");
-$author = $entry->item(0)->getAttribute("Author");
-print "Author:$author\n";
-
-print "test over\n";
-
-?>
+++ /dev/null
-__NOTOC__
-=== Welcome to the Planteome Annotation Wiki, a resource for annotated plant genotypes and phenotypes on the semantic web! ===
-
-We host annotations from a variety of published data sources. You are free to browse these annotations and search for specific genes, synonyms, EC numbers, cross-references, and references to publications, as well as many other types of data.
-
-You may also add information of your own. If you would like to create your own annotations or add more data to existing annotations, please click [[special:UserLogin|here]] to establish a new curator account.
-
-If you already have a curator account, just [[Special:UserLogin|log in]] and begin annotating!
-
-Search for existing annotations (or data therein): (search box)
-
-[[Special:FormEdit/Annotation|Add a new gene annotation.]]
-
-=== What is semantic data, and how can it enhance my research? ===
-
-examples...
-
-=== Our Collaborators ===
-
-* Gramene...
-* The Plant Ontology...
-
-=== Credits and Thanks ===
-
-* Jaiswal Lab (and the Planteome portal)...
-* OSU...
-* POC
-* NSF...
-* etc...
-
-<!--
-== Getting started ==
-* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
-* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
-* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
--->
-
+++ /dev/null
-=== A list of reference species for use on this wiki ===
-{{#show:{{PAGENAME}}
- | format=table
- | mainlabel=-
- | ?Has Reference Taxon
-}}
-
-{{#set:Has Reference Taxon=Aquilegia coerulea}}
-{{#set:Has Reference Taxon=Arabidopsis lyrata}}
-{{#set:Has Reference Taxon=Arabidopsis thaliana}}
-{{#set:Has Reference Taxon=Brachypodium dystachyon}}
-{{#set:Has Reference Taxon=Carica papaya}}
-{{#set:Has Reference Taxon=Chlamydomonas reinhardtii}}
-{{#set:Has Reference Taxon=Citrus clementina}}
-{{#set:Has Reference Taxon=Citrus cinensis}}
-{{#set:Has Reference Taxon=Cucumis sativus}}
-{{#set:Has Reference Taxon=Eucalyptus grandis}}
-{{#set:Has Reference Taxon=Fragaria vesca}}
-{{#set:Has Reference Taxon=Glycine max}}
-{{#set:Has Reference Taxon=Manihot esculenta}}
-{{#set:Has Reference Taxon=Medicago trunculata}}
-{{#set:Has Reference Taxon=Mimulus guttatus}}
-{{#set:Has Reference Taxon=Oryza sativa}}
-{{#set:Has Reference Taxon=Physcomitrella patens}}
-{{#set:Has Reference Taxon=Populus trichocarpa}}
-{{#set:Has Reference Taxon=Prunus persica}}
-{{#set:Has Reference Taxon=Ricinus communis}}
-{{#set:Has Reference Taxon=Selaginella moellendorffii}}
-{{#set:Has Reference Taxon=Setaria italica}}
-{{#set:Has Reference Taxon=Sorghum bicolor}}
-{{#set:Has Reference Taxon=Vitis vinifera}}
-{{#set:Has Reference Taxon=Volvox carteri}}
-{{#set:Has Reference Taxon=Zea mays}}
-
+++ /dev/null
-The license text below "----" applies to all files within this distribution, other
-than those that are in a directory which contains files named "LICENSE" or
-"COPYING", or a subdirectory thereof. For those files, the license text contained in
-said file overrides any license information contained in directories of smaller depth.
-Alternative licenses are typically used for software that is provided by external
-parties, and merely packaged with the Data Transfer release for convenience.
-----
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-\f
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-\f
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+++ /dev/null
-<?php
-/**
- * Global functions and constants for the Data Transfer extension.
- *
- * @author Yaron Koren
- * modified by Justin Preece, 05/23/11
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) die();
-
-define( 'DATA_TRANSFER_VERSION', '0.3.8' );
-
-// constants for special properties
-define( 'DT_HAS_XML_GROUPING', 1 );
-define( 'DT_IS_EXCLUDED_FROM_XML', 2 );
-
-$wgExtensionCredits['specialpage'][] = array(
- 'path' => __FILE__,
- 'name' => 'Data Transfer',
- 'version' => DATA_TRANSFER_VERSION,
- 'author' => 'Yaron Koren',
- 'url' => 'http://www.mediawiki.org/wiki/Extension:Data_Transfer',
- 'descriptionmsg' => 'datatransfer-desc',
-);
-
-###
-# This is the path to your installation of Semantic Forms as
-# seen on your local filesystem. Used against some PHP file path
-# issues.
-##
-$dtgIP = dirname( __FILE__ );
-##
-
-// register all special pages and other classes
-$wgAutoloadClasses['DTUtils'] = $dtgIP . '/includes/DT_Utils.php';
-$wgSpecialPages['ViewXML'] = 'DTViewXML';
-$wgAutoloadClasses['DTViewXML'] = $dtgIP . '/specials/DT_ViewXML.php';
-$wgSpecialPages['ImportXML'] = 'DTImportXML';
-$wgAutoloadClasses['DTImportXML'] = $dtgIP . '/specials/DT_ImportXML.php';
-$wgSpecialPages['ImportCSV'] = 'DTImportCSV';
-$wgAutoloadClasses['DTImportCSV'] = $dtgIP . '/specials/DT_ImportCSV.php';
-$wgJobClasses['dtImport'] = 'DTImportJob';
-$wgAutoloadClasses['DTImportJob'] = $dtgIP . '/includes/DT_ImportJob.php';
-$wgAutoloadClasses['DTXMLParser'] = $dtgIP . '/includes/DT_XMLParser.php';
-$wgHooks['AdminLinks'][] = 'dtfAddToAdminLinks';
-$wgHooks['smwInitProperties'][] = 'dtfInitProperties';
-
-###
-# This is the path to your installation of the Data Transfer extension as
-# seen from the web. Change it if required ($wgScriptPath is the
-# path to the base directory of your wiki). No final slash.
-##
-$dtgScriptPath = $wgScriptPath . '/extensions/DataTransfer_PS';
-##
-
-###
-# Permission to import files
-###
-$wgGroupPermissions['sysop']['datatransferimport'] = true;
-$wgAvailableRights[] = 'datatransferimport';
-
-// initialize content language
-require_once($dtgIP . '/languages/DT_Language.php');
-global $wgLanguageCode;
-dtfInitContentLanguage($wgLanguageCode);
-
-$wgExtensionMessagesFiles['DataTransfer'] = $dtgIP . '/languages/DT_Messages.php';
-$wgExtensionAliasesFiles['DataTransfer'] = $dtgIP . '/languages/DT_Aliases.php';
-
-/**********************************************/
-/***** language settings *****/
-/**********************************************/
-
-/**
- * Initialise a global language object for content language. This
- * must happen early on, even before user language is known, to
- * determine labels for additional namespaces. In contrast, messages
- * can be initialised much later when they are actually needed.
- */
-function dtfInitContentLanguage( $langcode ) {
- global $dtgIP, $dtgContLang;
-
- if ( !empty( $dtgContLang ) ) { return; }
-
- $dtContLangClass = 'DT_Language' . str_replace( '-', '_', ucfirst( $langcode ) );
-
- if ( file_exists( $dtgIP . '/languages/' . $dtContLangClass . '.php' ) ) {
- include_once( $dtgIP . '/languages/' . $dtContLangClass . '.php' );
- }
-
- // fallback if language not supported
- if ( !class_exists( $dtContLangClass ) ) {
- include_once( $dtgIP . '/languages/DT_LanguageEn.php' );
- $dtContLangClass = 'DT_LanguageEn';
- }
-
- $dtgContLang = new $dtContLangClass();
-}
-
-/**
- * Initialise the global language object for user language. This
- * must happen after the content language was initialised, since
- * this language is used as a fallback.
- */
-function dtfInitUserLanguage( $langcode ) {
- global $dtgIP, $dtgLang;
-
- if ( !empty( $dtgLang ) ) { return; }
-
- $dtLangClass = 'DT_Language' . str_replace( '-', '_', ucfirst( $langcode ) );
-
- if ( file_exists( $dtgIP . '/languages/' . $dtLangClass . '.php' ) ) {
- include_once( $dtgIP . '/languages/' . $dtLangClass . '.php' );
- }
-
- // fallback if language not supported
- if ( !class_exists( $dtLangClass ) ) {
- global $dtgContLang;
- $dtgLang = $dtgContLang;
- } else {
- $dtgLang = new $dtLangClass();
- }
-}
-
-/**********************************************/
-/***** other global helpers *****/
-/**********************************************/
-
-function dtfInitProperties() {
- global $dtgContLang;
- $dt_props = $dtgContLang->getPropertyLabels();
- SMWPropertyValue::registerProperty( '_DT_XG', '_str', $dt_props[DT_HAS_XML_GROUPING], true );
- // TODO - this should set a "backup" English value as well,
- // so that the phrase "Has XML grouping" works in all languages
- return true;
-}
-
-/**
- * Add links to the 'AdminLinks' special page, defined by the Admin Links
- * extension
- */
-function dtfAddToAdminLinks( $admin_links_tree ) {
- $import_export_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_importexport' ) );
- $main_row = $import_export_section->getRow( 'main' );
- $main_row->addItem( ALItem::newFromSpecialPage( 'ViewXML' ) );
- $main_row->addItem( ALItem::newFromSpecialPage( 'ImportXML' ) );
- $main_row->addItem( ALItem::newFromSpecialPage( 'ImportCSV' ) );
- return true;
-}
+++ /dev/null
-[[Data Transfer 0.3.8]]
-
-Contents:
-* Disclaimer
-* Requirements
-* Installation
-* Contact
-
-== Disclaimer ==
-
-For a proper legal disclaimer, see the file "COPYING".
-
-== Requirements ==
-
-The extension can make use of, but does not require, an install of
-Semantic MediaWiki. If Semantic MediaWiki is used, it must be of
-version 1.0 or greater. For more details, see Semantic MediaWiki's
-own installation requirements.
-
-== Installation ==
-
-(1) Extract the archive to obtain the directory "DataTransfer"
- that contains all relevant files. Copy this directory (or
- extract/download it) to "[wikipath]/extensions/".
-(2) Insert the following line into the file "[wikipath]/LocalSettings.php":
- include_once('extensions/DataTransfer/DataTransfer.php');
-
-== Contact ==
-
-If you have any issues or questions, please send them to
-yaron57@gmail.com.
+++ /dev/null
-== About ==
-
-Data Transfer is an extension to MediaWiki that both exports XML
-based on the current contents of pages in a wiki, and imports pages
-in both XML format (using the same structure as the XML export) and
-CSV format. Both the XML and CSV formats use template calls, and
-the fields within them, to define the data structure. Any text that
-is not within a template calls gets placed into one or more "free
-text" fields.
-
-For more information on Data Transfer, see the extension
-homepage at
-http://www.mediawiki.org/wiki/Extension:Data_Transfer
-
-Notes on installing Data Transfer can be found in the file INSTALL.
-
-== Credits ==
-
-Data Transfer was written by Yaron Koren.
-
-== Contact ==
-
-Comments, questions, suggestions and bug reports should be
-sent to Yaron at yaron57@gmail.com.
+++ /dev/null
-<?php
-
-/**
- * Background job to import a page into the wiki, for use by Data Transfer
- *
- * @author Yaron Koren
- */
-class DTImportJob extends Job {
-
- function __construct( $title, $params = '', $id = 0 ) {
- parent::__construct( 'dtImport', $title, $params, $id );
- }
-
- /**
- * Run a dtImport job
- * @return boolean success
- */
- function run() {
- wfProfileIn( __METHOD__ );
-
- if ( is_null( $this->title ) ) {
- $this->error = "dtImport: Invalid title";
- wfProfileOut( __METHOD__ );
- return false;
- }
-
- $article = new Article( $this->title );
- if ( !$article ) {
- $this->error = 'dtImport: Article not found "' . $this->title->getPrefixedDBkey() . '"';
- wfProfileOut( __METHOD__ );
- return false;
- }
- $for_pages_that_exist = $this->params['for_pages_that_exist'];
- if ( $for_pages_that_exist == 'skip' && $this->title->exists() ) {
- return true;
- }
-
- // change global $wgUser variable to the one specified by
- // the job only for the extent of this import
- global $wgUser;
- $actual_user = $wgUser;
- $wgUser = User::newFromId( $this->params['user_id'] );
- $text = $this->params['text'];
- if ( $for_pages_that_exist == 'append' && $this->title->exists() ) {
- $text = $article->getContent() . "\n" . $text;
- }
- $edit_summary = $this->params['edit_summary'];
- $article->doEdit( $text, $edit_summary );
- $wgUser = $actual_user;
- wfProfileOut( __METHOD__ );
- return true;
- }
-}
+++ /dev/null
-<?php
-
-/**
- * Utility functions for the Data Transfer extension.
- *
- * @author Yaron Koren
- */
-class DTUtils {
-
- /*
- * Loads messages only for MediaWiki versions that need it (< 1.16)
- */
- public static function loadMessages() {
- global $wgVersion;
- if ( version_compare( $wgVersion, '1.16', '<' ) ) {
- wfLoadExtensionMessages( 'SemanticForms' );
- }
- }
-
- static function printImportingMessage() {
- return "\t" . Xml::element( 'p', null, wfMsg( 'dt_import_importing' ) ) . "\n";
- }
-
- static function printFileSelector( $fileType ) {
- $text = "\n\t" . Xml::element( 'p', null, wfMsg( 'dt_import_selectfile', $fileType ) ) . "\n";
- $text .= <<<END
- <p><input type="file" name="file_name" size="25" /></p>
-
-END;
- $text .= "\t" . '<hr style="margin: 10px 0 10px 0" />' . "\n";
- return $text;
- }
-
- static function printExistingPagesHandling() {
- $text = "\t" . Xml::element( 'p', null, wfMsg( 'dt_import_forexisting' ) ) . "\n";
- $existingPagesText = "\n\t" .
- Xml::element( 'input',
- array(
- 'type' => 'radio',
- 'name' => 'pagesThatExist',
- 'value' => 'overwrite',
- 'checked' => 'checked'
- ) ) . "\n" .
- "\t" . wfMsg( 'dt_import_overwriteexisting' ) . "<br />" . "\n" .
- "\t" . Xml::element( 'input',
- array(
- 'type' => 'radio',
- 'name' => 'pagesThatExist',
- 'value' => 'skip',
- ) ) . "\n" .
- "\t" . wfMsg( 'dt_import_skipexisting' ) . "<br />" . "\n" .
- "\t" . Xml::element( 'input',
- array(
- 'type' => 'radio',
- 'name' => 'pagesThatExist',
- 'value' => 'append',
- ) ) . "\n" .
- "\t" . wfMsg( 'dt_import_appendtoexisting' ) . "<br />" . "\n\t";
- $text .= "\t" . Xml::tags( 'p', null, $existingPagesText ) . "\n";
- $text .= "\t" . '<hr style="margin: 10px 0 10px 0" />' . "\n";
- return $text;
- }
-
- static function printImportSummaryInput( $fileType ) {
- $importSummaryText = "\t" . Xml::element( 'input',
- array(
- 'type' => 'text',
- 'id' => 'wpSummary', // ID is necessary for CSS formatting
- 'class' => 'mw-summary',
- 'name' => 'import_summary',
- 'value' => wfMsgForContent( 'dt_import_editsummary', $fileType )
- )
- ) . "\n";
- return "\t" . Xml::tags( 'p', null,
- wfMsg( 'dt_import_summarydesc' ) . "\n" .
- $importSummaryText ) . "\n";
- }
-
- static function printSubmitButton() {
- $formSubmitText = Xml::element( 'input',
- array(
- 'type' => 'submit',
- 'name' => 'import_file',
- 'value' => wfMsg( 'import-interwiki-submit' )
- )
- );
- return "\t" . Xml::tags( 'p', null, $formSubmitText ) . "\n";
- }
-}
+++ /dev/null
-<?php
-/**
- * Classes for parsing XML representing wiki pages and their template calls
- *
- * @author Yaron Koren
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) die();
-
-class DTWikiTemplate {
- private $mName = null;
- private $mFields = array();
-
- public function DTWikiTemplate( $name ) {
- $this->mName = $name;
- }
-
- function addField( $name, $value ) {
- $this->mFields[$name] = $value;
- }
-
- function createText() {
- $multi_line_template = false;
- $text = '{{' . $this->mName;
- foreach ( $this->mFields as $field_name => $field_val ) {
- if ( is_numeric( $field_name ) ) {
- $text .= "|$field_val";
- } else {
- $text .= "\n|$field_name=$field_val";
- $multi_line_template = true;
- }
- }
- if ( $multi_line_template )
- $text .= "\n";
- $text .= '}}' . "\n";
- return $text;
- }
-}
-
-class DTWikiPage {
- private $mPageName = null;
- private $mElements = array();
-
- public function DTWikiPage( $name ) {
- $this->mPageName = $name;
- }
-
- function getName() {
- return $this->mPageName;
- }
-
- function addTemplate( $template ) {
- $this->mElements[] = $template;
- }
-
- function addFreeText( $free_text ) {
- $this->mElements[] = $free_text;
- }
-
- function createText() {
- $text = "";
- foreach ( $this->mElements as $elem ) {
- if ( $elem instanceof DTWikiTemplate ) {
- $text .= $elem->createText();
- } else {
- $text .= $elem;
- }
- }
- return $text;
- }
-}
-
-class DTXMLParser {
- var $mDebug = false;
- var $mSource = null;
- var $mCurFieldName = null;
- var $mCurFieldValue = '';
- var $mCurTemplate = null;
- var $mCurPage = null; // new DTWikiPage();
- var $mPages = array();
-
- function __construct( $source ) {
- $this->mSource = $source;
- }
-
- function debug( $text ) {
- // print "$text. ";
- }
-
- function throwXMLerror( $text ) {
- print htmlspecialchars( $text );
- }
-
- function doParse() {
- $parser = xml_parser_create( "UTF-8" );
-
- # case folding violates XML standard, turn it off
- xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
-
- xml_set_object( $parser, $this );
- xml_set_element_handler( $parser, "in_start", "" );
-
- $offset = 0; // for context extraction on error reporting
- do {
- $chunk = $this->mSource->readChunk();
- if ( !xml_parse( $parser, $chunk, $this->mSource->atEnd() ) ) {
- wfDebug( "WikiImporter::doImport encountered XML parsing error\n" );
- // return new WikiXmlError( $parser, wfMsgHtml( 'import-parse-failure' ), $chunk, $offset );
- }
- $offset += strlen( $chunk );
- } while ( $chunk !== false && !$this->mSource->atEnd() );
- xml_parser_free( $parser );
- }
-
- function donothing( $parser, $x, $y = "" ) {
- # $this->debug( "donothing" );
- }
-
-
- function in_start( $parser, $name, $attribs ) {
- // $this->debug( "in_start $name" );
- $pages_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_pages' ) );
- if ( $name != $pages_str ) {
- print( "Expected '$pages_str', got '$name'" );
- }
- xml_set_element_handler( $parser, "in_pages", "out_pages" );
- }
-
- function in_pages( $parser, $name, $attribs ) {
- $this->debug( "in_pages $name" );
- $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
- if ( $name == $page_str ) {
- $title_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_title' ) );
- if ( array_key_exists( $title_str, $attribs ) ) {
- $this->mCurPage = new DTWikiPage( $attribs[$title_str] );
- xml_set_element_handler( $parser, "in_page", "out_page" );
- } else {
- return $this->throwXMLerror( "'$title_str' attribute missing for page" );
- }
- } else {
- return $this->throwXMLerror( "Expected <$page_str>, got <$name>" );
- }
- }
-
- function out_pages( $parser, $name ) {
- $this->debug( "out_pages $name" );
- $pages_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_pages' ) );
-/*
- if( $name != $pages_str ) {
- return $this->throwXMLerror( "Expected </pages>, got </$name>" );
- }
-*/
- xml_set_element_handler( $parser, "donothing", "donothing" );
- }
-
- function in_category( $parser, $name, $attribs ) {
- $this->debug( "in_category $name" );
- $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
- if ( $name == $page_str ) {
- if ( array_key_exists( $title_str, $attribs ) ) {
- $this->mCurPage = new DTWikiPage( $attribs[$title_str] );
- xml_set_element_handler( $parser, "in_page", "out_page" );
- } else {
- return $this->throwXMLerror( "'$title_str' attribute missing for page" );
- }
- } else {
- return $this->throwXMLerror( "Expected <$page_str>, got <$name>" );
- }
- }
-
- function out_category( $parser, $name ) {
- $this->debug( "out_category $name" );
- if ( $name != "category" ) {
- return $this->throwXMLerror( "Expected </category>, got </$name>" );
- }
- xml_set_element_handler( $parser, "donothing", "donothing" );
- }
-
- function in_page( $parser, $name, $attribs ) {
- $this->debug( "in_page $name" );
- $template_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_template' ) );
- $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
- $free_text_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_freetext' ) );
- if ( $name == $template_str ) {
- if ( array_key_exists( $name_str, $attribs ) ) {
- $this->mCurTemplate = new DTWikiTemplate( $attribs[$name_str] );
- xml_set_element_handler( $parser, "in_template", "out_template" );
- } else {
- return $this->throwXMLerror( "'$name_str' attribute missing for template" );
- }
- } elseif ( $name == $free_text_str ) {
- xml_set_element_handler( $parser, "in_freetext", "out_freetext" );
- xml_set_character_data_handler( $parser, "freetext_value" );
- } else {
- return $this->throwXMLerror( "Expected <$template_str>, got <$name>" );
- }
- }
-
- function out_page( $parser, $name ) {
- $this->debug( "out_page $name" );
- $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
- if ( $name != $page_str ) {
- return $this->throwXMLerror( "Expected </$page_str>, got </$name>" );
- }
- $this->mPages[] = $this->mCurPage;
- xml_set_element_handler( $parser, "in_pages", "out_pages" );
- }
-
- function in_template( $parser, $name, $attribs ) {
- $this->debug( "in_template $name" );
- $field_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_field' ) );
- if ( $name == $field_str ) {
- $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
- if ( array_key_exists( $name_str, $attribs ) ) {
- $this->mCurFieldName = $attribs[$name_str];
- // $this->push( $name );
- $this->workRevisionCount = 0;
- $this->workSuccessCount = 0;
- $this->uploadCount = 0;
- $this->uploadSuccessCount = 0;
- xml_set_element_handler( $parser, "in_field", "out_field" );
- xml_set_character_data_handler( $parser, "field_value" );
- } else {
- return $this->throwXMLerror( "'$name_str' attribute missing for field" );
- }
- } else {
- return $this->throwXMLerror( "Expected <$field_str>, got <$name>" );
- }
- }
-
- function out_template( $parser, $name ) {
- $this->debug( "out_template $name" );
- $template_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_template' ) );
- if ( $name != $template_str ) {
- return $this->throwXMLerror( "Expected </$template_str>, got </$name>" );
- }
- $this->mCurPage->addTemplate( $this->mCurTemplate );
- xml_set_element_handler( $parser, "in_page", "out_page" );
- }
-
- function in_field( $parser, $name, $attribs ) {
- // xml_set_element_handler( $parser, "donothing", "donothing" );
- }
-
- function out_field( $parser, $name ) {
- $this->debug( "out_field $name" );
- $field_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_field' ) );
- if ( $name == $field_str ) {
- $this->mCurTemplate->addField( $this->mCurFieldName, $this->mCurFieldValue );
- $this->mCurFieldValue = '';
- } else {
- return $this->throwXMLerror( "Expected </$field_str>, got </$name>" );
- }
- xml_set_element_handler( $parser, "in_template", "out_template" );
- }
-
- function field_value( $parser, $data ) {
- $this->mCurFieldValue .= $data;
- }
-
- function in_freetext( $parser, $name, $attribs ) {
- // xml_set_element_handler( $parser, "donothing", "donothing" );
- }
-
- function out_freetext( $parser, $name ) {
- xml_set_element_handler( $parser, "in_page", "out_page" );
- }
-
- function freetext_value( $parser, $data ) {
- $this->mCurPage->addFreeText( $data );
- }
-
-}
+++ /dev/null
-<?php
-/**
- * Aliases for special pages
- *
- * @file
- * @ingroup Extensions
- */
-
-$specialPageAliases = array();
-
-/** English (English) */
-$specialPageAliases['en'] = array(
- 'ImportCSV' => array( 'ImportCSV' ),
- 'ImportXML' => array( 'ImportXML' ),
- 'ViewXML' => array( 'ViewXML' ),
-);
-
-/** Afrikaans (Afrikaans) */
-$specialPageAliases['af'] = array(
- 'ViewXML' => array( 'WysXML' ),
-);
-
-/** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
- 'ViewXML' => array( 'عرض_إكس_إم_إل' ),
-);
-
-/** Egyptian Spoken Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
- 'ViewXML' => array( 'عرض_XML' ),
-);
-
-/** Breton (Brezhoneg) */
-$specialPageAliases['br'] = array(
- 'ViewXML' => array( 'GweletXML' ),
-);
-
-/** Bosnian (Bosanski) */
-$specialPageAliases['bs'] = array(
- 'ViewXML' => array( 'VidiXML' ),
-);
-
-/** German (Deutsch) */
-$specialPageAliases['de'] = array(
- 'ImportCSV' => array( 'CSV_importieren' ),
- 'ImportXML' => array( 'XML_importieren' ),
- 'ViewXML' => array( 'XML_anzeigen' ),
-);
-
-/** Esperanto (Esperanto) */
-$specialPageAliases['eo'] = array(
- 'ViewXML' => array( 'Montri_XML' ),
-);
-
-/** Spanish (Español) */
-$specialPageAliases['es'] = array(
- 'ViewXML' => array( 'Ver_XML', 'VerXML' ),
-);
-
-/** Basque (Euskara) */
-$specialPageAliases['eu'] = array(
- 'ViewXML' => array( 'XMLIkusi' ),
-);
-
-/** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
- 'ImportCSV' => array( 'درونریزی_سیاسوی' ),
- 'ImportXML' => array( 'درونریزی_اکسامال' ),
- 'ViewXML' => array( 'مشاهده_اکسامال' ),
-);
-
-/** Finnish (Suomi) */
-$specialPageAliases['fi'] = array(
- 'ImportCSV' => array( 'Tuo_CSV' ),
- 'ImportXML' => array( 'Tuo_XML' ),
- 'ViewXML' => array( 'Näytä_XML' ),
-);
-
-/** French (Français) */
-$specialPageAliases['fr'] = array(
- 'ImportCSV' => array( 'Importer_CVS', 'ImporterCVS' ),
- 'ImportXML' => array( 'Importer_XML', 'ImporterXML' ),
- 'ViewXML' => array( 'Voir_le_XML', 'Voir_XML', 'VoirXML' ),
-);
-
-/** Franco-Provençal (Arpetan) */
-$specialPageAliases['frp'] = array(
- 'ViewXML' => array( 'Vêre_lo_XML', 'VêreLoXML' ),
-);
-
-/** Galician (Galego) */
-$specialPageAliases['gl'] = array(
- 'ViewXML' => array( 'Ver XML' ),
-);
-
-/** Swiss German (Alemannisch) */
-$specialPageAliases['gsw'] = array(
- 'ViewXML' => array( 'Lueg XML' ),
-);
-
-/** Gujarati (ગુજરાતી) */
-$specialPageAliases['gu'] = array(
- 'ViewXML' => array( 'XMLજુઓ' ),
-);
-
-/** Hungarian (Magyar) */
-$specialPageAliases['hu'] = array(
- 'ViewXML' => array( 'XML_megtekintése' ),
-);
-
-/** Interlingua (Interlingua) */
-$specialPageAliases['ia'] = array(
- 'ImportCSV' => array( 'Importar_CSV' ),
- 'ImportXML' => array( 'Importar_XML' ),
- 'ViewXML' => array( 'Visualisar_XML' ),
-);
-
-/** Indonesian (Bahasa Indonesia) */
-$specialPageAliases['id'] = array(
- 'ViewXML' => array( 'Lihat_XML', 'LihatXML' ),
-);
-
-/** Italian (Italiano) */
-$specialPageAliases['it'] = array(
- 'ImportCSV' => array( 'ImportaCSV' ),
- 'ImportXML' => array( 'ImportaXML' ),
- 'ViewXML' => array( 'VediXML' ),
-);
-
-/** Japanese (日本語) */
-$specialPageAliases['ja'] = array(
- 'ImportCSV' => array( 'CSVインポート' ),
- 'ImportXML' => array( 'XMLインポート' ),
- 'ViewXML' => array( 'XML表示', 'XML表示' ),
-);
-
-/** Khmer (ភាសាខ្មែរ) */
-$specialPageAliases['km'] = array(
- 'ViewXML' => array( 'មើលXML' ),
-);
-
-/** Colognian (Ripoarisch) */
-$specialPageAliases['ksh'] = array(
- 'ImportCSV' => array( 'CSV_Empotteere' ),
- 'ImportXML' => array( 'XML_Empoteere' ),
- 'ViewXML' => array( 'XML_beloore' ),
-);
-
-/** Ladino (Ladino) */
-$specialPageAliases['lad'] = array(
- 'ImportCSV' => array( 'Aktarear_CSV_Ariento' ),
- 'ImportXML' => array( 'Aktarear_XML_Ariento' ),
- 'ViewXML' => array( 'Ver_XML' ),
-);
-
-/** Luxembourgish (Lëtzebuergesch) */
-$specialPageAliases['lb'] = array(
- 'ImportCSV' => array( 'CSV_importéieren' ),
- 'ImportXML' => array( 'XML_importéieren' ),
- 'ViewXML' => array( 'XML_weisen' ),
-);
-
-/** Macedonian (Македонски) */
-$specialPageAliases['mk'] = array(
- 'ViewXML' => array( 'ВидиXML' ),
-);
-
-/** Malayalam (മലയാളം) */
-$specialPageAliases['ml'] = array(
- 'ImportCSV' => array( 'സി.എസ്.വി.ഇറക്കുമതി' ),
- 'ImportXML' => array( 'എക്സ്.എം.എൽ.ഇറക്കുമതി' ),
- 'ViewXML' => array( 'എക്സ്.എം.എൽ.കാണുക' ),
-);
-
-/** Marathi (मराठी) */
-$specialPageAliases['mr'] = array(
- 'ViewXML' => array( 'XMLपहा' ),
-);
-
-/** Maltese (Malti) */
-$specialPageAliases['mt'] = array(
- 'ViewXML' => array( 'UriXML' ),
-);
-
-/** Nedersaksisch (Nedersaksisch) */
-$specialPageAliases['nds-nl'] = array(
- 'ViewXML' => array( 'XML_bekieken' ),
-);
-
-/** Dutch (Nederlands) */
-$specialPageAliases['nl'] = array(
- 'ImportCSV' => array( 'CSVImporteren' ),
- 'ImportXML' => array( 'XMLImporteren' ),
- 'ViewXML' => array( 'XMLBekijken' ),
-);
-
-/** Norwegian (bokmål) (Norsk (bokmål)) */
-$specialPageAliases['no'] = array(
- 'ViewXML' => array( 'Vis_XML' ),
-);
-
-/** Occitan (Occitan) */
-$specialPageAliases['oc'] = array(
- 'ViewXML' => array( 'Veire_XML', 'VeireXML' ),
-);
-
-/** Polish (Polski) */
-$specialPageAliases['pl'] = array(
- 'ViewXML' => array( 'XML' ),
-);
-
-/** Portuguese (Português) */
-$specialPageAliases['pt'] = array(
- 'ViewXML' => array( 'Ver_XML' ),
-);
-
-/** Romanian (Română) */
-$specialPageAliases['ro'] = array(
- 'ImportCSV' => array( 'Import_CSV', 'ImportCSV' ),
- 'ImportXML' => array( 'Import_XML', 'ImportXML' ),
- 'ViewXML' => array( 'Vizualizare_XML' ),
-);
-
-/** Sanskrit (संस्कृत) */
-$specialPageAliases['sa'] = array(
- 'ViewXML' => array( 'XMLपश्यति' ),
-);
-
-/** Slovak (Slovenčina) */
-$specialPageAliases['sk'] = array(
- 'ViewXML' => array( 'ZobraziťXML' ),
-);
-
-/** Albanian (Shqip) */
-$specialPageAliases['sq'] = array(
- 'ViewXML' => array( 'ShihXML' ),
-);
-
-/** Swedish (Svenska) */
-$specialPageAliases['sv'] = array(
- 'ViewXML' => array( 'Visa_XML' ),
-);
-
-/** Swahili (Kiswahili) */
-$specialPageAliases['sw'] = array(
- 'ViewXML' => array( 'OnyeshaXML' ),
-);
-
-/** Tagalog (Tagalog) */
-$specialPageAliases['tl'] = array(
- 'ViewXML' => array( 'Tingnan ang XML' ),
-);
-
-/** Turkish (Türkçe) */
-$specialPageAliases['tr'] = array(
- 'ViewXML' => array( 'XMLGör' ),
-);
-
-/** Татарча (Татарча) */
-$specialPageAliases['tt-cyrl'] = array(
- 'ImportCSV' => array( 'CSV_импорт' ),
- 'ImportXML' => array( 'XML_импорт' ),
- 'ViewXML' => array( 'XML_иттереп_ачу' ),
-);
-
-/** Vèneto (Vèneto) */
-$specialPageAliases['vec'] = array(
- 'ViewXML' => array( 'VardaXML' ),
-);
-
-/**
- * For backwards compatibility with MediaWiki 1.15 and earlier.
- */
-$aliases =& $specialPageAliases;
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * @author Yaron Koren
- */
-
-/**
- * Base class for all language classes - heavily based on Semantic MediaWiki's
- * 'SMW_Language' class
- */
-abstract class DT_Language {
-
- protected $m_SpecialProperties;
-
- // By default, every language has English-language aliases for
- // special properties
- protected $m_SpecialPropertyAliases = array(
- 'Has XML grouping' => DT_SP_HAS_XML_GROUPING,
- 'Excluded from XML' => DT_SP_IS_EXCLUDED_FROM_XML,
- );
-
- /**
- * Function that returns the labels for the special properties.
- */
- function getPropertyLabels() {
- return $this->m_SpecialProperties;
- }
-
- /**
- * Aliases for special properties, if any.
- */
- function getPropertyAliases() {
- return $this->m_SpecialPropertyAliases;
- }
-}
+++ /dev/null
-<?php
-/**
- * @author Yaron Koren
- */
-
-class DT_LanguageEn extends DT_Language {
-
-/* private */ var $m_SpecialProperties = array(
- DT_SP_HAS_XML_GROUPING => 'Has XML grouping',
- DT_SP_IS_EXCLUDED_FROM_XML => 'Excluded from XML'
-);
-
-}
+++ /dev/null
-<?php
-/**
- * Internationalization file for the Data Transfer extension
- *
- * @file
- * @ingroup Extensions
- */
-
-$messages = array();
-
-/** English
- * @author Yaron Koren
- */
-$messages['en'] = array(
- 'datatransfer-desc' => 'Allows for importing and exporting data contained in template calls',
- 'viewxml' => 'View XML',
- 'dt_viewxml_docu' => 'Please select among the following categories and namespaces to view in XML format.',
- 'dt_viewxml_categories' => 'Categories',
- 'dt_viewxml_namespaces' => 'Namespaces',
- 'dt_viewxml_simplifiedformat' => 'Simplified format',
- 'dt_xml_namespace' => 'Namespace',
- 'dt_xml_pages' => 'Pages',
- 'dt_xml_page' => 'Page',
- 'dt_xml_template' => 'Template',
- 'dt_xml_field' => 'Field',
- 'dt_xml_name' => 'Name',
- 'dt_xml_title' => 'Title',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Free Text',
- 'importxml' => 'Import XML',
- 'dt_import_selectfile' => 'Please select the $1 file to import:',
- 'dt_import_encodingtype' => 'Encoding type:',
- 'dt_import_forexisting' => 'For pages that already exist:',
- 'dt_import_overwriteexisting' => 'Overwrite existing content',
- 'dt_import_skipexisting' => 'Skip',
- 'dt_import_appendtoexisting' => 'Append to existing content',
- 'dt_import_summarydesc' => 'Summary of import:',
- 'dt_import_editsummary' => '$1 import',
- 'dt_import_importing' => 'Importing...',
- 'dt_import_success' => '$1 {{PLURAL:$1|page|pages}} will be created from the $2 file.',
- 'importcsv' => 'Import CSV',
- 'dt_importcsv_badheader' => "Error: the column $1 header, '$2', must be either '$3', '$4' or of the form 'template_name[field_name]'",
- 'right-datatransferimport' => 'Import data',
-);
-
-/** Message documentation (Message documentation)
- * @author EugeneZelenko
- * @author Fryed-peach
- * @author Jon Harald Søby
- * @author Purodha
- * @author Raymond
- * @author Siebrand
- */
-$messages['qqq'] = array(
- 'datatransfer-desc' => 'Extension description displayed on [[Special:Version]].',
- 'dt_viewxml_categories' => '{{Identical|Categories}}',
- 'dt_viewxml_namespaces' => '{{Identical|Namespaces}}',
- 'dt_xml_namespace' => '{{Identical|Namespace}}
-Used as XML tag name.',
- 'dt_xml_pages' => '{{Identical|Pages}}
-
-Used as XML tag name.',
- 'dt_xml_page' => '{{Identical|Page}}
-Used as XML tag name.',
- 'dt_xml_template' => '{{Identical|Template}}
-Used as XML tag name.',
- 'dt_xml_field' => '{{Identical|Field}}
-Used as XML tag name.',
- 'dt_xml_name' => '{{Identical|Name}}
-
-Used as XML tag name.',
- 'dt_xml_title' => '{{Identical|Title}}
-Used as XML tag name.',
- 'dt_xml_id' => '{{Identical|ID}}
-
-Used as XML tag name.',
- 'dt_xml_freetext' => '{{Identical|Free text}}
-Used as XML tag name.',
- 'dt_import_selectfile' => '$1 is the file format: either CSV or XML',
- 'dt_import_encodingtype' => 'The type of encoding for the file: either UTF-8 or UTF-16',
- 'dt_import_skipexisting' => '{{Identical|Skip}}',
- 'dt_import_editsummary' => '$1 is the file format: either CSV or XML',
- 'dt_import_success' => 'Parameters:
-* $1 is the number of pages
-* $2 is the file format: either CSV or XML',
- 'dt_importcsv_badheader' => 'The text "template_name[field_name]" can be translated.
-*$1 is a column number in the first row of the CVS file
-*$2 is the value found for the $1th colomn in the first line of the CSV file
-*$3 is the title label
-*$4 is a free text label',
- 'right-datatransferimport' => '{{doc-right}}',
-);
-
-/** Faeag Rotuma (Faeag Rotuma)
- * @author Jose77
- */
-$messages['rtm'] = array(
- 'dt_viewxml_categories' => 'Katekori',
-);
-
-/** Afrikaans (Afrikaans)
- * @author Arnobarnard
- * @author Naudefj
- */
-$messages['af'] = array(
- 'datatransfer-desc' => 'Maak die laai en ontlaai van gestruktureerde gegewens in sjabloonaanroepe moontlik',
- 'viewxml' => 'Sien XML',
- 'dt_viewxml_docu' => 'Kies een van die volgende kategorieë en naamruimtes om in XML-formaat te sien.',
- 'dt_viewxml_categories' => 'Ketagorieë',
- 'dt_viewxml_namespaces' => 'Naamruimtes',
- 'dt_viewxml_simplifiedformat' => 'Vereenvoudigde formaat',
- 'dt_xml_namespace' => 'Naamruimte',
- 'dt_xml_pages' => 'Bladsye',
- 'dt_xml_page' => 'Bladsy',
- 'dt_xml_template' => 'Sjabloon',
- 'dt_xml_field' => 'Veld',
- 'dt_xml_name' => 'Naam',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Vrye teks',
- 'importxml' => 'Laai XML',
- 'dt_import_selectfile' => 'Kies die $1 lêer om te laai:',
- 'dt_import_encodingtype' => 'Enkoderingstipe:',
- 'dt_import_skipexisting' => 'Slaan oor',
- 'dt_import_editsummary' => '$1-laai',
- 'dt_import_importing' => 'Besig om te laai...',
- 'dt_import_success' => '$1 {{PLURAL:$1|bladsy|bladsye}} sal geskep word vanaf die lêer $2.',
- 'importcsv' => 'Laai CSV',
- 'dt_importcsv_badheader' => 'Fout: Die opskrif van kolom $1, "$2", moet "$3" of "$4" wees, of in die vorm "sjabloonnaam[veldnaam]" genoteer word.',
- 'right-datatransferimport' => 'Laai data',
-);
-
-/** Gheg Albanian (Gegë)
- * @author Mdupont
- */
-$messages['aln'] = array(
- 'datatransfer-desc' => 'Lejon për import dhe eksport të dhënave të përmbajtura në modelin e quan',
- 'viewxml' => 'Shiko XML',
- 'dt_viewxml_docu' => 'Ju lutem zgjidhni midis kategorive të mëposhtme dhe hapësira për të parë në formatin XML.',
- 'dt_viewxml_categories' => 'Kategoritë',
- 'dt_viewxml_namespaces' => 'Hapësira',
- 'dt_viewxml_simplifiedformat' => 'Formati i thjeshtuar',
- 'dt_xml_namespace' => 'Hapësira',
- 'dt_xml_pages' => 'Faqet',
- 'dt_xml_page' => 'Faqe',
- 'dt_xml_template' => 'Shabllon',
- 'dt_xml_field' => 'Fushë',
- 'dt_xml_name' => 'Emër',
- 'dt_xml_title' => 'Titull',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Free Tekst',
- 'importxml' => 'Importi XML',
- 'dt_import_selectfile' => 'Ju lutem përzgjidhni kartelën $1 për të importuar:',
- 'dt_import_encodingtype' => 'Encoding lloj:',
- 'dt_import_editsummary' => '$1 importit',
- 'dt_import_importing' => 'Importimi ...',
- 'dt_import_success' => '$1 {{PLURAL:$1|faqe|faqe}} do të krijohet nga file $2.',
- 'importcsv' => 'Importi CSV',
- 'dt_importcsv_badheader' => "Gabim: $1 column header, '$2', duhet të jenë ose '$3', '$4' ose të formës 'template_name [field_name]'",
- 'right-datatransferimport' => 'Të dhënat e importit',
-);
-
-/** Amharic (አማርኛ)
- * @author Codex Sinaiticus
- */
-$messages['am'] = array(
- 'dt_viewxml_categories' => 'መደቦች',
- 'dt_viewxml_namespaces' => 'ክፍለ-ዊኪዎች',
- 'dt_xml_namespace' => 'ክፍለ-ዊኪ',
- 'dt_xml_name' => 'ስም',
- 'dt_xml_title' => 'አርዕስት',
-);
-
-/** Aragonese (Aragonés)
- * @author Juanpabl
- * @author Remember the dot
- */
-$messages['an'] = array(
- 'dt_viewxml_namespaces' => 'Espacios de nombres',
- 'dt_xml_namespace' => 'Espacio de nombres',
- 'dt_xml_page' => 'Pachina',
- 'dt_xml_template' => 'Plantilla',
- 'dt_xml_name' => 'Nombre',
-);
-
-/** Arabic (العربية)
- * @author Meno25
- * @author OsamaK
- */
-$messages['ar'] = array(
- 'datatransfer-desc' => 'يسمح باستيراد وتصدير بيانات محتواة في استدعاءات قالب',
- 'viewxml' => 'عرض XML',
- 'dt_viewxml_docu' => 'من فضلك اختر من بين التصنيفات والنطاقات التالية للعرض في صيغة XML.',
- 'dt_viewxml_categories' => 'تصنيفات',
- 'dt_viewxml_namespaces' => 'نطاقات',
- 'dt_viewxml_simplifiedformat' => 'صيغة مبسطة',
- 'dt_xml_namespace' => 'نطاق',
- 'dt_xml_pages' => 'صفحات',
- 'dt_xml_page' => 'صفحة',
- 'dt_xml_template' => 'قالب',
- 'dt_xml_field' => 'حقل',
- 'dt_xml_name' => 'اسم',
- 'dt_xml_title' => 'عنوان',
- 'dt_xml_id' => 'رقم',
- 'dt_xml_freetext' => 'نص حر',
- 'importxml' => 'استيراد XML',
- 'dt_import_selectfile' => 'من فضلك اختر ملف $1 للاستيراد:',
- 'dt_import_encodingtype' => 'نوع الترميز:',
- 'dt_import_editsummary' => 'استيراد $1',
- 'dt_import_importing' => 'جاري الاستيراد...',
- 'dt_import_success' => 'سوف تُنشأ {{PLURAL:$1||صفحة واحدة|صفحتين|$1 صفحات|$1 صفحة}} من ملف $2.',
- 'importcsv' => 'استورد CSV',
- 'dt_importcsv_badheader' => "خطأ: عنوان العامود $1، '$2'، يجب أن يكون إما '$3'، '$4' أو من الصيغة 'template_name[field_name]'",
- 'right-datatransferimport' => 'استورد بيانات',
-);
-
-/** Aramaic (ܐܪܡܝܐ)
- * @author Basharh
- */
-$messages['arc'] = array(
- 'dt_viewxml_categories' => 'ܣܕܪ̈ܐ',
- 'dt_viewxml_namespaces' => 'ܚܩܠܬ̈ܐ',
- 'dt_xml_namespace' => 'ܚܩܠܐ',
- 'dt_xml_pages' => 'ܕ̈ܦܐ',
- 'dt_xml_page' => 'ܕܦܐ',
- 'dt_xml_template' => 'ܩܠܒܐ',
- 'dt_xml_name' => 'ܫܡܐ',
- 'dt_xml_title' => 'ܟܘܢܝܐ',
- 'dt_xml_id' => 'ܗܝܝܘܬܐ',
- 'dt_import_summarydesc' => 'ܦܣܝܩܬ̈ܐ ܕܡܥܠܢܘܬܐ:',
- 'right-datatransferimport' => 'ܡܥܠܢܘܬܐ ܕܓܠܝܬ̈ܐ',
-);
-
-/** Araucanian (Mapudungun)
- * @author Remember the dot
- */
-$messages['arn'] = array(
- 'dt_xml_page' => 'Pakina',
-);
-
-/** Egyptian Spoken Arabic (مصرى)
- * @author Dudi
- * @author Ghaly
- * @author Meno25
- */
-$messages['arz'] = array(
- 'datatransfer-desc' => 'بيسمح بـ import و export للداتا اللى جوّا القالب',
- 'viewxml' => 'شوف XML',
- 'dt_viewxml_docu' => 'لو سمحت اختار من التصانيف و اسامى المساحات الجايه علشان العرض فى XML format.',
- 'dt_viewxml_categories' => 'تصانيف',
- 'dt_viewxml_namespaces' => 'مساحات اسامى',
- 'dt_viewxml_simplifiedformat' => 'format متبسطه',
- 'dt_xml_namespace' => 'اسم مساحه',
- 'dt_xml_pages' => 'صفح',
- 'dt_xml_page' => 'صفحه',
- 'dt_xml_template' => 'قالب',
- 'dt_xml_field' => 'حقل',
- 'dt_xml_name' => 'اسم',
- 'dt_xml_title' => 'عنوان',
- 'dt_xml_id' => 'رقم',
- 'dt_xml_freetext' => 'نص حر',
- 'dt_import_selectfile' => 'لو سمحت اختار فايل $1 علشان تعمل import:',
- 'dt_import_editsummary' => 'استوراد $1',
- 'dt_import_success' => '$1 {{PLURAL:$1|صفحه|صفحه}} ح يتعملو من الفايل $2.',
-);
-
-/** Belarusian (Беларуская)
- * @author Тест
- */
-$messages['be'] = array(
- 'dt_viewxml_categories' => 'Катэгорыі',
- 'dt_xml_template' => 'Шаблон',
-);
-
-/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
- * @author EugeneZelenko
- * @author Jim-by
- * @author Wizardist
- */
-$messages['be-tarask'] = array(
- 'datatransfer-desc' => 'Дазваляе імпартаваць і экспартаваць зьвесткі, якія ўтрымліваюцца ў выкліках шаблёнах',
- 'viewxml' => 'Паказаць XML',
- 'dt_viewxml_docu' => 'Калі ласка, выберыце што праглядаць у фармаце XML сярод наступных катэгорыяў і прастораў назваў.',
- 'dt_viewxml_categories' => 'Катэгорыі',
- 'dt_viewxml_namespaces' => 'Прасторы назваў',
- 'dt_viewxml_simplifiedformat' => 'Спрошчаны фармат',
- 'dt_xml_namespace' => 'Прастора назваў',
- 'dt_xml_pages' => 'Старонкі',
- 'dt_xml_page' => 'Старонка',
- 'dt_xml_template' => 'Шаблён',
- 'dt_xml_field' => 'Поле',
- 'dt_xml_name' => 'Назва',
- 'dt_xml_title' => 'Назва',
- 'dt_xml_id' => 'Ідэнтыфікатар',
- 'dt_xml_freetext' => 'Вольны тэкст',
- 'importxml' => 'Імпарт XML',
- 'dt_import_selectfile' => 'Калі ласка, выберыце файл у фармаце $1 для імпарту:',
- 'dt_import_encodingtype' => 'Тып кадыроўкі:',
- 'dt_import_forexisting' => 'Для старонак якія ўжо існуюць:',
- 'dt_import_overwriteexisting' => 'Перазапісваць існуючы зьмест',
- 'dt_import_skipexisting' => 'Прапускаць',
- 'dt_import_appendtoexisting' => 'Далучаць да існуючага зьместу',
- 'dt_import_summarydesc' => 'Кароткае апісаньне імпарту:',
- 'dt_import_editsummary' => 'імпарт $1',
- 'dt_import_importing' => 'Імпартаваньне...',
- 'dt_import_success' => '$1 {{PLURAL:$1|старонка будзе|старонкі будуць|старонак будзе}} створана з файла ў фармаце $2.',
- 'importcsv' => 'Імпарт CSV',
- 'dt_importcsv_badheader' => "Памылка: загаловак слупка $1, '$2', павінен быць адным з '$3', '$4' альбо у форме 'назва_шаблёну[назва_поля]'",
- 'right-datatransferimport' => 'імпарт зьвестак',
-);
-
-/** Bulgarian (Български)
- * @author DCLXVI
- */
-$messages['bg'] = array(
- 'viewxml' => 'Преглед на XML',
- 'dt_viewxml_categories' => 'Категории',
- 'dt_viewxml_namespaces' => 'Именни пространства',
- 'dt_viewxml_simplifiedformat' => 'Опростен формат',
- 'dt_xml_namespace' => 'Именно пространство',
- 'dt_xml_pages' => 'Страници',
- 'dt_xml_page' => 'Страница',
- 'dt_xml_template' => 'Шаблон',
- 'dt_xml_field' => 'Поле',
- 'dt_xml_name' => 'Име',
- 'dt_xml_title' => 'Заглавие',
- 'dt_xml_id' => 'Номер',
- 'dt_xml_freetext' => 'Свободен текст',
- 'importxml' => 'Внасяне на XML',
- 'dt_import_importing' => 'Внасяне...',
- 'importcsv' => 'Внасяне на CSV',
- 'right-datatransferimport' => 'Внасяне на данни',
-);
-
-/** Breton (Brezhoneg)
- * @author Fohanno
- * @author Fulup
- * @author Gwendal
- * @author Y-M D
- */
-$messages['br'] = array(
- 'datatransfer-desc' => 'Aotreañ a ra da enporzhiañ hag ezporzhiañ roadennoù eus galvoù patromoù',
- 'viewxml' => 'Gwelet XML',
- 'dt_viewxml_docu' => 'Dibabit e-touez ar rummadoù hag an esaouennoù anv da heul evit gwelet er furmad XML.',
- 'dt_viewxml_categories' => 'Rummadoù',
- 'dt_viewxml_namespaces' => 'Esaouennoù anv',
- 'dt_viewxml_simplifiedformat' => 'Furmad eeunaet',
- 'dt_xml_namespace' => 'Esaouenn anv',
- 'dt_xml_pages' => 'Pajennoù',
- 'dt_xml_page' => 'Pajenn',
- 'dt_xml_template' => 'Patrom',
- 'dt_xml_field' => 'Maezienn',
- 'dt_xml_name' => 'Anv',
- 'dt_xml_title' => 'Titl',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Testenn dieub',
- 'importxml' => 'Enporzhiañ XML',
- 'dt_import_selectfile' => 'Dibabit ar restr $1 da enporzhiañ :',
- 'dt_import_encodingtype' => 'Seurt enkodadur :',
- 'dt_import_forexisting' => 'Evit pajennoù zo anezho dija :',
- 'dt_import_overwriteexisting' => "erlec'hiañ an endalc'had zo anezhañ dija",
- 'dt_import_skipexisting' => 'Lezel a-gostez',
- 'dt_import_appendtoexisting' => "Ouzhpennañ d'an endalc'had zo anezhañ dija",
- 'dt_import_summarydesc' => 'Diverradenn an enporzh :',
- 'dt_import_editsummary' => 'Enporzhiadur $1',
- 'dt_import_importing' => "Oc'h enporzhiañ...",
- 'dt_import_success' => '$1 {{PLURAL:$1|bajenn|pajenn}} a vo krouet diwar ar restr $2.',
- 'importcsv' => 'Enporzh CSV',
- 'dt_importcsv_badheader' => 'Fazi : titl ar bann $1, "$2", a rank bezañ "$3", "$4" pe gant ar stumm "anv_ar_patrom[anv_ar_vaezienn]"',
- 'right-datatransferimport' => 'Enporzhiañ roadennoù',
-);
-
-/** Bosnian (Bosanski)
- * @author CERminator
- */
-$messages['bs'] = array(
- 'datatransfer-desc' => 'Omogućuje uvoz i izvoz podataka koji su sadržani u pozivima šablona',
- 'viewxml' => 'Pregledaj XML',
- 'dt_viewxml_docu' => 'Molimo Vas odaberite unutar slijedećih kategorija i imenskih prostora za pregled u XML formatu.',
- 'dt_viewxml_categories' => 'Kategorije',
- 'dt_viewxml_namespaces' => 'Imenski prostori',
- 'dt_viewxml_simplifiedformat' => 'Pojednostavljeni format',
- 'dt_xml_namespace' => 'Imenski prostor',
- 'dt_xml_pages' => 'Stranice',
- 'dt_xml_page' => 'Stranica',
- 'dt_xml_template' => 'Šablon',
- 'dt_xml_field' => 'Polje',
- 'dt_xml_name' => 'Naziv',
- 'dt_xml_title' => 'Naslov',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Slobodni tekst',
- 'importxml' => 'Uvezi XML',
- 'dt_import_selectfile' => 'Molimo odaberite $1 datoteku za uvoz:',
- 'dt_import_encodingtype' => 'Tip šifriranja:',
- 'dt_import_forexisting' => 'Za stranice koje već postoje:',
- 'dt_import_overwriteexisting' => 'Piši preko postojećeg sadržaja',
- 'dt_import_skipexisting' => 'Preskoči',
- 'dt_import_appendtoexisting' => 'Dodaj na postojeći sadržaj',
- 'dt_import_summarydesc' => 'Sažetak uvoza:',
- 'dt_import_editsummary' => '$1 uvoz',
- 'dt_import_importing' => 'Uvoz...',
- 'dt_import_success' => '$1 {{PLURAL:$1|stranica|stranice|stranica}} će biti napravljeno iz $2 datoteke.',
- 'importcsv' => 'Uvoz CSV',
- 'dt_importcsv_badheader' => "Greška: zaglavlje $1 kolone, '$2', mora biti ili '$3', '$4' ili od obrasca 'template_name[field_name]'",
- 'right-datatransferimport' => 'Uvoz podataka',
-);
-
-/** Catalan (Català)
- * @author Jordi Roqué
- * @author SMP
- * @author Solde
- * @author Toniher
- */
-$messages['ca'] = array(
- 'datatransfer-desc' => 'Permet importar i exportar les dades que contenen les crides de les plantilles',
- 'viewxml' => "Visualitza l'XML",
- 'dt_viewxml_docu' => "Seleccioneu d'entre les següents categories i espais de noms per a veure'l en format XML.",
- 'dt_viewxml_categories' => 'Categories',
- 'dt_viewxml_namespaces' => 'Espais de noms',
- 'dt_viewxml_simplifiedformat' => 'Format simplificat',
- 'dt_xml_namespace' => 'Espai de noms',
- 'dt_xml_pages' => 'Pàgines',
- 'dt_xml_page' => 'Pàgina',
- 'dt_xml_template' => 'Plantilla',
- 'dt_xml_field' => 'Camp',
- 'dt_xml_name' => 'Nom',
- 'dt_xml_title' => 'Títol',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Text lliure',
- 'importxml' => 'Importa un XML',
- 'dt_import_selectfile' => 'Seleccioneu el fitxer $1 per importar:',
- 'dt_import_encodingtype' => 'Joc de caràcters:',
- 'dt_import_summarydesc' => 'Resum de la importació:',
- 'dt_import_editsummary' => 'Importació $1',
- 'dt_import_importing' => "S'està important...",
- 'dt_import_success' => '$1 {{PLURAL:$1|pàgina|pàgines}} es crearan des del fitxer $2.',
- 'importcsv' => 'Importa un CSV',
- 'dt_importcsv_badheader' => "Error: la capçalera de la columna $1, '$2', ha de ser o bé '$3', '$4' o bé de la forma 'template_name[field_name]'",
- 'right-datatransferimport' => 'Importa les dades',
-);
-
-/** Chechen (Нохчийн)
- * @author Sasan700
- */
-$messages['ce'] = array(
- 'dt_xml_template' => 'Куцкеп',
-);
-
-/** Czech (Česky)
- * @author Jkjk
- * @author Matěj Grabovský
- */
-$messages['cs'] = array(
- 'datatransfer-desc' => 'Umožňuje import a export strukturovaných údajů v buňkách šablon.',
- 'viewxml' => 'Zobrazit XML',
- 'dt_viewxml_categories' => 'Kategorie',
- 'dt_viewxml_namespaces' => 'Jmenné prostory',
- 'dt_viewxml_simplifiedformat' => 'Zjednodušený formát',
- 'dt_xml_namespace' => 'Jmenný prostor',
- 'dt_xml_pages' => 'Stránky',
- 'dt_xml_page' => 'Stránka',
- 'dt_xml_template' => 'Šablona',
- 'dt_xml_field' => 'Pole',
- 'dt_xml_name' => 'Název',
- 'dt_xml_title' => 'Název',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Libovolný text',
- 'importxml' => 'Importovat XML',
- 'dt_import_selectfile' => 'Prosím vyberte $1 soubor k importu:',
- 'dt_import_encodingtype' => 'Typ kódování:',
- 'dt_import_summarydesc' => 'Shrnutí importu:',
- 'dt_import_editsummary' => 'import $1',
- 'dt_import_importing' => 'Probíhá import...',
- 'dt_import_success' => ' $1 {{PLURAL:$1|stránky|stránky|stránek}} bude vytvořeno z $2 souboru.',
- 'importcsv' => 'Import CSV',
- 'right-datatransferimport' => 'Importovat data',
-);
-
-/** Danish (Dansk)
- * @author Jon Harald Søby
- */
-$messages['da'] = array(
- 'dt_viewxml_categories' => 'Kategorier',
- 'dt_xml_namespace' => 'Navnerum',
- 'dt_xml_page' => 'Side',
- 'dt_xml_name' => 'Navn',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
-);
-
-/** German (Deutsch)
- * @author Als-Holder
- * @author Kghbln
- * @author Krabina
- * @author Revolus
- * @author Umherirrender
- */
-$messages['de'] = array(
- 'datatransfer-desc' => 'Ermöglicht den Export von Daten im XML-Format sowie den Import von Daten im XML- und CSV-Format',
- 'viewxml' => 'XML ansehen',
- 'dt_viewxml_docu' => 'Bitte auswählen, welche Kategorien und Namensräume im XML-Format angezeigt werden sollen:',
- 'dt_viewxml_categories' => 'Kategorien',
- 'dt_viewxml_namespaces' => 'Namensräume',
- 'dt_viewxml_simplifiedformat' => 'Vereinfachtes Format',
- 'dt_xml_namespace' => 'Namensraum',
- 'dt_xml_pages' => 'Seiten',
- 'dt_xml_page' => 'Seite',
- 'dt_xml_template' => 'Vorlage',
- 'dt_xml_field' => 'Feld',
- 'dt_xml_name' => 'Name',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Freitext',
- 'importxml' => 'XML-Datei importieren',
- 'dt_import_selectfile' => 'Bitte die zu importierende $1-Datei auswählen:',
- 'dt_import_encodingtype' => 'Zeichenkodierung:',
- 'dt_import_forexisting' => 'Im Fall von Seiten, die bereits vorhanden sind:',
- 'dt_import_overwriteexisting' => 'Vorhandenen Inhalt überschreiben',
- 'dt_import_skipexisting' => 'Seite nicht importieren',
- 'dt_import_appendtoexisting' => 'Vorhandenen Inhalt ergänzen',
- 'dt_import_summarydesc' => 'Zusammenfassung zum Import:',
- 'dt_import_editsummary' => '$1-Import',
- 'dt_import_importing' => 'Importiere …',
- 'dt_import_success' => '$1 {{PLURAL:$1|Seite|Seiten}} werden aus der $2-Datei importiert.',
- 'importcsv' => 'CSV-Datei importieren',
- 'dt_importcsv_badheader' => "'''Fehler:''' Der Kopf der Spalte $1, „$2“, muss entweder „$3“, „$4“ oder im Format „Vorlagenname[Feldname]“ sein",
- 'right-datatransferimport' => 'Daten importieren',
-);
-
-/** Lower Sorbian (Dolnoserbski)
- * @author Michawiki
- */
-$messages['dsb'] = array(
- 'datatransfer-desc' => 'Zmóžnja importěrowanje a eksportěrowanje datow w zawołanjach pśedłogow',
- 'viewxml' => 'XML se woglědaś',
- 'dt_viewxml_docu' => 'Pšosym wubjeŕ, kótare slědujucych kategorijow a mjenjowych rumow maju se pokazaś w formaśe XML.',
- 'dt_viewxml_categories' => 'Kategorije',
- 'dt_viewxml_namespaces' => 'Mjenjowe rumy',
- 'dt_viewxml_simplifiedformat' => 'Zjadnorjony format',
- 'dt_xml_namespace' => 'Mjenjowy rum',
- 'dt_xml_pages' => 'Boki',
- 'dt_xml_page' => 'Bok',
- 'dt_xml_template' => 'Pśedłoga',
- 'dt_xml_field' => 'Pólo',
- 'dt_xml_name' => 'Mě',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Lichy tekst',
- 'importxml' => 'XML importěrowaś',
- 'dt_import_selectfile' => 'Pšosym wubjeŕ dataju $1 za importěrowanje:',
- 'dt_import_encodingtype' => 'Typ znamuškowego koda:',
- 'dt_import_forexisting' => 'Za boki, kótarež južo ekistěruju:',
- 'dt_import_overwriteexisting' => 'Eksistěrujuce wopśimjeśe pśepisaś',
- 'dt_import_skipexisting' => 'Pśeskócyś',
- 'dt_import_appendtoexisting' => 'K eksistěrujucemu wopśimjeśoju pśipowjesyś',
- 'dt_import_summarydesc' => 'Zespominanje importa:',
- 'dt_import_editsummary' => 'Importěrowanje $1',
- 'dt_import_importing' => 'Importěrujo se...',
- 'dt_import_success' => '$1 {{PLURAL:$1|bok twóri|boka twóritej|boki twórje|bokow twóri}} se z dataje $2.',
- 'importcsv' => 'Importěrowanje CSV',
- 'dt_importcsv_badheader' => "Zmólka: głowa słupa $1, '$2', musy pak '$3', '$4' byś pak formu 'mě_pśedłogi[mě_póla]' měś",
- 'right-datatransferimport' => 'Daty importěrowaś',
-);
-
-/** Ewe (Eʋegbe) */
-$messages['ee'] = array(
- 'dt_xml_page' => 'Axa',
-);
-
-/** Greek (Ελληνικά)
- * @author Consta
- * @author Crazymadlover
- * @author Omnipaedista
- */
-$messages['el'] = array(
- 'viewxml' => 'Προβολή XML',
- 'dt_viewxml_categories' => 'Κατηγορίες',
- 'dt_viewxml_namespaces' => 'Περιοχές ονομάτων',
- 'dt_xml_namespace' => 'Περιοχή ονομάτων',
- 'dt_xml_pages' => 'Σελίδες',
- 'dt_xml_page' => 'Σελίδα',
- 'dt_xml_template' => 'Πρότυπο',
- 'dt_xml_field' => 'Πεδίο',
- 'dt_xml_name' => 'Όνομα',
- 'dt_xml_title' => 'Τίτλος',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Ελεύθερο Κείμενο',
- 'importxml' => 'Εισαγωγή σε XML',
- 'dt_import_encodingtype' => 'Τύπος κωδικοποίησης',
- 'dt_import_editsummary' => 'Εισαγωγή $1',
- 'dt_import_importing' => 'Εισάγεται...',
- 'importcsv' => 'Εισαγωγή CSV',
- 'right-datatransferimport' => 'Εισαγωγή δεδομένων',
-);
-
-/** Esperanto (Esperanto)
- * @author Michawiki
- * @author Yekrats
- */
-$messages['eo'] = array(
- 'datatransfer-desc' => 'Permesas importadon kaj eksportadon de datumoj enhave en ŝablonaj vokoj',
- 'viewxml' => 'Rigardu XML-on',
- 'dt_viewxml_docu' => 'Bonvolu elekti inter la subaj kategorioj kaj nomspacoj por rigardi en XML-formato.',
- 'dt_viewxml_categories' => 'Kategorioj',
- 'dt_viewxml_namespaces' => 'Nomspacoj',
- 'dt_viewxml_simplifiedformat' => 'Simpligita formato',
- 'dt_xml_namespace' => 'Nomspaco',
- 'dt_xml_pages' => 'Paĝoj',
- 'dt_xml_page' => 'Paĝo',
- 'dt_xml_template' => 'Ŝablono',
- 'dt_xml_field' => 'Kampo',
- 'dt_xml_name' => 'Nomo',
- 'dt_xml_title' => 'Titolo',
- 'dt_xml_id' => 'identigo',
- 'dt_xml_freetext' => 'Libera Teksto',
- 'importxml' => 'Importi XML',
- 'dt_import_editsummary' => '$1 importo',
- 'dt_import_importing' => 'Importante...',
- 'importcsv' => 'Importi CSV',
- 'right-datatransferimport' => 'Importi datenojn',
-);
-
-/** Spanish (Español)
- * @author Crazymadlover
- * @author Imre
- * @author Locos epraix
- * @author Peter17
- * @author Sanbec
- * @author Translationista
- */
-$messages['es'] = array(
- 'datatransfer-desc' => 'Permite importar y exportar datos contenidos en llamadas de plantilla',
- 'viewxml' => 'Ver XML',
- 'dt_viewxml_docu' => 'Por favor seleccionar entre las siguientes categorías y nombres de espacio para ver en formato XML.',
- 'dt_viewxml_categories' => 'Categorías',
- 'dt_viewxml_namespaces' => 'Espacios de nombres',
- 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
- 'dt_xml_namespace' => 'Espacio de nombres',
- 'dt_xml_pages' => 'Páginas',
- 'dt_xml_page' => 'Página',
- 'dt_xml_template' => 'Plantilla',
- 'dt_xml_field' => 'Campo',
- 'dt_xml_name' => 'Nombre',
- 'dt_xml_title' => 'Título',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Texto libre',
- 'importxml' => 'Importar XML',
- 'dt_import_selectfile' => 'Por favor seleccione el archivo $1 a importar:',
- 'dt_import_encodingtype' => 'Tipo de codificación:',
- 'dt_import_summarydesc' => 'Resumen de importación:',
- 'dt_import_editsummary' => '$1 importación',
- 'dt_import_importing' => 'Importando...',
- 'dt_import_success' => '$1 {{PLURAL:$1|página|páginas}} serán creadas del archivo $2.',
- 'importcsv' => 'Importar CSV',
- 'dt_importcsv_badheader' => 'Error : el título de columna $1, "$2", tiene que ser "$3", "$4" o de la forma \'nombre_de_plantilla[nombre_del_campo]\'',
- 'right-datatransferimport' => 'Importar datos',
-);
-
-/** Estonian (Eesti)
- * @author Avjoska
- * @author Pikne
- */
-$messages['et'] = array(
- 'dt_viewxml_categories' => 'Kategooriad',
- 'dt_viewxml_namespaces' => 'Nimeruumid',
- 'dt_viewxml_simplifiedformat' => 'Lihtsustatud vorming',
- 'dt_xml_namespace' => 'Nimeruum',
- 'dt_xml_pages' => 'Leheküljed',
- 'dt_xml_page' => 'Lehekülg',
- 'dt_xml_template' => 'Mall',
- 'dt_xml_name' => 'Nimi',
-);
-
-/** Basque (Euskara)
- * @author Kobazulo
- */
-$messages['eu'] = array(
- 'viewxml' => 'XML ikusi',
- 'dt_viewxml_categories' => 'Kategoriak',
- 'dt_xml_pages' => 'Orrialdeak',
- 'dt_xml_page' => 'Orrialdea',
- 'dt_xml_template' => 'Txantiloia',
- 'dt_xml_field' => 'Eremua',
- 'dt_xml_name' => 'Izena',
- 'dt_xml_title' => 'Izenburua',
- 'importxml' => 'XML inportatu',
- 'dt_import_selectfile' => 'Mesedez, aukera ezazu inportatzeko $1 fitxategia:',
- 'dt_import_editsummary' => '$1 inportatu',
- 'dt_import_importing' => 'Inportatzen...',
- 'importcsv' => 'CSV inportatu',
- 'right-datatransferimport' => 'Datuak inportatu',
-);
-
-/** Persian (فارسی)
- * @author Mjbmr
- */
-$messages['fa'] = array(
- 'dt_xml_template' => 'الگو',
- 'dt_xml_name' => 'نام',
- 'dt_xml_title' => 'عنوان',
-);
-
-/** Finnish (Suomi)
- * @author Centerlink
- * @author Crt
- * @author Nike
- * @author Str4nd
- * @author Vililikku
- */
-$messages['fi'] = array(
- 'datatransfer-desc' => 'Mahdollistaa tuoda ja viedä dataa, joka on mallinekutsuissa.',
- 'viewxml' => 'Näytä XML',
- 'dt_viewxml_docu' => 'Valitse yksi seuraavista luokista ja nimiavaruuksista tarkasteltavaksi XML-muodossa.',
- 'dt_viewxml_categories' => 'Luokat',
- 'dt_viewxml_namespaces' => 'Nimiavaruudet',
- 'dt_viewxml_simplifiedformat' => 'Yksinkertaistettu muoto',
- 'dt_xml_namespace' => 'Nimiavaruus',
- 'dt_xml_pages' => 'Sivut',
- 'dt_xml_page' => 'Sivu',
- 'dt_xml_template' => 'Malline',
- 'dt_xml_field' => 'Kenttä',
- 'dt_xml_name' => 'Nimi',
- 'dt_xml_title' => 'Otsikko',
- 'dt_xml_id' => 'Tunnus',
- 'dt_xml_freetext' => 'Vapaa teksti',
- 'importxml' => 'XML-tuonti',
- 'dt_import_selectfile' => 'Valitse $1-tiedosto tuotavaksi:',
- 'dt_import_encodingtype' => 'Merkistötyyppi:',
- 'dt_import_skipexisting' => 'Ohita',
- 'dt_import_summarydesc' => 'Tuonnin yhteenveto',
- 'dt_import_editsummary' => '$1-tuonti',
- 'dt_import_importing' => 'Tuodaan...',
- 'dt_import_success' => '$1 {{PLURAL:$1|sivu|sivua}} luodaan $2-tiedostosta.',
- 'importcsv' => 'CSV-tuonti',
- 'dt_importcsv_badheader' => "Virhe: sarake $1 otsake, '$2', on oltava joko '$3', '$4' tai muotoa 'mallinne_nimi[kenttä_nimi]'",
- 'right-datatransferimport' => 'Tuoda tiedot',
-);
-
-/** French (Français)
- * @author Crochet.david
- * @author Grondin
- * @author IAlex
- * @author Peter17
- * @author PieRRoMaN
- * @author Zetud
- */
-$messages['fr'] = array(
- 'datatransfer-desc' => 'Permet l’import et l’export de données contenues dans des appels de modèles',
- 'viewxml' => 'Voir XML',
- 'dt_viewxml_docu' => 'Veuillez sélectionner parmi les catégories et les espaces de noms suivants afin de visionner au format XML.',
- 'dt_viewxml_categories' => 'Catégories',
- 'dt_viewxml_namespaces' => 'Espaces de noms',
- 'dt_viewxml_simplifiedformat' => 'Format simplifié',
- 'dt_xml_namespace' => 'Espace de noms',
- 'dt_xml_pages' => 'Pages',
- 'dt_xml_page' => 'Page',
- 'dt_xml_template' => 'Modèle',
- 'dt_xml_field' => 'Champ',
- 'dt_xml_name' => 'Nom',
- 'dt_xml_title' => 'Titre',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Texte libre',
- 'importxml' => 'Import en XML',
- 'dt_import_selectfile' => 'Veuillez sélectionner le fichier $1 à importer :',
- 'dt_import_encodingtype' => 'Type d’encodage:',
- 'dt_import_forexisting' => 'Pour les pages qui existent déjà :',
- 'dt_import_overwriteexisting' => 'Remplacer le contenu existant',
- 'dt_import_skipexisting' => 'Passer',
- 'dt_import_appendtoexisting' => 'Ajouter au contenu existant',
- 'dt_import_summarydesc' => 'Résumé de l’import :',
- 'dt_import_editsummary' => 'Import de $1',
- 'dt_import_importing' => 'Import en cours...',
- 'dt_import_success' => '$1 {{PLURAL:$1|page sera créée|pages seront créées}} depuis le fichier $2.',
- 'importcsv' => 'Import CSV',
- 'dt_importcsv_badheader' => 'Erreur : le titre de colonne $1, « $2 », doit être soit « $3 », « $4 » ou de la forme « nom_du_modèle[nom_du_champ] »',
- 'right-datatransferimport' => 'Importer des données',
-);
-
-/** Franco-Provençal (Arpetan)
- * @author Cedric31
- */
-$messages['frp'] = array(
- 'dt_viewxml_categories' => 'Catègories',
- 'dt_viewxml_namespaces' => 'Èspâços de noms',
- 'dt_xml_namespace' => 'Èspâço de noms',
- 'dt_xml_pages' => 'Pâges',
- 'dt_xml_page' => 'Pâge',
- 'dt_xml_template' => 'Modèlo',
-);
-
-/** Western Frisian (Frysk)
- * @author Snakesteuben
- */
-$messages['fy'] = array(
- 'dt_viewxml_namespaces' => 'Nammeromten',
- 'dt_xml_page' => 'Side',
- 'dt_xml_name' => 'Namme',
-);
-
-/** Irish (Gaeilge)
- * @author Alison
- */
-$messages['ga'] = array(
- 'dt_xml_namespace' => 'Ainmspás',
-);
-
-/** Galician (Galego)
- * @author Alma
- * @author Toliño
- */
-$messages['gl'] = array(
- 'datatransfer-desc' => 'Permite importar e exportar datos contidos en chamadas de modelos',
- 'viewxml' => 'Ver XML',
- 'dt_viewxml_docu' => 'Por favor seleccione entre as seguintes categorías e espazos de nomes para ver en formato XML.',
- 'dt_viewxml_categories' => 'Categorías',
- 'dt_viewxml_namespaces' => 'Espazos de nomes',
- 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
- 'dt_xml_namespace' => 'Espazo de nomes',
- 'dt_xml_pages' => 'Páxinas',
- 'dt_xml_page' => 'Páxina',
- 'dt_xml_template' => 'Modelo',
- 'dt_xml_field' => 'Campo',
- 'dt_xml_name' => 'Nome',
- 'dt_xml_title' => 'Título',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Texto Libre',
- 'importxml' => 'Importar XML',
- 'dt_import_selectfile' => 'Por favor, seleccione o ficheiro $1 a importar:',
- 'dt_import_encodingtype' => 'Tipo de codificación:',
- 'dt_import_forexisting' => 'Para páxinas que xa existen:',
- 'dt_import_overwriteexisting' => 'Sobrescribir o contido existente',
- 'dt_import_skipexisting' => 'Saltar',
- 'dt_import_appendtoexisting' => 'Engadir ao contido existente',
- 'dt_import_summarydesc' => 'Resumo da importación:',
- 'dt_import_editsummary' => 'Importación en $1',
- 'dt_import_importing' => 'Importando...',
- 'dt_import_success' => '{{PLURAL:$1|Unha páxina será creada|$1 páxinas serán creadas}} a partir do ficheiro $2.',
- 'importcsv' => 'Importación en CSV',
- 'dt_importcsv_badheader' => 'Erro: a cabeceira da columna $1, "$2", debe ser un "$3", "$4" ou do formulario "template_name[field_name]"',
- 'right-datatransferimport' => 'Importar datos',
-);
-
-/** Gothic (Gothic)
- * @author Jocke Pirat
- */
-$messages['got'] = array(
- 'dt_xml_namespace' => 'Seidofera',
-);
-
-/** Ancient Greek (Ἀρχαία ἑλληνικὴ)
- * @author Crazymadlover
- * @author Omnipaedista
- */
-$messages['grc'] = array(
- 'dt_viewxml_categories' => 'Κατηγορίαι',
- 'dt_viewxml_namespaces' => 'Ὀνοματεῖα',
- 'dt_xml_namespace' => 'Ὀνοματεῖον',
- 'dt_xml_pages' => 'Δέλτοι',
- 'dt_xml_page' => 'Δέλτος',
- 'dt_xml_template' => 'Πρότυπον',
- 'dt_xml_field' => 'Πεδίον',
- 'dt_xml_name' => 'Ὄνομα',
- 'dt_xml_title' => 'Ἐπιγραφή',
- 'dt_xml_freetext' => 'Ἐλεύθερον κείμενον',
-);
-
-/** Swiss German (Alemannisch)
- * @author Als-Holder
- * @author J. 'mach' wust
- */
-$messages['gsw'] = array(
- 'datatransfer-desc' => 'Macht dr Import un dr Export vu strukturierte Date megli, wu in Ufrief vu Vorlage bruucht wäre.',
- 'viewxml' => 'XML aaluege',
- 'dt_viewxml_docu' => 'Bitte wehl uus, weli Kategorien un Namensryym im XML-Format solle aazeigt wäre.',
- 'dt_viewxml_categories' => 'Kategorie',
- 'dt_viewxml_namespaces' => 'Namensryym',
- 'dt_viewxml_simplifiedformat' => 'Vereifacht Format',
- 'dt_xml_namespace' => 'Namensruum',
- 'dt_xml_pages' => 'Syte',
- 'dt_xml_page' => 'Syte',
- 'dt_xml_template' => 'Vorlag',
- 'dt_xml_field' => 'Fäld',
- 'dt_xml_name' => 'Name',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Freje Täxt',
- 'importxml' => 'XML importiere',
- 'dt_import_selectfile' => 'Bitte wehl d $1-Datei zum importiere uus:',
- 'dt_import_encodingtype' => 'Verschlisseligstyp:',
- 'dt_import_forexisting' => 'Im Fall vu Syte, wu s scho git:',
- 'dt_import_overwriteexisting' => 'Vorhandene Inhalt iberschryybe',
- 'dt_import_skipexisting' => 'Ibergumpe',
- 'dt_import_appendtoexisting' => 'Vorhandene Inhalt ergänze',
- 'dt_import_summarydesc' => 'Zämmefassig vum Import:',
- 'dt_import_editsummary' => '$1-Import',
- 'dt_import_importing' => 'Am Importiere ...',
- 'dt_import_success' => '$1 {{PLURAL:$1|Syte|Syte}} wäre us dr $2-Datei aagleit.',
- 'importcsv' => 'CSV-Datei importiere',
- 'dt_importcsv_badheader' => "Fähler: d Spalte $1 Iberschrift, '$2', muess entwäder '$3', '$4' syy oder us em Format 'template_name[field_name]'",
- 'right-datatransferimport' => 'Date importiere',
-);
-
-/** Manx (Gaelg)
- * @author MacTire02
- */
-$messages['gv'] = array(
- 'viewxml' => 'Jeeagh er XML',
- 'dt_viewxml_categories' => 'Ronnaghyn',
- 'dt_xml_page' => 'Duillag',
- 'dt_xml_name' => 'Ennym',
- 'dt_xml_title' => 'Ard-ennym',
- 'dt_xml_freetext' => 'Teks seyr',
-);
-
-/** Hausa (هَوُسَ) */
-$messages['ha'] = array(
- 'dt_xml_namespace' => 'Sararin suna',
- 'dt_xml_page' => 'Shafi',
-);
-
-/** Hawaiian (Hawai`i)
- * @author Singularity
- */
-$messages['haw'] = array(
- 'dt_xml_page' => '‘Ao‘ao',
- 'dt_xml_name' => 'Inoa',
-);
-
-/** Hebrew (עברית)
- * @author Amire80
- * @author Rotemliss
- * @author YaronSh
- */
-$messages['he'] = array(
- 'datatransfer-desc' => 'אפשרות לייבא ולייצא נתונים בתבניות',
- 'viewxml' => 'הצגת XML',
- 'dt_viewxml_docu' => 'אנא בחרו את מרחבי השם והקטגוריות אותם תרצו להציג בפורמט XML.',
- 'dt_viewxml_categories' => 'קטגוריות',
- 'dt_viewxml_namespaces' => 'מרחבי שם',
- 'dt_viewxml_simplifiedformat' => 'מבנה מפושט',
- 'dt_xml_namespace' => 'מרחב שם',
- 'dt_xml_pages' => 'דפים',
- 'dt_xml_page' => 'דף',
- 'dt_xml_template' => 'תבנית',
- 'dt_xml_field' => 'שדה',
- 'dt_xml_name' => 'שם',
- 'dt_xml_title' => 'כותרת',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'טקסט חופשי',
- 'importxml' => 'יבוא XML',
- 'dt_import_selectfile' => 'אנא בחרו את קובץ ה־$1 ליבוא:',
- 'dt_import_encodingtype' => 'סוג הקידוד:',
- 'dt_import_forexisting' => 'עבור הדפים שכבר קיימים:',
- 'dt_import_overwriteexisting' => 'לדרוס את התוכן הקיים',
- 'dt_import_skipexisting' => 'לדלג',
- 'dt_import_appendtoexisting' => 'לצרף את התוכן הקיים',
- 'dt_import_summarydesc' => 'תקציר היבוא:',
- 'dt_import_editsummary' => 'יבוא $1',
- 'dt_import_importing' => 'מתבצע יבוא...',
- 'dt_import_success' => '{{PLURAL:$1|דף אחד ייוצר|$1 דפים ייוצרו}} מקובץ ה־$2.',
- 'importcsv' => 'יבוא CSV',
- 'dt_importcsv_badheader' => "שגיאה: כותרת העמודה $1, '$2', חייבת להיות או '$3', '$4' או מהצורה 'שם_התבנית[שם_השדה]'",
- 'right-datatransferimport' => 'יבוא נתונים',
-);
-
-/** Hindi (हिन्दी)
- * @author Kaustubh
- */
-$messages['hi'] = array(
- 'datatransfer-desc' => 'टेम्प्लेट कॉल में उपलब्ध डाटाकी आयात-निर्यात करने की अनुमति देता हैं',
- 'viewxml' => 'XML देखें',
- 'dt_viewxml_docu' => 'कॄपया XML में देखने के लिये श्रेणीयाँ और नामस्थान चुनें।',
- 'dt_viewxml_categories' => 'श्रेणीयाँ',
- 'dt_viewxml_namespaces' => 'नामस्थान',
- 'dt_viewxml_simplifiedformat' => 'आसान फॉरमैट',
- 'dt_xml_namespace' => 'नामस्थान',
- 'dt_xml_page' => 'पन्ना',
- 'dt_xml_field' => 'फिल्ड़',
- 'dt_xml_name' => 'नाम',
- 'dt_xml_title' => 'शीर्षक',
- 'dt_xml_id' => 'आईडी',
- 'dt_xml_freetext' => 'मुक्त पाठ',
-);
-
-/** Croatian (Hrvatski)
- * @author Dalibor Bosits
- */
-$messages['hr'] = array(
- 'dt_viewxml_categories' => 'Kategorije',
- 'dt_xml_namespace' => 'Imenski prostor',
- 'dt_xml_page' => 'Stranica',
-);
-
-/** Upper Sorbian (Hornjoserbsce)
- * @author Michawiki
- */
-$messages['hsb'] = array(
- 'datatransfer-desc' => 'Dowola importowanje a eksportowanje datow, kotrež su we wołanjach předłohow wobsahowane',
- 'viewxml' => 'XML wobhladać',
- 'dt_viewxml_docu' => 'Prošu wubjer ze slědowacych kategorijow a mjenowych rumow, zo by w XML-formaće wobhladał.',
- 'dt_viewxml_categories' => 'Kategorije',
- 'dt_viewxml_namespaces' => 'Mjenowe rumy',
- 'dt_viewxml_simplifiedformat' => 'Zjednorjeny format',
- 'dt_xml_namespace' => 'Mjenowy rum',
- 'dt_xml_pages' => 'Strony',
- 'dt_xml_page' => 'Strona',
- 'dt_xml_template' => 'Předłoha',
- 'dt_xml_field' => 'Polo',
- 'dt_xml_name' => 'Mjeno',
- 'dt_xml_title' => 'Titul',
- 'dt_xml_id' => 'Id',
- 'dt_xml_freetext' => 'Swobodny tekst',
- 'importxml' => 'XML importować',
- 'dt_import_selectfile' => 'Prošu wubjer dataju $1 za importowanje:',
- 'dt_import_encodingtype' => 'Typ znamješkoweho koda:',
- 'dt_import_forexisting' => 'Za strony, kotrež hižo eksistuja:',
- 'dt_import_overwriteexisting' => 'Eksistowacy wobsah přepisać',
- 'dt_import_skipexisting' => 'Přeskočić',
- 'dt_import_appendtoexisting' => 'K eksistowacemu wobsahej připowěsnyć',
- 'dt_import_summarydesc' => 'Zjeće importa:',
- 'dt_import_editsummary' => 'Importowanje $1',
- 'dt_import_importing' => 'Importuje so...',
- 'dt_import_success' => '$1 {{PLURAL:$1|strona so z dataje $2 twori|stronje so z dataje $2 tworitej|strony so z dataje $2 tworja|stronow so z dataje $2 twori}}.',
- 'importcsv' => 'Importowanje CSV',
- 'dt_importcsv_badheader' => "Zmylk: hłowa špalty $1, '$2', dyrbi pak '$3', '$4' być pak formu 'mjeno_předłohi[mjeno_pola]' měć",
- 'right-datatransferimport' => 'Daty importować',
-);
-
-/** Hungarian (Magyar)
- * @author Dani
- * @author Glanthor Reviol
- */
-$messages['hu'] = array(
- 'datatransfer-desc' => 'Lehetővé teszi a sablonhívásokban található adatok importálását és exportálását',
- 'viewxml' => 'XML megtekintése',
- 'dt_viewxml_docu' => 'Válaszd ki a kategóriák és a névterek közül azt, amelyiket meg akarod tekinteni XML formátumban.',
- 'dt_viewxml_categories' => 'Kategóriák',
- 'dt_viewxml_namespaces' => 'Névterek',
- 'dt_viewxml_simplifiedformat' => 'Egyszerűsített formátum',
- 'dt_xml_namespace' => 'Névtér',
- 'dt_xml_pages' => 'Lapok',
- 'dt_xml_page' => 'Lap',
- 'dt_xml_template' => 'Sablon',
- 'dt_xml_field' => 'Mező',
- 'dt_xml_name' => 'Név',
- 'dt_xml_title' => 'Cím',
- 'dt_xml_id' => 'Azonosító',
- 'dt_xml_freetext' => 'Szabad szöveg',
- 'importxml' => 'XML importálás',
- 'dt_import_selectfile' => 'Kérlek válaszd ki az importálandó $1 fájlt:',
- 'dt_import_encodingtype' => 'Kódolás típusa:',
- 'dt_import_summarydesc' => 'Az importálás összefoglalója:',
- 'dt_import_editsummary' => '$1 importálás',
- 'dt_import_importing' => 'Importálás…',
- 'dt_import_success' => '{{PLURAL:$1|egy|$1}} lap fog készülni a(z) $2 fájlból.',
- 'importcsv' => 'CSV importálása',
- 'dt_importcsv_badheader' => 'Hiba: a(z) $1 oszlop fejlécének („$2”) vagy „$3”, „$4”, vagy pedig „sablonnév[mezőnév]” formátumúnak kell lennie',
- 'right-datatransferimport' => 'Adatok importálása',
-);
-
-/** Interlingua (Interlingua)
- * @author McDutchie
- */
-$messages['ia'] = array(
- 'datatransfer-desc' => 'Permitte importar e exportar datos continite in appellos a patronos',
- 'viewxml' => 'Vider XML',
- 'dt_viewxml_docu' => 'Per favor selige inter le sequente categorias e spatios de nomines pro vider in formato XML.',
- 'dt_viewxml_categories' => 'Categorias',
- 'dt_viewxml_namespaces' => 'Spatios de nomines',
- 'dt_viewxml_simplifiedformat' => 'Formato simplificate',
- 'dt_xml_namespace' => 'Spatio de nomines',
- 'dt_xml_pages' => 'Paginas',
- 'dt_xml_page' => 'Pagina',
- 'dt_xml_template' => 'Patrono',
- 'dt_xml_field' => 'Campo',
- 'dt_xml_name' => 'Nomine',
- 'dt_xml_title' => 'Titulo',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Texto libere',
- 'importxml' => 'Importar XML',
- 'dt_import_selectfile' => 'Per favor selige le file $1 a importar:',
- 'dt_import_encodingtype' => 'Typo de codification:',
- 'dt_import_forexisting' => 'Pro paginas que ja existe:',
- 'dt_import_overwriteexisting' => 'Superscriber le contento existente',
- 'dt_import_skipexisting' => 'Saltar',
- 'dt_import_appendtoexisting' => 'Adjunger al contento existente',
- 'dt_import_summarydesc' => 'Summario de importation:',
- 'dt_import_editsummary' => 'Importation de $1',
- 'dt_import_importing' => 'Importation in curso…',
- 'dt_import_success' => '$1 {{PLURAL:$1|pagina|paginas}} essera create ex le file $2.',
- 'importcsv' => 'Importar CSV',
- 'dt_importcsv_badheader' => "Error: le capite del columna $1, '$2', debe esser '$3', '$4' o in le forma 'nomine_de_patrono[nomine_de_campo]'",
- 'right-datatransferimport' => 'Importar datos',
-);
-
-/** Indonesian (Bahasa Indonesia)
- * @author Bennylin
- * @author Farras
- * @author Irwangatot
- * @author IvanLanin
- * @author Rex
- */
-$messages['id'] = array(
- 'datatransfer-desc' => 'Membolehkan untuk impor dan ekspor data diisikan pada pemangilan templat',
- 'viewxml' => 'Tilik XML',
- 'dt_viewxml_docu' => 'Silakan pilih di antara kategori dan ruang nama berikut untuk melihat dalam format XML',
- 'dt_viewxml_categories' => 'Kategori',
- 'dt_viewxml_namespaces' => 'Ruang nama',
- 'dt_viewxml_simplifiedformat' => 'Penyederhanaan format',
- 'dt_xml_namespace' => 'Ruang nama',
- 'dt_xml_pages' => 'Halaman',
- 'dt_xml_page' => 'Halaman',
- 'dt_xml_template' => 'Templat',
- 'dt_xml_field' => 'Ruas',
- 'dt_xml_name' => 'Nama',
- 'dt_xml_title' => 'Judul',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Teks Gratis',
- 'importxml' => 'Impor XML',
- 'dt_import_selectfile' => 'Pilih berkas $1 untuk di impor:',
- 'dt_import_encodingtype' => 'Tipe penyandian:',
- 'dt_import_forexisting' => 'Untuk halaman yang sudah ada:',
- 'dt_import_overwriteexisting' => 'Menimpa konten yang ada',
- 'dt_import_skipexisting' => 'Lewati',
- 'dt_import_appendtoexisting' => 'Tambahkan kepada konten yang ada',
- 'dt_import_summarydesc' => 'Ringkasan impor:',
- 'dt_import_editsummary' => '$1 impor',
- 'dt_import_importing' => 'Mengimpor...',
- 'dt_import_success' => '$1 {{PLURAL:$1|halaman|halaman}} akan di buat dari berkas $2.',
- 'importcsv' => 'Impor CSV',
- 'dt_importcsv_badheader' => "Kesalahan: kepala kolom $1, '$2', harus berupa '$3', '$4' atau bentuk 'template_name [field_name]'",
- 'right-datatransferimport' => 'Impor data',
-);
-
-/** Igbo (Igbo)
- * @author Ukabia
- */
-$messages['ig'] = array(
- 'dt_viewxml_categories' => 'Ébéanọr',
- 'dt_xml_template' => 'Àtụ',
-);
-
-/** Ido (Ido)
- * @author Malafaya
- */
-$messages['io'] = array(
- 'dt_xml_template' => 'Shablono',
- 'dt_xml_name' => 'Nomo',
- 'dt_xml_title' => 'Titulo',
-);
-
-/** Icelandic (Íslenska)
- * @author S.Örvarr.S
- */
-$messages['is'] = array(
- 'dt_viewxml_namespaces' => 'Nafnrými',
- 'dt_xml_page' => 'Síða',
-);
-
-/** Italian (Italiano)
- * @author Beta16
- * @author BrokenArrow
- * @author Darth Kule
- */
-$messages['it'] = array(
- 'datatransfer-desc' => "Permette l'importazione e l'esportazione di dati strutturati contenuti in chiamate a template",
- 'viewxml' => 'Vedi XML',
- 'dt_viewxml_docu' => 'Selezionare tra le categorie e namespace indicati di seguito quelli da visualizzare in formato XML.',
- 'dt_viewxml_categories' => 'Categorie',
- 'dt_viewxml_namespaces' => 'Namespace',
- 'dt_viewxml_simplifiedformat' => 'Formato semplificato',
- 'dt_xml_namespace' => 'Namespace',
- 'dt_xml_pages' => 'Pagine',
- 'dt_xml_page' => 'Pagina',
- 'dt_xml_template' => 'Template',
- 'dt_xml_field' => 'Campo',
- 'dt_xml_name' => 'Nome',
- 'dt_xml_title' => 'Titolo',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Testo libero',
- 'dt_import_encodingtype' => 'Tipo di codifica',
- 'right-datatransferimport' => 'Importa dati',
-);
-
-/** Japanese (日本語)
- * @author Aotake
- * @author Fryed-peach
- * @author JtFuruhata
- * @author Ohgi
- * @author 青子守歌
- */
-$messages['ja'] = array(
- 'datatransfer-desc' => 'テンプレート呼び出しに関わるデータのインポートおよびエクスポートを可能にする',
- 'viewxml' => 'XML表示',
- 'dt_viewxml_docu' => 'XML形式で表示するカテゴリや名前空間を以下から選択してください。',
- 'dt_viewxml_categories' => 'カテゴリ',
- 'dt_viewxml_namespaces' => '名前空間',
- 'dt_viewxml_simplifiedformat' => '簡易形式',
- 'dt_xml_namespace' => '名前空間',
- 'dt_xml_pages' => 'ページ群',
- 'dt_xml_page' => 'ページ',
- 'dt_xml_template' => 'テンプレート',
- 'dt_xml_field' => 'フィールド',
- 'dt_xml_name' => '名前',
- 'dt_xml_title' => 'タイトル',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => '自由形式テキスト',
- 'importxml' => 'XMLインポート',
- 'dt_import_selectfile' => 'インポートする $1 ファイルを選択してください:',
- 'dt_import_encodingtype' => 'エンコーディング方式:',
- 'dt_import_forexisting' => 'すでに存在するページの場合:',
- 'dt_import_overwriteexisting' => '既存の内容に上書き',
- 'dt_import_skipexisting' => 'スキップ',
- 'dt_import_appendtoexisting' => '既存の内容に追加',
- 'dt_import_summarydesc' => '移入の概要:',
- 'dt_import_editsummary' => '$1 のインポート',
- 'dt_import_importing' => 'インポート中…',
- 'dt_import_success' => '$2ファイルから$1{{PLURAL:$1|ページ}}がインポートされます。',
- 'importcsv' => 'CSVのインポート',
- 'dt_importcsv_badheader' => 'エラー: 列 $1 のヘッダ「$2」は、「$3」もしくは「$4」であるか、または「テンプレート名[フィールド名]」という形式になっていなければなりません。',
- 'right-datatransferimport' => 'データをインポートする',
-);
-
-/** Javanese (Basa Jawa)
- * @author Meursault2004
- */
-$messages['jv'] = array(
- 'viewxml' => 'Ndeleng XML',
- 'dt_viewxml_categories' => 'Kategori-kategori',
- 'dt_viewxml_simplifiedformat' => 'Format prasaja',
- 'dt_xml_namespace' => 'Bilik nama',
- 'dt_xml_page' => 'Kaca',
- 'dt_xml_name' => 'Jeneng',
- 'dt_xml_title' => 'Irah-irahan (judhul)',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Tèks Bébas',
-);
-
-/** Khmer (ភាសាខ្មែរ)
- * @author Chhorran
- * @author Lovekhmer
- * @author Thearith
- * @author គីមស៊្រុន
- * @author វ័ណថារិទ្ធ
- */
-$messages['km'] = array(
- 'viewxml' => 'មើល XML',
- 'dt_viewxml_docu' => 'ជ្រើសយកក្នុងចំណោមចំណាត់ថ្នាក់ក្រុមនិងលំហឈ្មោះដើម្បីមើលជាទម្រង់ XML ។',
- 'dt_viewxml_categories' => 'ចំណាត់ថ្នាក់ក្រុម',
- 'dt_viewxml_namespaces' => 'ប្រភេទ',
- 'dt_viewxml_simplifiedformat' => 'ទម្រង់សាមញ្ញ',
- 'dt_xml_namespace' => 'ប្រភេទ',
- 'dt_xml_pages' => 'ទំព័រ',
- 'dt_xml_page' => 'ទំព័រ',
- 'dt_xml_template' => 'ទំព័រគំរូ',
- 'dt_xml_field' => 'ផ្នែក',
- 'dt_xml_name' => 'ឈ្មោះ',
- 'dt_xml_title' => 'ចំណងជើង',
- 'dt_xml_id' => 'អត្តសញ្ញាណ',
- 'dt_xml_freetext' => 'អត្ថបទសេរី',
- 'importxml' => 'នាំចូល XML',
- 'dt_import_selectfile' => 'សូមជ្រើសរើសឯកសារ $1 ដើម្បីនាំចូល៖',
- 'dt_import_encodingtype' => 'ប្រភេទនៃការធ្វើកូដ៖',
- 'dt_import_forexisting' => 'សំរាប់ទំព័រដែលមានរួចហើយ៖',
- 'dt_import_overwriteexisting' => 'សរសេរជាន់ពីលើខ្លឹមសារដែលមានហើយ',
- 'dt_import_skipexisting' => 'រំលង',
- 'dt_import_appendtoexisting' => 'សរសេរបន្ថែមទៅលើខ្លឹមសារដែលមានហើយ',
- 'dt_import_summarydesc' => 'ចំណារពន្យល់ស្ដីពីការនាំចូល៖',
- 'dt_import_editsummary' => '$1 នាំចូល',
- 'dt_import_importing' => 'កំពុងនាំចូល...',
- 'dt_import_success' => 'ទំព័រចំនួន $1 នឹងត្រូវបានបង្កើតពីឯកសារ $2 នេះ។',
- 'importcsv' => 'នាំចូល CSV',
- 'right-datatransferimport' => 'នាំចូលទិន្នន័យ',
-);
-
-/** Kannada (ಕನ್ನಡ)
- * @author Nayvik
- */
-$messages['kn'] = array(
- 'dt_viewxml_categories' => 'ವರ್ಗಗಳು',
- 'dt_xml_namespace' => 'ನಾಮವರ್ಗ',
- 'dt_xml_pages' => 'ಪುಟಗಳು',
- 'dt_xml_page' => 'ಪುಟ',
- 'dt_xml_template' => 'ಟೆಂಪ್ಲೇಟು',
- 'dt_xml_name' => 'ಹೆಸರು',
- 'dt_xml_title' => 'ಶೀರ್ಷಿಕೆ',
-);
-
-/** Kinaray-a (Kinaray-a)
- * @author Jose77
- */
-$messages['krj'] = array(
- 'dt_viewxml_categories' => 'Manga Kategorya',
- 'dt_xml_page' => 'Pahina',
-);
-
-/** Colognian (Ripoarisch)
- * @author Purodha
- */
-$messages['ksh'] = array(
- 'datatransfer-desc' => 'Määt et müjjelesch, Date uß Schabloone ier Oproofe ze emporteere un ze exporteere.',
- 'viewxml' => '<i lang="en">XML</i> beloore',
- 'dt_viewxml_docu' => 'Don ußsöke, wat fö_n Saachjruppe un Appachtemangs De em <i lang="en">XML</i> Fommaat aanloore wells.',
- 'dt_viewxml_categories' => 'Saachjroppe',
- 'dt_viewxml_namespaces' => 'Appachtemangs',
- 'dt_viewxml_simplifiedformat' => 'Em eijfachere Fommaat',
- 'dt_xml_namespace' => 'Appachtemang',
- 'dt_xml_pages' => 'Sigge',
- 'dt_xml_page' => 'Sigg',
- 'dt_xml_template' => 'Schablohn',
- 'dt_xml_field' => 'Felldt',
- 'dt_xml_name' => 'Name',
- 'dt_xml_title' => 'Tėttel',
- 'dt_xml_id' => 'Kännong',
- 'dt_xml_freetext' => 'Freije Täx',
- 'importxml' => '<i lang="en">XML</i> Empotteere',
- 'dt_import_selectfile' => 'Söhk de <i lang="en">$1</i>-Dattei för zem Empotteere uß:',
- 'dt_import_encodingtype' => 'Zoot Kodeerung för de Bohchshtahbe un Zeishe:',
- 'dt_import_forexisting' => 'För Sigge, di et ald jitt:',
- 'dt_import_overwriteexisting' => 'Övverschrieve, wat ald doh es',
- 'dt_import_skipexisting' => 'Övverjonn',
- 'dt_import_appendtoexisting' => 'An dat aanhange, wat ald doh es',
- 'dt_import_summarydesc' => 'Zesammefassung vun däm Empoot:',
- 'dt_import_editsummary' => 'uss ene <i lang="en">$1</i>-Datei empotteet',
- 'dt_import_importing' => 'Ben aam Empotteere{{int:Ellipsis}}',
- 'dt_import_success' => '{{PLURAL:$1|Ein Sigg weed_uß|$1 Sigge weede uß|Kein einzelne Sigg weed_uß}} dä <i lang="en">$2</i>-Dattei empotteet.',
- 'importcsv' => '<i lang="en">CSV</i>-Dattei empoteere',
- 'dt_importcsv_badheader' => 'Fähler: De Shpallde-Övverschreff för $1 es „$2“, mööt ävver „$3“ udder „$4“ sin, udder dat Fommaat „<code>Name_vun_ene_Schablohn[Name_vun_enem_Felldt]</code>“ han.',
- 'right-datatransferimport' => 'Daate empoteere',
-);
-
-/** Kurdish (Latin) (Kurdî (Latin))
- * @author George Animal
- */
-$messages['ku-latn'] = array(
- 'dt_xml_page' => 'Rûpel',
- 'dt_xml_name' => 'Nav',
- 'dt_xml_title' => 'Sernav',
- 'dt_import_summarydesc' => 'Kurteya împortê:',
-);
-
-/** Cornish (Kernowek)
- * @author Kernoweger
- * @author Kw-Moon
- */
-$messages['kw'] = array(
- 'dt_viewxml_categories' => 'Classys',
- 'dt_xml_page' => 'Folen',
-);
-
-/** Luxembourgish (Lëtzebuergesch)
- * @author Robby
- */
-$messages['lb'] = array(
- 'datatransfer-desc' => "Erlaabt et Daten déi an Opruffer vu schabloune benotzt ginn z'importéieren an z'exportéieren",
- 'viewxml' => 'XML weisen',
- 'dt_viewxml_docu' => 'Wielt w.e.g. ënnert dëse Kategorien an Nimmraim fir am XML-Format unzeweisen.',
- 'dt_viewxml_categories' => 'Kategorien',
- 'dt_viewxml_namespaces' => 'Nummraim',
- 'dt_viewxml_simplifiedformat' => 'Vereinfachte Format',
- 'dt_xml_namespace' => 'Nummraum',
- 'dt_xml_pages' => 'Säiten',
- 'dt_xml_page' => 'Säit',
- 'dt_xml_template' => 'Schabloun',
- 'dt_xml_field' => 'Feld',
- 'dt_xml_name' => 'Numm',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'Nummer',
- 'dt_xml_freetext' => 'Fräien Text',
- 'importxml' => 'XML importéieren',
- 'dt_import_selectfile' => "Sicht de(n) $1-Fichier eraus fir z'importéieren:",
- 'dt_import_encodingtype' => 'Encoding-Typ:',
- 'dt_import_forexisting' => 'Fir Säiten déi et scho gëtt:',
- 'dt_import_overwriteexisting' => 'Den Inhalt den et gëtt iwwerschreiwen',
- 'dt_import_skipexisting' => 'Iwwersprangen',
- 'dt_import_appendtoexisting' => 'Bäi den Inhalt deen et gëtt derbäisetzen',
- 'dt_import_summarydesc' => 'Resumé vum Import:',
- 'dt_import_editsummary' => '$1 importéieren',
- 'dt_import_importing' => 'Import am gaang ...',
- 'dt_import_success' => '$1 {{PLURAL:$1|Säit gëtt|Säite ginn}} aus dem $2-Fichier ugeluecht.',
- 'importcsv' => 'CSV importéieren',
- 'dt_importcsv_badheader' => "Feeler: D'Iwwerschrëft vun der Kolonn $1, '$2', muss entweder '$3', '$4' oder am Format 'Numm_vun_der_Schabloun(Numm_vum_Feld)' sinn",
- 'right-datatransferimport' => 'Donnéeën importéieren',
-);
-
-/** Limburgish (Limburgs)
- * @author Aelske
- * @author Remember the dot
- */
-$messages['li'] = array(
- 'dt_xml_page' => 'Pagina',
-);
-
-/** Lithuanian (Lietuvių)
- * @author Tomasdd
- */
-$messages['lt'] = array(
- 'dt_viewxml_categories' => 'Kategorijos',
-);
-
-/** Latgalian (Latgaļu)
- * @author Dark Eagle
- */
-$messages['ltg'] = array(
- 'dt_viewxml_namespaces' => 'Vuordu pluoti',
- 'dt_xml_namespace' => 'Vuordu pluots',
- 'dt_xml_pages' => 'Puslopys',
-);
-
-/** Latvian (Latviešu)
- * @author GreenZeb
- */
-$messages['lv'] = array(
- 'dt_viewxml_categories' => 'Kategorijas',
- 'dt_viewxml_namespaces' => 'Vārdtelpas',
- 'dt_viewxml_simplifiedformat' => 'Vienkāršots formāts',
- 'dt_xml_namespace' => 'Vārdtelpa',
- 'dt_xml_pages' => 'Lapas',
- 'dt_xml_page' => 'Lapa',
- 'dt_xml_template' => 'Veidne',
- 'dt_xml_field' => 'Lauks',
- 'dt_xml_name' => 'Vārds',
- 'dt_xml_title' => 'Nosaukums',
- 'dt_xml_id' => 'ID',
-);
-
-/** Eastern Mari (Олык Марий)
- * @author Сай
- */
-$messages['mhr'] = array(
- 'dt_xml_namespace' => 'Лӱм-влакын кумдыкышт',
- 'dt_xml_page' => 'Лаштык',
-);
-
-/** Macedonian (Македонски)
- * @author Bjankuloski06
- */
-$messages['mk'] = array(
- 'datatransfer-desc' => 'Овозможува увоз и извоз на податоци содржани во повикувањата на шаблоните',
- 'viewxml' => 'Преглед на XML',
- 'dt_viewxml_docu' => 'Одберете од следиве категории и именски простори за преглед во XML формат.',
- 'dt_viewxml_categories' => 'Категории',
- 'dt_viewxml_namespaces' => 'Именски простори',
- 'dt_viewxml_simplifiedformat' => 'Упростен формат',
- 'dt_xml_namespace' => 'Именски простор',
- 'dt_xml_pages' => 'Страници',
- 'dt_xml_page' => 'Страница',
- 'dt_xml_template' => 'Шаблон',
- 'dt_xml_field' => 'Поле',
- 'dt_xml_name' => 'Име',
- 'dt_xml_title' => 'Наслов',
- 'dt_xml_id' => 'ид. бр.',
- 'dt_xml_freetext' => 'Слободен текст',
- 'importxml' => 'Увоз на XML',
- 'dt_import_selectfile' => 'Одберете ја $1 податотеката за увоз:',
- 'dt_import_encodingtype' => 'Тип на кодирање:',
- 'dt_import_forexisting' => 'За страници што веќе постојат:',
- 'dt_import_overwriteexisting' => 'Презапиши врз постоечките содржини',
- 'dt_import_skipexisting' => 'Прескокни',
- 'dt_import_appendtoexisting' => 'Додај во постоечката содржина',
- 'dt_import_summarydesc' => 'Опис на увозот:',
- 'dt_import_editsummary' => 'Увоз на $1',
- 'dt_import_importing' => 'Увезувам...',
- 'dt_import_success' => '$1 {{PLURAL:$1|страница ќе биде создадена|страници ќе бидат создадени}} од $2 податотеката.',
- 'importcsv' => 'Увоз на CSV',
- 'dt_importcsv_badheader' => 'Грешка: насловот на колона $1, „$2“, мора да биде или „$3“, или „$4“, или пак од обликот „template_name[field_name]“',
- 'right-datatransferimport' => 'Увезување податоци',
-);
-
-/** Malayalam (മലയാളം)
- * @author Junaidpv
- * @author Praveenp
- * @author Shijualex
- */
-$messages['ml'] = array(
- 'viewxml' => 'XML കാണുക',
- 'dt_viewxml_categories' => 'വർഗ്ഗങ്ങൾ',
- 'dt_viewxml_namespaces' => 'നാമമേഖലകൾ',
- 'dt_viewxml_simplifiedformat' => 'ലളിതവത്ക്കരിക്കപ്പെട്ട ഫോർമാറ്റ്',
- 'dt_xml_namespace' => 'നാമമേഖല',
- 'dt_xml_pages' => 'താളുകൾ',
- 'dt_xml_page' => 'താൾ',
- 'dt_xml_template' => 'ഫലകം',
- 'dt_xml_field' => 'ഫീൽഡ്',
- 'dt_xml_name' => 'പേര്',
- 'dt_xml_title' => 'ശീർഷകം',
- 'dt_xml_id' => 'ഐ.ഡി.',
- 'dt_xml_freetext' => 'സ്വതന്ത്ര എഴുത്ത്',
- 'importxml' => 'എക്സ്.എം.എൽ. ഇറക്കുമതി',
- 'dt_import_selectfile' => 'ദയവായി ഇറക്കുമതിക്കായി $1 പ്രമാണം തിരഞ്ഞെടുക്കുക:',
- 'dt_import_encodingtype' => 'എൻകോഡിങ് തരം:',
- 'dt_import_forexisting' => 'നിലവിലുള്ള താളുകൾക്ക് വേണ്ടി:',
- 'dt_import_appendtoexisting' => 'നിലവിലുള്ള ഉള്ളടക്കത്തോട് കൂട്ടിച്ചേർക്കുക',
- 'dt_import_summarydesc' => 'ഇറക്കുമതിയുടെ സംഗ്രഹം:',
- 'dt_import_editsummary' => '$1 ഇറക്കുമതി',
- 'dt_import_importing' => 'ഇറക്കുമതി ചെയ്യുന്നു...',
- 'importcsv' => 'സി.എസ്.വി. ഇറക്കുമതി',
-);
-
-/** Mongolian (Монгол)
- * @author Chinneeb
- */
-$messages['mn'] = array(
- 'dt_viewxml_categories' => 'Ангиллууд',
- 'dt_viewxml_namespaces' => 'Нэрний зайнууд',
- 'dt_xml_namespace' => 'Нэрний зай',
- 'dt_xml_page' => 'Хуудас',
-);
-
-/** Marathi (मराठी)
- * @author Kaustubh
- * @author V.narsikar
- */
-$messages['mr'] = array(
- 'datatransfer-desc' => 'साचा कॉल मध्ये असणार्या डाटाची आयात निर्यात करण्याची परवानगी देतो',
- 'viewxml' => 'XML पहा',
- 'dt_viewxml_docu' => 'कॄपया XML मध्ये पाहण्यासाठी खालीलपैकी वर्ग व नामविश्वे निवडा.',
- 'dt_viewxml_categories' => 'वर्ग',
- 'dt_viewxml_namespaces' => 'नामविश्वे',
- 'dt_viewxml_simplifiedformat' => 'सोप्या प्रकारे',
- 'dt_xml_namespace' => 'नामविश्व',
- 'dt_xml_page' => 'पान',
- 'dt_xml_field' => 'रकाना',
- 'dt_xml_name' => 'नाव',
- 'dt_xml_title' => 'शीर्षक',
- 'dt_xml_id' => 'क्रमांक (आयडी)',
- 'dt_xml_freetext' => 'मुक्त मजकूर',
- 'importxml' => 'एक्सएमएल आयात करा',
-);
-
-/** Mirandese (Mirandés)
- * @author Malafaya
- */
-$messages['mwl'] = array(
- 'dt_xml_page' => 'Páigina',
-);
-
-/** Erzya (Эрзянь)
- * @author Botuzhaleny-sodamo
- */
-$messages['myv'] = array(
- 'dt_viewxml_categories' => 'Категорият',
- 'dt_viewxml_namespaces' => 'Лем потмот',
- 'dt_xml_page' => 'Лопа',
- 'dt_xml_template' => 'Лопа парцун',
- 'dt_xml_field' => 'Пакся',
- 'dt_xml_name' => 'Лемезэ',
- 'dt_xml_title' => 'Конякс',
-);
-
-/** Mazanderani (مازِرونی)
- * @author محک
- */
-$messages['mzn'] = array(
- 'dt_viewxml_categories' => 'رجئون',
-);
-
-/** Nahuatl (Nāhuatl)
- * @author Fluence
- */
-$messages['nah'] = array(
- 'dt_viewxml_categories' => 'Neneuhcāyōtl',
- 'dt_viewxml_namespaces' => 'Tōcātzin',
- 'dt_xml_namespace' => 'Tōcātzin',
- 'dt_xml_page' => 'Zāzanilli',
- 'dt_xml_name' => 'Tōcāitl',
- 'dt_xml_title' => 'Tōcāitl',
- 'dt_xml_id' => 'ID',
-);
-
-/** Low German (Plattdüütsch)
- * @author Slomox
- */
-$messages['nds'] = array(
- 'dt_xml_name' => 'Naam',
-);
-
-/** Dutch (Nederlands)
- * @author Siebrand
- * @author Tvdm
- */
-$messages['nl'] = array(
- 'datatransfer-desc' => 'Maakt het importeren en exporteren van gestructureerde gegevens in sjabloonaanroepen mogelijk',
- 'viewxml' => 'XML bekijken',
- 'dt_viewxml_docu' => 'Selecteer uit de volgende categorieën en naamruimten om in XML-formaat te bekijken.',
- 'dt_viewxml_categories' => 'Categorieën',
- 'dt_viewxml_namespaces' => 'Naamruimten',
- 'dt_viewxml_simplifiedformat' => 'Vereenvoudigd formaat',
- 'dt_xml_namespace' => 'Naamruimte',
- 'dt_xml_pages' => "Pagina's",
- 'dt_xml_page' => 'Pagina',
- 'dt_xml_template' => 'Sjabloon',
- 'dt_xml_field' => 'Veld',
- 'dt_xml_name' => 'Naam',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Vrije tekst',
- 'importxml' => 'XML importeren',
- 'dt_import_selectfile' => 'Selecteer het te importeren bestand van het type $1:',
- 'dt_import_encodingtype' => 'Coderingstype:',
- 'dt_import_forexisting' => "Voor pagina's die al bestaan:",
- 'dt_import_overwriteexisting' => 'Bestaande inhoud overschrijven',
- 'dt_import_skipexisting' => 'Overslaan',
- 'dt_import_appendtoexisting' => 'Toevoegen aan bestaande inhoud',
- 'dt_import_summarydesc' => 'Samenvatting van de import:',
- 'dt_import_editsummary' => '$1-import',
- 'dt_import_importing' => 'Bezig met importeren…',
- 'dt_import_success' => "Uit het $2-bestand {{PLURAL:$1|wordt één pagina|worden $1 pagina's}} geïmporteerd.",
- 'importcsv' => 'CSV importeren',
- 'dt_importcsv_badheader' => 'Fout: De kop van kolom $1, "$2", moet "$3" of "$4" zijn, of in de vorm "sjabloonnaam[veldnaam]" genoteerd worden.',
- 'right-datatransferimport' => 'Gegevens importeren',
-);
-
-/** Norwegian Nynorsk (Norsk (nynorsk))
- * @author Gunnernett
- * @author Harald Khan
- * @author Jon Harald Søby
- */
-$messages['nn'] = array(
- 'datatransfer-desc' => 'Gjer det mogleg å importera og eksportera data i maloppkallingar',
- 'viewxml' => 'Syn XML',
- 'dt_viewxml_docu' => 'Vel mellom følgjande kategoriar og namnerom for å syna dei i XML-format.',
- 'dt_viewxml_categories' => 'Kategoriar',
- 'dt_viewxml_namespaces' => 'Namnerom',
- 'dt_viewxml_simplifiedformat' => 'Forenkla format',
- 'dt_xml_namespace' => 'Namnerom',
- 'dt_xml_pages' => 'Sider',
- 'dt_xml_page' => 'Side',
- 'dt_xml_template' => 'Mal',
- 'dt_xml_field' => 'Felt',
- 'dt_xml_name' => 'Namn',
- 'dt_xml_title' => 'Tittel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Fritekst',
- 'importxml' => 'Importer XML',
- 'dt_import_selectfile' => 'Ver venleg og vel $1-fila som skal verta importert:',
- 'dt_import_encodingtype' => 'Teiknkodingstype:',
- 'dt_import_editsummary' => '$1-importering',
- 'dt_import_importing' => 'Importerer...',
- 'dt_import_success' => '$1 {{PLURAL:$1|Éi side vil verta importert|$1 sider vil verta importerte}} frå $2-fila.',
- 'importcsv' => 'Importer CSV',
- 'dt_importcsv_badheader' => "Feil: kolonneoverskrifta $1, '$2', må vera anten '$3', '$4' eller på forma 'malnamn[feltnamn]'",
- 'right-datatransferimport' => 'Importer data',
-);
-
-/** Norwegian (bokmål) (Norsk (bokmål))
- * @author Jon Harald Søby
- * @author Nghtwlkr
- */
-$messages['no'] = array(
- 'datatransfer-desc' => 'Gjør det mulig å importere og eksportere data som finnes i maloppkallinger',
- 'viewxml' => 'Se XML',
- 'dt_viewxml_docu' => 'Velg blant følgende kategorier og navnerom for å se dem i XML-format',
- 'dt_viewxml_categories' => 'Kategorier',
- 'dt_viewxml_namespaces' => 'Navnerom',
- 'dt_viewxml_simplifiedformat' => 'Forenklet format',
- 'dt_xml_namespace' => 'Navnerom',
- 'dt_xml_pages' => 'Sider',
- 'dt_xml_page' => 'Side',
- 'dt_xml_template' => 'Mal',
- 'dt_xml_field' => 'Felt',
- 'dt_xml_name' => 'Navn',
- 'dt_xml_title' => 'Tittel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Fritekst',
- 'importxml' => 'Importer XML',
- 'dt_import_selectfile' => 'Vennligst velg $1-filen som skal importeres:',
- 'dt_import_encodingtype' => 'Tegnkodingstype:',
- 'dt_import_forexisting' => 'For sider som allerede finnes:',
- 'dt_import_overwriteexisting' => 'Skriv over eksisterende innhold',
- 'dt_import_skipexisting' => 'Hopp over',
- 'dt_import_appendtoexisting' => 'Tilføy til eksisterende innhold',
- 'dt_import_summarydesc' => 'Importsammendrag:',
- 'dt_import_editsummary' => '$1-importering',
- 'dt_import_importing' => 'Importerer...',
- 'dt_import_success' => '{{PLURAL:$1|Én side|$1 sider}} vil bli importert fra $2-filen.',
- 'importcsv' => 'Importer CSV',
- 'dt_importcsv_badheader' => "Feil: kolonneoverskriften $1, '$2', må være enten '$3', '$4' eller på formen 'malnavn[feltnavn]'",
- 'right-datatransferimport' => 'Importer data',
-);
-
-/** Occitan (Occitan)
- * @author Cedric31
- */
-$messages['oc'] = array(
- 'datatransfer-desc' => "Permet l’impòrt e l’expòrt de donadas contengudas dins d'apèls de modèls",
- 'viewxml' => 'Veire XML',
- 'dt_viewxml_docu' => 'Seleccionatz demest las categorias e los espacis de nomenatges per visionar en format XML.',
- 'dt_viewxml_categories' => 'Categorias',
- 'dt_viewxml_namespaces' => 'Espacis de nomenatge',
- 'dt_viewxml_simplifiedformat' => 'Format simplificat',
- 'dt_xml_namespace' => 'Espaci de nom',
- 'dt_xml_pages' => 'Paginas',
- 'dt_xml_page' => 'Pagina',
- 'dt_xml_template' => 'Modèl',
- 'dt_xml_field' => 'Camp',
- 'dt_xml_name' => 'Nom',
- 'dt_xml_title' => 'Títol',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Tèxte Liure',
- 'importxml' => 'Impòrt en XML',
- 'dt_import_selectfile' => "Seleccionatz lo fichièr $1 d'importar :",
- 'dt_import_encodingtype' => 'Tipe d’encodatge:',
- 'dt_import_editsummary' => 'Importacion $1',
- 'dt_import_importing' => 'Impòrt en cors...',
- 'dt_import_success' => '$1 {{PLURAL:$1|pagina serà creada|paginas seràn creadas}} dempuèi lo fichièr $2.',
- 'importcsv' => 'Impòrt CSV',
- 'dt_importcsv_badheader' => 'Error : lo títol de colomna $1, « $2 », deu èsser siá « $3 », « $4 » o de la forma « nom_del_modèl[nom_del_camp] »',
- 'right-datatransferimport' => 'Importar de donadas',
-);
-
-/** Ossetic (Иронау)
- * @author Amikeco
- */
-$messages['os'] = array(
- 'dt_xml_page' => 'Фарс',
- 'dt_xml_template' => 'Шаблон',
- 'dt_xml_title' => 'Сæргонд',
-);
-
-/** Deitsch (Deitsch)
- * @author Xqt
- */
-$messages['pdc'] = array(
- 'dt_viewxml_categories' => 'Abdeelinge',
- 'dt_viewxml_namespaces' => 'Blatznaame',
- 'dt_xml_namespace' => 'Blatznaame',
- 'dt_xml_pages' => 'Bledder',
- 'dt_xml_page' => 'Blatt',
- 'dt_xml_template' => 'Moddel',
- 'dt_xml_name' => 'Naame',
- 'dt_xml_title' => 'Titel',
-);
-
-/** Polish (Polski)
- * @author McMonster
- * @author Sp5uhe
- * @author Wpedzich
- */
-$messages['pl'] = array(
- 'datatransfer-desc' => 'Pozwala na importowanie i eksportowanie danych zawartych w wywołaniach szablonu',
- 'viewxml' => 'Podgląd XML',
- 'dt_viewxml_docu' => 'Wybierz, które spośród następujących kategorii i przestrzeni nazw chcesz podejrzeć w formacie XML.',
- 'dt_viewxml_categories' => 'Kategorie',
- 'dt_viewxml_namespaces' => 'Przestrzenie nazw',
- 'dt_viewxml_simplifiedformat' => 'Format uproszczony',
- 'dt_xml_namespace' => 'Przestrzeń nazw',
- 'dt_xml_pages' => 'Strony',
- 'dt_xml_page' => 'Strona',
- 'dt_xml_template' => 'Szablon',
- 'dt_xml_field' => 'Pole',
- 'dt_xml_name' => 'Nazwa',
- 'dt_xml_title' => 'Tytuł',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Dowolny tekst',
- 'importxml' => 'Import XML',
- 'dt_import_selectfile' => 'Wybierz plik $1 do zaimportowania',
- 'dt_import_encodingtype' => 'Typ kodowania',
- 'dt_import_forexisting' => 'Dla stron, które już istnieją:',
- 'dt_import_overwriteexisting' => 'Zastąp istniejącą zawartość',
- 'dt_import_skipexisting' => 'Pomiń',
- 'dt_import_appendtoexisting' => 'Dołącz do istniejącej zawartości',
- 'dt_import_summarydesc' => 'Podsumowanie importu',
- 'dt_import_editsummary' => 'Import $1',
- 'dt_import_importing' => 'Importowanie...',
- 'dt_import_success' => '$1 {{PLURAL:$1|strona zostanie utworzona|strony zostaną utworzone|stron zostanie utworzonych}} z pliku $2.',
- 'importcsv' => 'Import CSV',
- 'dt_importcsv_badheader' => 'Błąd – w kolumnie $1 nagłówka jest „$2”, a powinno być: „$3”, „$4” lub „nazwa_szablonu[nazwa_pola]”',
- 'right-datatransferimport' => 'Importowanie danych',
-);
-
-/** Piedmontese (Piemontèis)
- * @author Borichèt
- * @author Dragonòt
- */
-$messages['pms'] = array(
- 'datatransfer-desc' => "A përmëtt d'amporté e esporté ij dat contnù ant le ciamà a stamp",
- 'viewxml' => 'Varda XML',
- 'dt_viewxml_docu' => 'Për piasì selession-a an tra le categorìe sota e jë spassi nominaj për vëdde an formà XLM.',
- 'dt_viewxml_categories' => 'Categorìe',
- 'dt_viewxml_namespaces' => 'Spassi nominaj',
- 'dt_viewxml_simplifiedformat' => 'Formà semplificà',
- 'dt_xml_namespace' => 'Spassi nominal',
- 'dt_xml_pages' => 'Pàgine',
- 'dt_xml_page' => 'Pàgina',
- 'dt_xml_template' => 'Stamp',
- 'dt_xml_field' => 'Camp',
- 'dt_xml_name' => 'Nòm',
- 'dt_xml_title' => 'Tìtol',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Test lìber',
- 'importxml' => 'Ampòrta XML',
- 'dt_import_selectfile' => 'Për piasì selession-a ël file $1 da amporté:',
- 'dt_import_encodingtype' => 'Tipo ëd codìfica:',
- 'dt_import_forexisting' => "Për pàgine ch'a esisto già:",
- 'dt_import_overwriteexisting' => 'Coaté ël contnù esistent',
- 'dt_import_skipexisting' => 'Saoté',
- 'dt_import_appendtoexisting' => 'Gionté al contnù esistent',
- 'dt_import_summarydesc' => "Somari dj'amportassion:",
- 'dt_import_editsummary' => '$1 ampòrta',
- 'dt_import_importing' => "An camin ch'as ampòrta...",
- 'dt_import_success' => "$1 {{PLURAL:$1|pàgina|pàgine}} a saran creà da l'archivi $2.",
- 'importcsv' => 'Ampòrta CSV',
- 'dt_importcsv_badheader' => "Eror: l'antestassion ëd la colòna $1, '$2', a deuv esse '$3', '$4' o ëd la forma 'template_name[field_name]'",
- 'right-datatransferimport' => 'Ampòrta dat',
-);
-
-/** Pashto (پښتو)
- * @author Ahmed-Najib-Biabani-Ibrahimkhel
- */
-$messages['ps'] = array(
- 'dt_viewxml_categories' => 'وېشنيزې',
- 'dt_viewxml_namespaces' => 'نوم-تشيالونه',
- 'dt_xml_namespace' => 'نوم-تشيال',
- 'dt_xml_pages' => 'مخونه',
- 'dt_xml_page' => 'مخ',
- 'dt_xml_template' => 'کينډۍ',
- 'dt_xml_name' => 'نوم',
- 'dt_xml_title' => 'سرليک',
- 'dt_xml_freetext' => 'خپلواکه متن',
-);
-
-/** Portuguese (Português)
- * @author Hamilton Abreu
- * @author Lijealso
- * @author Malafaya
- */
-$messages['pt'] = array(
- 'datatransfer-desc' => 'Permite importação e exportação de dados contidos em chamadas de predefinições',
- 'viewxml' => 'Ver XML',
- 'dt_viewxml_docu' => 'Por favor, seleccione de entre as categorias e espaços nominais seguintes para ver em formato XML.',
- 'dt_viewxml_categories' => 'Categorias',
- 'dt_viewxml_namespaces' => 'Espaços nominais',
- 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
- 'dt_xml_namespace' => 'Espaço nominal',
- 'dt_xml_pages' => 'Páginas',
- 'dt_xml_page' => 'Página',
- 'dt_xml_template' => 'Predefinição',
- 'dt_xml_field' => 'Campo',
- 'dt_xml_name' => 'Nome',
- 'dt_xml_title' => 'Título',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Texto Livre',
- 'importxml' => 'Importar XML',
- 'dt_import_selectfile' => 'Por favor, selecione o ficheiro $1 a importar:',
- 'dt_import_encodingtype' => 'Tipo de codificação:',
- 'dt_import_forexisting' => 'Para páginas que já existem:',
- 'dt_import_overwriteexisting' => 'Sobrescrever o conteúdo existente',
- 'dt_import_skipexisting' => 'Saltar',
- 'dt_import_appendtoexisting' => 'Acrescentar ao conteúdo existente',
- 'dt_import_summarydesc' => 'Resumo da importação:',
- 'dt_import_editsummary' => 'Importação de $1',
- 'dt_import_importing' => 'Importando...',
- 'dt_import_success' => '{{PLURAL:$1|A página será importada|As páginas serão importadas}} a partir do ficheiro $2.',
- 'importcsv' => 'Importar CSV',
- 'dt_importcsv_badheader' => "Erro: o cabeçalho da coluna $1, '$2', deve ser '$3', '$4' ou ter a forma 'nome_da_predefinição[nome_do_campo]'",
- 'right-datatransferimport' => 'Importar dados',
-);
-
-/** Brazilian Portuguese (Português do Brasil)
- * @author Eduardo.mps
- * @author Giro720
- */
-$messages['pt-br'] = array(
- 'datatransfer-desc' => 'Permite a importação e exportação de dados contidos em chamadas de predefinições',
- 'viewxml' => 'Ver XML',
- 'dt_viewxml_docu' => 'Por favor, selecione dentre as categorias e espaços nominais seguintes para ver em formato XML.',
- 'dt_viewxml_categories' => 'Categorias',
- 'dt_viewxml_namespaces' => 'Espaços nominais',
- 'dt_viewxml_simplifiedformat' => 'Formato simplificado',
- 'dt_xml_namespace' => 'Espaço nominal',
- 'dt_xml_pages' => 'Páginas',
- 'dt_xml_page' => 'Página',
- 'dt_xml_template' => 'Predefinição',
- 'dt_xml_field' => 'Campo',
- 'dt_xml_name' => 'Nome',
- 'dt_xml_title' => 'Título',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Texto Livre',
- 'importxml' => 'Importar XML',
- 'dt_import_selectfile' => 'Por favor selecione o arquivo $1 para importar:',
- 'dt_import_encodingtype' => 'Codificação:',
- 'dt_import_forexisting' => 'Para páginas que já existem:',
- 'dt_import_overwriteexisting' => 'Sobrescrever o conteúdo existente',
- 'dt_import_skipexisting' => 'Pular',
- 'dt_import_appendtoexisting' => 'Adicionar ao conteúdo existente',
- 'dt_import_summarydesc' => 'Resumo da importação:',
- 'dt_import_editsummary' => 'Importação de $1',
- 'dt_import_importing' => 'Importando...',
- 'dt_import_success' => '$1 {{PLURAL:$1|página será importada|páginas serão importadas}} do arquivo $2.',
- 'importcsv' => 'Importar CSV',
- 'dt_importcsv_badheader' => "Erro: o cabeçalho da coluna $1, '$2', deve ser '$3', ou '$4' ou da forma 'nome_modelo[nome_campo]'",
- 'right-datatransferimport' => 'Importar dados',
-);
-
-/** Romanian (Română)
- * @author KlaudiuMihaila
- * @author Stelistcristi
- */
-$messages['ro'] = array(
- 'viewxml' => 'Vizualizează XML',
- 'dt_viewxml_categories' => 'Categorii',
- 'dt_viewxml_namespaces' => 'Spații de nume',
- 'dt_viewxml_simplifiedformat' => 'Format simplificat',
- 'dt_xml_namespace' => 'Spațiu de nume',
- 'dt_xml_pages' => 'Pagini',
- 'dt_xml_page' => 'Pagină',
- 'dt_xml_template' => 'Format',
- 'dt_xml_field' => 'Câmp',
- 'dt_xml_name' => 'Nume',
- 'dt_xml_title' => 'Titlu',
- 'dt_xml_id' => 'ID',
- 'importxml' => 'Importă XML',
- 'dt_import_summarydesc' => 'Descrierea importului:',
- 'dt_import_importing' => 'Importare...',
- 'importcsv' => 'Importă CSV',
- 'right-datatransferimport' => 'Importă date',
-);
-
-/** Tarandíne (Tarandíne)
- * @author Joetaras
- */
-$messages['roa-tara'] = array(
- 'datatransfer-desc' => "Permètte de 'mbortà e esportà date strutturate ca stonne jndr'à le chiamate a le template",
- 'viewxml' => "Vide l'XML",
- 'dt_viewxml_docu' => "Pe piacere scacchie ìmbrà le categorije seguende e le namespace seguende pe vedè 'u formate XML.",
- 'dt_viewxml_categories' => 'Categorije',
- 'dt_viewxml_namespaces' => 'Namespace',
- 'dt_viewxml_simplifiedformat' => 'Formate semblifichete',
- 'dt_xml_namespace' => 'Namespace',
- 'dt_xml_pages' => 'Pàggene',
- 'dt_xml_page' => 'Pàgene',
- 'dt_xml_template' => 'Template',
- 'dt_xml_field' => 'Cambe',
- 'dt_xml_name' => 'Nome',
- 'dt_xml_title' => 'Titele',
- 'dt_xml_id' => 'Codece (ID)',
- 'dt_xml_freetext' => 'Teste libbere',
- 'importxml' => "'Mborte XML",
-);
-
-/** Russian (Русский)
- * @author Ferrer
- * @author Innv
- * @author Александр Сигачёв
- */
-$messages['ru'] = array(
- 'datatransfer-desc' => 'Позволяет импортировать и экспортировать данные, содержащиеся в вызовах шаблонов',
- 'viewxml' => 'Просмотр XML',
- 'dt_viewxml_docu' => 'Пожалуйста, выберите категории и пространства имён для просмотра в формате XML.',
- 'dt_viewxml_categories' => 'Категории',
- 'dt_viewxml_namespaces' => 'Пространства имён',
- 'dt_viewxml_simplifiedformat' => 'Упрощённый формат',
- 'dt_xml_namespace' => 'Пространство имён',
- 'dt_xml_pages' => 'Страницы',
- 'dt_xml_page' => 'Страница',
- 'dt_xml_template' => 'Шаблон',
- 'dt_xml_field' => 'Поле',
- 'dt_xml_name' => 'Имя',
- 'dt_xml_title' => 'Заголовок',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Свободный текст',
- 'importxml' => 'Импорт XML',
- 'dt_import_selectfile' => 'Пожалуйста, выберите файл $1 для импорта:',
- 'dt_import_encodingtype' => 'Тип кодировки:',
- 'dt_import_forexisting' => 'Для страниц, которые уже существуют:',
- 'dt_import_overwriteexisting' => 'Переписать существующие данные',
- 'dt_import_skipexisting' => 'Пропустить',
- 'dt_import_appendtoexisting' => 'Добавить к существующим данным',
- 'dt_import_summarydesc' => 'Описание импорта:',
- 'dt_import_editsummary' => 'импорт $1',
- 'dt_import_importing' => 'Импортирование...',
- 'dt_import_success' => '$1 {{PLURAL:$1|страница была|страницы были|страниц были}} созданы из файла $2.',
- 'importcsv' => 'Импорт CSV',
- 'dt_importcsv_badheader' => 'Ошибка. Заголовок колонки №$1 «$2» должен быть или «$3», или «$4», или в форме «template_name[field_name]»',
- 'right-datatransferimport' => 'импорт информации',
-);
-
-/** Rusyn (Русиньскый)
- * @author Gazeb
- */
-$messages['rue'] = array(
- 'dt_viewxml_categories' => 'Катеґорії',
- 'dt_viewxml_namespaces' => 'Просторы назв',
- 'dt_viewxml_simplifiedformat' => 'Простый формат',
- 'dt_xml_namespace' => 'Простор назв',
- 'dt_xml_pages' => 'Сторінкы',
- 'dt_xml_page' => 'Сторінка',
- 'dt_xml_template' => 'Шаблона',
- 'dt_xml_field' => 'Поле',
- 'dt_xml_name' => 'Назва',
- 'dt_xml_title' => 'Надпис',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Вольный текст',
- 'importxml' => 'Імпортовати XML',
-);
-
-/** Sicilian (Sicilianu)
- * @author Aushulz
- */
-$messages['scn'] = array(
- 'dt_xml_name' => 'Nomu',
- 'dt_xml_id' => 'ID',
-);
-
-/** Slovak (Slovenčina)
- * @author Helix84
- */
-$messages['sk'] = array(
- 'datatransfer-desc' => 'Umožňuje import a export údajov obsiahnutých v bunkách šablón',
- 'viewxml' => 'Zobraziť XML',
- 'dt_viewxml_docu' => 'Prosím, vyberte ktorý spomedzi nasledovných kategórií a menných priestorov zobraziť vo formáte XML.',
- 'dt_viewxml_categories' => 'Kategórie',
- 'dt_viewxml_namespaces' => 'Menné priestory',
- 'dt_viewxml_simplifiedformat' => 'Zjednodušený formát',
- 'dt_xml_namespace' => 'Menný priestor',
- 'dt_xml_pages' => 'Stránky',
- 'dt_xml_page' => 'Stránka',
- 'dt_xml_template' => 'Šablóna',
- 'dt_xml_field' => 'Pole',
- 'dt_xml_name' => 'Názov',
- 'dt_xml_title' => 'Nadpis',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Voľný text',
- 'importxml' => 'Importovať XML',
- 'dt_import_selectfile' => 'Prosím, vyberte $1 súbor, ktorý chcete importovať:',
- 'dt_import_encodingtype' => 'Typ kódovania:',
- 'dt_import_editsummary' => 'Import $1',
- 'dt_import_importing' => 'Prebieha import...',
- 'dt_import_success' => 'Z $2 súboru sa {{PLURAL:$1|importuje $1 stránka|importujú $1 stránky|importuje $1 stránok}}.',
- 'importcsv' => 'Import CSV',
- 'dt_importcsv_badheader' => 'Chyba: stĺpec $1 hlavičky, „$2“ musí mať hodnotu buď „$3“, „$4“ alebo byť v tvare „názov_šablóny[názov_poľa]“',
- 'right-datatransferimport' => 'Importovať údaje',
-);
-
-/** Slovenian (Slovenščina)
- * @author Dbc334
- */
-$messages['sl'] = array(
- 'dt_xml_pages' => 'Strani',
- 'dt_xml_page' => 'Stran',
-);
-
-/** Serbian Cyrillic ekavian (Српски (ћирилица))
- * @author Rancher
- * @author Sasa Stefanovic
- * @author Жељко Тодоровић
- * @author Михајло Анђелковић
- */
-$messages['sr-ec'] = array(
- 'viewxml' => 'Види XML',
- 'dt_viewxml_categories' => 'Категорије',
- 'dt_viewxml_namespaces' => 'Именски простори',
- 'dt_viewxml_simplifiedformat' => 'Поједностављени формат',
- 'dt_xml_namespace' => 'Именски простор',
- 'dt_xml_pages' => 'Чланци',
- 'dt_xml_page' => 'Страница',
- 'dt_xml_template' => 'Шаблон',
- 'dt_xml_field' => 'Поље',
- 'dt_xml_name' => 'Име',
- 'dt_xml_title' => 'Наслов',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Слободан текст',
- 'importxml' => 'Увези XML',
- 'dt_import_editsummary' => '$1 увоз',
- 'dt_import_importing' => 'Увоз у току...',
- 'importcsv' => 'Увези CSV',
- 'right-datatransferimport' => 'Увези податке',
-);
-
-/** Serbian Latin ekavian (Srpski (latinica))
- * @author Michaello
- * @author Жељко Тодоровић
- */
-$messages['sr-el'] = array(
- 'viewxml' => 'Vidi XML',
- 'dt_viewxml_categories' => 'Kategorije',
- 'dt_viewxml_namespaces' => 'Imenski prostori',
- 'dt_viewxml_simplifiedformat' => 'Pojednostavljeni format',
- 'dt_xml_namespace' => 'Imenski prostor',
- 'dt_xml_pages' => 'Članci',
- 'dt_xml_page' => 'Stranica',
- 'dt_xml_template' => 'Šablon',
- 'dt_xml_field' => 'Polje',
- 'dt_xml_name' => 'Ime',
- 'dt_xml_title' => 'Naslov',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Slobodan tekst',
- 'importxml' => 'Uvezi XML',
- 'dt_import_editsummary' => '$1 uvoz',
- 'dt_import_importing' => 'Uvoz u toku...',
- 'importcsv' => 'Uvezi CSV',
- 'right-datatransferimport' => 'Uvezi podatke',
-);
-
-/** Seeltersk (Seeltersk)
- * @author Pyt
- */
-$messages['stq'] = array(
- 'datatransfer-desc' => 'Ferlööwet dän Import un Export fon strukturierde Doaten, do der in Aproupen un Foarloagen ferwoand wäide.',
- 'viewxml' => 'XML ankiekje',
- 'dt_viewxml_docu' => 'Wääl uut, wäkke Kategorien in dät XML-Formoat anwiesd wäide schällen.',
- 'dt_viewxml_categories' => 'Kategorien',
- 'dt_viewxml_namespaces' => 'Noomensruume',
- 'dt_viewxml_simplifiedformat' => 'Fereenfacht Formoat',
- 'dt_xml_namespace' => 'Noomensruum',
- 'dt_xml_page' => 'Siede',
- 'dt_xml_field' => 'Fäild',
- 'dt_xml_name' => 'Noome',
- 'dt_xml_title' => 'Tittel',
-);
-
-/** Sundanese (Basa Sunda)
- * @author Irwangatot
- */
-$messages['su'] = array(
- 'dt_viewxml_namespaces' => 'Ngaranspasi',
-);
-
-/** Swedish (Svenska)
- * @author Fluff
- * @author Gabbe.g
- * @author Lejonel
- * @author M.M.S.
- * @author Per
- */
-$messages['sv'] = array(
- 'datatransfer-desc' => 'Tillåter import och export av data som finns i mallanrop',
- 'viewxml' => 'Visa XML',
- 'dt_viewxml_docu' => 'Välj vilka av följande kategorier och namnrymder som ska visas i XML-format.',
- 'dt_viewxml_categories' => 'Kategorier',
- 'dt_viewxml_namespaces' => 'Namnrymder',
- 'dt_viewxml_simplifiedformat' => 'Förenklat format',
- 'dt_xml_namespace' => 'Namnrymd',
- 'dt_xml_pages' => 'Sidor',
- 'dt_xml_page' => 'Sida',
- 'dt_xml_template' => 'Mall',
- 'dt_xml_field' => 'Fält',
- 'dt_xml_name' => 'Namn',
- 'dt_xml_title' => 'Titel',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Fritext',
- 'importxml' => 'Importera XML',
- 'dt_import_selectfile' => 'Vänligen välj $1-filen som skall importeras:',
- 'dt_import_encodingtype' => 'Teckenkodningstyp:',
- 'dt_import_editsummary' => '$1-importering',
- 'dt_import_importing' => 'Importerar...',
- 'dt_import_success' => '$1 {{PLURAL:$1|sida|sidor}} kommer skapas från $2-filen.',
- 'importcsv' => 'Importera CSV',
- 'dt_importcsv_badheader' => "Fel: Titeln $2 för kolumnen $1 måste vara antingen $3, $4 eller på formen 'mallnamn[fältnamn]'",
- 'right-datatransferimport' => 'Importera data',
-);
-
-/** Silesian (Ślůnski)
- * @author Herr Kriss
- */
-$messages['szl'] = array(
- 'dt_xml_page' => 'Zajta',
- 'dt_xml_name' => 'Mjano',
-);
-
-/** Tamil (தமிழ்)
- * @author TRYPPN
- * @author Trengarasu
- * @author Ulmo
- */
-$messages['ta'] = array(
- 'dt_viewxml_categories' => 'பகுப்புகள்',
- 'dt_viewxml_namespaces' => 'பெயர்வெளிகள்',
- 'dt_viewxml_simplifiedformat' => 'எளிதாக்கப்பட்ட வடிவம்',
- 'dt_xml_namespace' => 'பெயர்வெளி',
- 'dt_xml_pages' => 'பக்கங்கள்',
- 'dt_xml_page' => 'பக்கம்',
- 'dt_xml_template' => 'வார்ப்புரு',
- 'dt_xml_name' => 'பெயர்',
- 'dt_xml_title' => 'தலைப்பு',
- 'dt_xml_id' => 'அடையாளம்',
- 'dt_xml_freetext' => 'எந்த கட்டுப்பாடும் இல்லா சொற்றொடர்',
- 'dt_import_importing' => 'இறக்குமதியாகிறது...',
-);
-
-/** Telugu (తెలుగు)
- * @author Veeven
- */
-$messages['te'] = array(
- 'viewxml' => 'XMLని చూడండి',
- 'dt_viewxml_categories' => 'వర్గాలు',
- 'dt_viewxml_namespaces' => 'పేరుబరులు',
- 'dt_xml_namespace' => 'పేరుబరి',
- 'dt_xml_pages' => 'పేజీలు',
- 'dt_xml_page' => 'పేజీ',
- 'dt_xml_template' => 'మూస',
- 'dt_xml_name' => 'పేరు',
- 'dt_xml_title' => 'శీర్షిక',
- 'dt_xml_id' => 'ఐడీ',
- 'dt_xml_freetext' => 'స్వేచ్ఛా పాఠ్యం',
-);
-
-/** Tetum (Tetun)
- * @author MF-Warburg
- */
-$messages['tet'] = array(
- 'dt_viewxml_categories' => 'Kategoria sira',
- 'dt_xml_namespace' => 'Espasu pájina nian',
- 'dt_xml_page' => 'Pájina',
- 'dt_xml_name' => 'Naran',
- 'dt_xml_title' => 'Títulu:',
- 'dt_xml_id' => 'ID',
-);
-
-/** Tajik (Cyrillic) (Тоҷикӣ (Cyrillic))
- * @author Ibrahim
- */
-$messages['tg-cyrl'] = array(
- 'dt_viewxml_categories' => 'Гурӯҳҳо',
- 'dt_viewxml_namespaces' => 'Фазоҳои ном',
- 'dt_xml_namespace' => 'Фазоином',
- 'dt_xml_page' => 'Саҳифа',
- 'dt_xml_name' => 'Ном',
- 'dt_xml_title' => 'Унвон',
- 'dt_xml_freetext' => 'Матни дилхоҳ',
-);
-
-/** Tajik (Latin) (Тоҷикӣ (Latin))
- * @author Liangent
- */
-$messages['tg-latn'] = array(
- 'dt_viewxml_categories' => 'Gurūhho',
- 'dt_viewxml_namespaces' => 'Fazohoi nom',
- 'dt_xml_namespace' => 'Fazoinom',
- 'dt_xml_page' => 'Sahifa',
- 'dt_xml_name' => 'Nom',
- 'dt_xml_title' => 'Unvon',
- 'dt_xml_freetext' => 'Matni dilxoh',
-);
-
-/** Thai (ไทย)
- * @author Octahedron80
- */
-$messages['th'] = array(
- 'dt_viewxml_categories' => 'หมวดหมู่',
- 'dt_viewxml_namespaces' => 'เนมสเปซ',
- 'dt_xml_namespace' => 'เนมสเปซ',
-);
-
-/** Turkmen (Türkmençe)
- * @author Hanberke
- */
-$messages['tk'] = array(
- 'dt_xml_page' => 'Sahypa',
- 'dt_xml_name' => 'At',
-);
-
-/** Tagalog (Tagalog)
- * @author AnakngAraw
- */
-$messages['tl'] = array(
- 'datatransfer-desc' => 'Nagpapahintulot sa pag-aangkat at pagluluwas ng mga datong nasa loob ng mga pagtawag sa suleras',
- 'viewxml' => 'Tingnan ang XML',
- 'dt_viewxml_docu' => 'Pumili po lamang mula sa sumusunod na mga kaurian at mga espasyo ng pangalan upang makita ang anyong XML.',
- 'dt_viewxml_categories' => 'Mga kaurian',
- 'dt_viewxml_namespaces' => 'Mga espasyo ng pangalan',
- 'dt_viewxml_simplifiedformat' => 'Pinapayak na anyo',
- 'dt_xml_namespace' => 'Espasyo ng pangalan',
- 'dt_xml_pages' => 'Mga pahina',
- 'dt_xml_page' => 'Pahina',
- 'dt_xml_template' => 'Suleras',
- 'dt_xml_field' => 'Hanay',
- 'dt_xml_name' => 'Pangalan',
- 'dt_xml_title' => 'Pamagat',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Malayang Teksto',
- 'importxml' => 'Angkatin ang XML',
- 'dt_import_selectfile' => 'Pakipili ang talaksang $1 na aangkatin:',
- 'dt_import_encodingtype' => 'Uri ng pagkokodigo:',
- 'dt_import_forexisting' => 'Para sa mga pahinang umiiral na:',
- 'dt_import_overwriteexisting' => 'Patungan ang umiiral na nilalaman',
- 'dt_import_skipexisting' => 'Laktawan',
- 'dt_import_appendtoexisting' => 'Isugpong sa umiiral na nilalaman',
- 'dt_import_summarydesc' => 'Buod ng pag-angkat:',
- 'dt_import_editsummary' => 'Pag-angkat ng $1',
- 'dt_import_importing' => 'Inaangkat...',
- 'dt_import_success' => '$1 {{PLURAL:$1|pahina|mga pahina}} ang lilikhain mula sa talaksang $2.',
- 'importcsv' => 'Angkatin ang CSV',
- 'dt_importcsv_badheader' => "Kamalian: ang patayong hanay ng paulong $1, '$2', ay dapat na '$3', '$4' o nasa pormang 'template_name[field_name]'",
- 'right-datatransferimport' => 'Angkatin ang dato',
-);
-
-/** Turkish (Türkçe)
- * @author Joseph
- * @author Karduelis
- * @author Mach
- * @author Manco Capac
- * @author Srhat
- * @author Vito Genovese
- */
-$messages['tr'] = array(
- 'datatransfer-desc' => 'Şablon çağrılarında içerilen verilerin içe ve dışa aktarımına izin verir',
- 'viewxml' => "XML'i gör",
- 'dt_viewxml_docu' => 'Lütfen, XML formatında görüntülemek için aşağıdaki kategori ve ad alanları arasından seçin.',
- 'dt_viewxml_categories' => 'Kategoriler',
- 'dt_viewxml_namespaces' => 'İsim alanları',
- 'dt_viewxml_simplifiedformat' => 'Basitleştirilmiş format',
- 'dt_xml_namespace' => 'Ad alanı',
- 'dt_xml_pages' => 'Sayfalar',
- 'dt_xml_page' => 'Sayfa',
- 'dt_xml_template' => 'Şablon',
- 'dt_xml_field' => 'Alan',
- 'dt_xml_name' => 'İsim',
- 'dt_xml_title' => 'Başlık',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Özgür Metin',
- 'importxml' => 'XML içe aktar',
- 'dt_import_selectfile' => 'Lütfen içe aktarmak için $1 dosyasını seçin:',
- 'dt_import_encodingtype' => 'Kodlama türü:',
- 'dt_import_summarydesc' => 'İçe aktarma özeti:',
- 'dt_import_editsummary' => '$1 içe aktarımı',
- 'dt_import_importing' => 'İçe aktarıyor...',
- 'dt_import_success' => '$2 dosyasından $1 {{PLURAL:$1|sayfa|sayfa}} oluşturulacak.',
- 'importcsv' => "CSV'yi içe aktar",
- 'dt_importcsv_badheader' => "Hata: $1 kolonunun başlığı olan '$2', '$3', '$4' ya da 'şablon_adı[alan_adı]' şeklinde olmalıdır",
- 'right-datatransferimport' => 'Verileri içe aktarır',
-);
-
-/** Uighur (Latin) (ئۇيغۇرچە / Uyghurche (Latin))
- * @author Jose77
- */
-$messages['ug-latn'] = array(
- 'dt_xml_page' => 'Bet',
-);
-
-/** Ukrainian (Українська)
- * @author AS
- * @author Arturyatsko
- * @author Prima klasy4na
- * @author Тест
- */
-$messages['uk'] = array(
- 'datatransfer-desc' => 'Дозволяє імпортувати та експортувати дані, які містяться в викликах шаблонів',
- 'viewxml' => 'Перегляд XML',
- 'dt_viewxml_docu' => 'Будь ласка, виберіть одну з наступних категорій та імен для перегляду в форматі XML.',
- 'dt_viewxml_categories' => 'Категорії',
- 'dt_viewxml_namespaces' => 'Простори назв',
- 'dt_viewxml_simplifiedformat' => 'Спрощений формат',
- 'dt_xml_namespace' => 'Простір назв',
- 'dt_xml_pages' => 'Сторінки',
- 'dt_xml_page' => 'Сторінка',
- 'dt_xml_template' => 'Шаблон',
- 'dt_xml_field' => 'Поле',
- 'dt_xml_name' => 'Назва',
- 'dt_xml_title' => 'Заголовок',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Вільний текст',
- 'importxml' => 'Імпорт XML',
- 'dt_import_selectfile' => 'Будь ласка, виберіть файл $1 для імпорту:',
- 'dt_import_encodingtype' => 'Тип кодування:',
- 'dt_import_forexisting' => 'Для сторінок, які вже існують:',
- 'dt_import_overwriteexisting' => 'Перезаписати існуючий вміст',
- 'dt_import_skipexisting' => 'Пропустити',
- 'dt_import_appendtoexisting' => 'Додати до існуючого вмісту',
- 'dt_import_summarydesc' => 'Опис імпорту:',
- 'dt_import_editsummary' => 'імпорт $1',
- 'dt_import_importing' => 'Імпорт ...',
- 'dt_import_success' => '$1 {{PLURAL:$1|сторінка була|сторінки було|сторінок було}} створено з файлу $2.',
- 'importcsv' => 'Імпорт CSV',
- 'dt_importcsv_badheader' => 'Помилка. Заголовок колонки №$1 «$2» повинен бути або «$3», або «$4», або у формі «template_name[field_name]»',
- 'right-datatransferimport' => 'Імпорт даних',
-);
-
-/** Vietnamese (Tiếng Việt)
- * @author Minh Nguyen
- * @author Vinhtantran
- */
-$messages['vi'] = array(
- 'datatransfer-desc' => 'Cho phép nhập xuất dữ liệu có cấu trúc được chứa trong lời gọi bản mẫu',
- 'viewxml' => 'Xem XML',
- 'dt_viewxml_docu' => 'Xin hãy chọn trong những thể loại và không gian tên dưới đây để xem ở dạng XML.',
- 'dt_viewxml_categories' => 'Thể loại',
- 'dt_viewxml_namespaces' => 'Không gian tên',
- 'dt_viewxml_simplifiedformat' => 'Định dạng đơn giản hóa',
- 'dt_xml_namespace' => 'Không gian tên',
- 'dt_xml_pages' => 'Trang',
- 'dt_xml_page' => 'Trang',
- 'dt_xml_template' => 'Bản mẫu',
- 'dt_xml_field' => 'Trường',
- 'dt_xml_name' => 'Tên',
- 'dt_xml_title' => 'Tựa đề',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => 'Văn bản Tự do',
- 'importxml' => 'Nhập XML',
- 'dt_import_selectfile' => 'Xin hãy chọn tập tin $1 để nhập:',
- 'dt_import_encodingtype' => 'Bảng mã:',
- 'dt_import_editsummary' => 'Nhập $1',
- 'dt_import_importing' => 'Đang nhập…',
- 'dt_import_success' => '{{PLURAL:$1|Trang|$1 trang}} sẽ được nhập từ tập tin $2.',
- 'importcsv' => 'Nhập CSV',
- 'dt_importcsv_badheader' => 'Lỗi: tên của cột $1, “$2”, phải là “$3” hay “$4”, hoặc phải theo hình dạng “tên_tiêu_bản[tên_trường]”',
- 'right-datatransferimport' => 'Nhập dữ liệu',
-);
-
-/** Volapük (Volapük)
- * @author Malafaya
- * @author Smeira
- */
-$messages['vo'] = array(
- 'datatransfer-desc' => 'Dälon nüveigi e seveigi nünodas peleodüköl in samafomotilüvoks paninädöls',
- 'viewxml' => 'Logön eli XML',
- 'dt_viewxml_docu' => 'Välolös bevü klads e nemaspads foviks utosi, kelosi vilol logön fomätü XML.',
- 'dt_viewxml_categories' => 'Klads',
- 'dt_viewxml_namespaces' => 'Nemaspads',
- 'dt_viewxml_simplifiedformat' => 'Fomät pebalugüköl',
- 'dt_xml_namespace' => 'Nemaspad',
- 'dt_xml_page' => 'Pad',
- 'dt_xml_field' => 'Fel',
- 'dt_xml_name' => 'Nem',
- 'dt_xml_title' => 'Tiäd',
- 'dt_xml_id' => 'Dientifanüm',
- 'dt_xml_freetext' => 'Vödem libik',
-);
-
-/** Yiddish (ייִדיש)
- * @author פוילישער
- */
-$messages['yi'] = array(
- 'dt_xml_name' => 'נאָמען',
- 'dt_xml_title' => 'טיטל',
-);
-
-/** Simplified Chinese (中文(简体))
- * @author Gaoxuewei
- */
-$messages['zh-hans'] = array(
- 'datatransfer-desc' => '允许根据模板的要求导入导出结构化的数据',
- 'viewxml' => '查看XML',
- 'dt_viewxml_docu' => '请在下列分类、名称空间中选择,以使用XML格式查看。',
- 'dt_viewxml_categories' => '分类',
- 'dt_viewxml_namespaces' => '名称空间',
- 'dt_viewxml_simplifiedformat' => '简化格式',
- 'dt_xml_namespace' => '名称空间',
- 'dt_xml_pages' => '页面',
- 'dt_xml_page' => '页面',
- 'dt_xml_template' => '模板',
- 'dt_xml_field' => '事件',
- 'dt_xml_name' => '名称',
- 'dt_xml_title' => '标题',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => '自由文本',
-);
-
-/** Traditional Chinese (中文(繁體))
- * @author Liangent
- * @author Mark85296341
- */
-$messages['zh-hant'] = array(
- 'datatransfer-desc' => '允許根據模板的要求導入導出結構化的數據',
- 'viewxml' => '檢視XML',
- 'dt_viewxml_docu' => '請在下列分類、名稱空間中選擇,以使用XML格式查看。',
- 'dt_viewxml_categories' => '分類',
- 'dt_viewxml_namespaces' => '名稱空間',
- 'dt_viewxml_simplifiedformat' => '簡化格式',
- 'dt_xml_namespace' => '名稱空間',
- 'dt_xml_pages' => '頁面',
- 'dt_xml_page' => '頁面',
- 'dt_xml_template' => '模板',
- 'dt_xml_name' => '名稱',
- 'dt_xml_title' => '標題',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => '自由文字',
-);
-
-/** Chinese (Taiwan) (中文(台灣))
- * @author Pbdragonwang
- * @author Roc michael
- */
-$messages['zh-tw'] = array(
- 'datatransfer-desc' => '允許匯入及匯出引用樣板(template calls)的結構性資料',
- 'viewxml' => '查看 XML',
- 'dt_viewxml_docu' => '請選取以下的分類及名字空間以查看其XML格式的資料',
- 'dt_viewxml_categories' => '分類',
- 'dt_viewxml_namespaces' => '名字空間',
- 'dt_viewxml_simplifiedformat' => '簡化的格式',
- 'dt_xml_namespace' => '名字空間',
- 'dt_xml_pages' => '頁面',
- 'dt_xml_page' => '頁面',
- 'dt_xml_template' => '模板',
- 'dt_xml_field' => '欄位',
- 'dt_xml_name' => '名稱',
- 'dt_xml_title' => '標題(Title)',
- 'dt_xml_id' => 'ID',
- 'dt_xml_freetext' => '隨意文字',
- 'importxml' => '匯入XML',
- 'dt_import_selectfile' => '請選取$1檔以供匯入',
- 'dt_import_encodingtype' => '編碼類型',
- 'dt_import_summarydesc' => '輸入的摘要',
- 'dt_import_editsummary' => '匯入$1',
- 'dt_import_importing' => '匯入中...',
- 'dt_import_success' => '將從該$2檔匯入$1{{PLURAL:$1|頁面頁面}}。',
- 'importcsv' => '匯入CSV檔',
- 'dt_importcsv_badheader' => "錯誤:$1欄位的標題「$2」或必須為「$3」,「$4」或表單「模板名稱[欄位名稱]」<br />
-Error: the column $1 header, '$2', must be either '$3', '$4' or of the form 'template_name[field_name]'",
- 'right-datatransferimport' => '輸入資料',
-);
-
+++ /dev/null
-<?php
-/**
- * Lets the user import a CSV file to turn into wiki pages
- *
- * @author Yaron Koren
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) die();
-
-class DTPage {
- var $mName;
- var $mTemplates;
- var $mFreeText;
-
- public function DTPage() {
- $this->mTemplates = array();
- }
-
- function setName( $name ) {
- $this->mName = $name;
- }
-
- function getName() {
- return $this->mName;
- }
-
- function addTemplateField( $template_name, $field_name, $value ) {
- if ( ! array_key_exists( $template_name, $this->mTemplates ) ) {
- $this->mTemplates[$template_name] = array();
- }
- $this->mTemplates[$template_name][$field_name] = $value;
- }
-
- function setFreeText( $free_text ) {
- $this->mFreeText = $free_text;
- }
-
- function createText() {
- $text = "";
- foreach ( $this->mTemplates as $template_name => $fields ) {
- $text .= '{{' . $template_name . "\n";
- foreach ( $fields as $field_name => $val ) {
- $text .= "|$field_name=$val\n";
- }
- $text .= '}}' . "\n";
- }
- $text .= $this->mFreeText;
- return $text;
- }
-}
-
-class DTImportCSV extends SpecialPage {
-
- /**
- * Constructor
- */
- public function DTImportCSV() {
- global $wgLanguageCode;
- parent::__construct( 'ImportCSV' );
- DTUtils::loadMessages();
- }
-
- function execute( $query ) {
- global $wgUser, $wgOut, $wgRequest;
- $this->setHeaders();
-
- if ( ! $wgUser->isAllowed( 'datatransferimport' ) ) {
- global $wgOut;
- $wgOut->permissionRequired( 'datatransferimport' );
- return;
- }
-
- if ( $wgRequest->getCheck( 'import_file' ) ) {
- $text = DTUtils::printImportingMessage();
- $uploadResult = ImportStreamSource::newFromUpload( "file_name" );
- // handling changed in MW 1.17
- $uploadError = null;
- if ( $uploadResult instanceof Status ) {
- if ( $uploadResult->isOK() ) {
- $source = $uploadResult->value;
- } else {
- $uploadError = $wgOut->parse( $uploadResult->getWikiText() );
- }
- } elseif ( $uploadResult instanceof WikiErrorMsg ) {
- $uploadError = $uploadResult->getMessage();
- } else {
- $source = $uploadResult;
- }
-
- if ( !is_null( $uploadError ) ) {
- $text .= $uploadError;
- $wgOut->addHTML( $text );
- return;
- }
-
- $encoding = $wgRequest->getVal( 'encoding' );
- $pages = array();
- $error_msg = self::getCSVData( $source->mHandle, $encoding, $pages );
- if ( ! is_null( $error_msg ) ) {
- $text .= $error_msg;
- $wgOut->addHTML( $text );
- return;
- }
-
- $importSummary = $wgRequest->getVal( 'import_summary' );
- $forPagesThatExist = $wgRequest->getVal( 'pagesThatExist' );
- $text .= self::modifyPages( $pages, $importSummary, $forPagesThatExist );
- } else {
- $formText = DTUtils::printFileSelector( 'CSV' );
- $utf8OptionText = "\t" . Xml::element( 'option',
- array(
- 'selected' => 'selected',
- 'value' => 'utf8'
- ), 'UTF-8' ) . "\n";
- $utf16OptionText = "\t" . Xml::element( 'option',
- array(
- 'value' => 'utf16'
- ), 'UTF-16' ) . "\n";
- $encodingSelectText = Xml::tags( 'select',
- array( 'name' => 'encoding' ),
- "\n" . $utf8OptionText . $utf16OptionText. "\t" ) . "\n\t";
- $formText .= "\t" . Xml::tags( 'p', null, wfMsg( 'dt_import_encodingtype', 'CSV' ) . " " . $encodingSelectText ) . "\n";
- $formText .= "\t" . '<hr style="margin: 10px 0 10px 0" />' . "\n";
- $formText .= DTUtils::printExistingPagesHandling();
- $formText .= DTUtils::printImportSummaryInput( 'CSV' );
- $formText .= DTUtils::printSubmitButton();
- $text = "\t" . Xml::tags( 'form',
- array(
- 'enctype' => 'multipart/form-data',
- 'action' => '',
- 'method' => 'post'
- ), $formText ) . "\n";
- }
-
- $wgOut->addHTML( $text );
- }
-
-
- static function getCSVData( $csv_file, $encoding, &$pages ) {
- if ( is_null( $csv_file ) )
- return wfMsg( 'emptyfile' );
- $table = array();
- if ( $encoding == 'utf16' ) {
- // change encoding to UTF-8
- // Starting with PHP 5.3 we could use str_getcsv(),
- // which would save the tempfile hassle
- $tempfile = tmpfile();
- $csv_string = '';
- while ( !feof( $csv_file ) ) {
- $csv_string .= fgets( $csv_file, 65535 );
- }
- fwrite( $tempfile, iconv( 'UTF-16', 'UTF-8', $csv_string ) );
- fseek( $tempfile, 0 );
- while ( $line = fgetcsv( $tempfile ) ) {
- array_push( $table, $line );
- }
- fclose( $tempfile );
- } else {
- while ( $line = fgetcsv( $csv_file ) ) {
- array_push( $table, $line );
- }
- }
- fclose( $csv_file );
-
- // Get rid of the "byte order mark", if it's there - this is
- // a three-character string sometimes put at the beginning
- // of files to indicate its encoding.
- // Code copied from:
- // http://www.dotvoid.com/2010/04/detecting-utf-bom-byte-order-mark/
- $byteOrderMark = pack( "CCC", 0xef, 0xbb, 0xbf );
- if ( 0 == strncmp( $table[0][0], $byteOrderMark, 3 ) ) {
- $table[0][0] = substr( $table[0][0], 3 );
- // If there were quotation marks around this value,
- // they didn't get removed, so remove them now.
- $table[0][0] = trim( $table[0][0], '"' );
- }
-
- // check header line to make sure every term is in the
- // correct format
- $title_label = wfMsgForContent( 'dt_xml_title' );
- $free_text_label = wfMsgForContent( 'dt_xml_freetext' );
- foreach ( $table[0] as $i => $header_val ) {
- if ( $header_val !== $title_label && $header_val !== $free_text_label &&
- ! preg_match( '/^[^\[\]]+\[[^\[\]]+]$/', $header_val ) ) {
- $error_msg = wfMsg( 'dt_importcsv_badheader', $i, $header_val, $title_label, $free_text_label );
- return $error_msg;
- }
- }
- foreach ( $table as $i => $line ) {
- if ( $i == 0 ) continue;
- $page = new DTPage();
- foreach ( $line as $j => $val ) {
- if ( $val == '' ) continue;
- if ( $table[0][$j] == $title_label ) {
- $page->setName( $val );
- } elseif ( $table[0][$j] == $free_text_label ) {
- $page->setFreeText( $val );
- } else {
- list( $template_name, $field_name ) = explode( '[', str_replace( ']', '', $table[0][$j] ) );
- $page->addTemplateField( $template_name, $field_name, $val );
- }
- }
- $pages[] = $page;
- }
- }
-
- function modifyPages( $pages, $editSummary, $forPagesThatExist ) {
- global $wgUser, $wgLang;
-
- $text = "";
- $jobs = array();
- $jobParams = array();
- $jobParams['user_id'] = $wgUser->getId();
- $jobParams['edit_summary'] = $editSummary;
- $jobParams['for_pages_that_exist'] = $forPagesThatExist;
- foreach ( $pages as $page ) {
- $title = Title::newFromText( $page->getName() );
- if ( is_null( $title ) ) {
- $text .= '<p>' . wfMsg( 'img-auth-badtitle', $page->getName() ) . "</p>\n";
- continue;
- }
- $jobParams['text'] = $page->createText();
- $jobs[] = new DTImportJob( $title, $jobParams );
- }
- Job::batchInsert( $jobs );
- $text .= wfMsgExt( 'dt_import_success', array( 'parse' ), $wgLang->formatNum( count( $jobs ) ), 'CSV' );
-
- return $text;
- }
-
-}
+++ /dev/null
-<?php
-/**
- * Lets the user import an XML file to turn into wiki pages
- *
- * @author Yaron Koren
- * modified by Justin Preece, 05/23/11
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) die();
-
-class DTImportXML extends SpecialPage {
-
- /**
- * Constructor
- */
- public function DTImportXML() {
- global $wgLanguageCode;
- parent::__construct( 'ImportXML' );
- DTUtils::loadMessages();
- }
-
- function execute( $query ) {
- global $wgUser, $wgOut, $wgRequest;
- $this->setHeaders();
-
- if ( ! $wgUser->isAllowed( 'datatransferimport' ) ) {
- global $wgOut;
- $wgOut->permissionRequired( 'datatransferimport' );
- return;
- }
-
- if ( $wgRequest->getCheck( 'import_file' ) ) {
- $text = DTUtils::printImportingMessage();
- $uploadResult = ImportStreamSource::newFromUpload( "file_name" );
- // handling changed in MW 1.17
- if ( $uploadResult instanceof Status ) {
- $source = $uploadResult->value;
- } else {
- $source = $uploadResult;
- }
- $importSummary = $wgRequest->getVal( 'import_summary' );
- $forPagesThatExist = $wgRequest->getVal( 'pagesThatExist' );
- $text .= self::modifyPages( $source, $importSummary, $forPagesThatExist );
- } else {
- $formText = DTUtils::printFileSelector( 'XML' );
- $formText .= DTUtils::printExistingPagesHandling();
- $formText .= DTUtils::printImportSummaryInput( 'XML' );
- $formText .= DTUtils::printSubmitButton();
- $text = "\t" . Xml::tags( 'form',
- array(
- 'enctype' => 'multipart/form-data',
- 'action' => '',
- 'method' => 'post'
- ), $formText ) . "\n";
-
- }
-
- $wgOut->addHTML( $text );
- }
-
- function modifyPages( $source, $editSummary, $forPagesThatExist ) {
- $text = "";
- $xml_parser = new DTXMLParser( $source );
- $xml_parser->doParse();
- $jobs = array();
- $job_params = array();
- global $wgUser;
- $job_params['user_id'] = $wgUser->getId();
- $job_params['edit_summary'] = $editSummary;
- $job_params['for_pages_that_exist'] = $forPagesThatExist;
-
- foreach ( $xml_parser->mPages as $page ) {
- $title = Title::newFromText( $page->getName() );
- $job_params['text'] = $page->createText();
- $jobs[] = new DTImportJob( $title, $job_params );
- }
- Job::batchInsert( $jobs );
- global $wgLang;
- $text .= wfMsgExt( 'dt_import_success', array( 'parse' ), $wgLang->formatNum( count( $jobs ) ), 'XML' );
- return $text;
- }
-}
+++ /dev/null
-<?php
-/**
- * Displays an interface to let the user export pages from the wiki in XML form
- *
- * @author Yaron Koren
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) die();
-
-class DTViewXML extends SpecialPage {
-
- /**
- * Constructor
- */
- public function DTViewXML() {
- global $wgLanguageCode;
- parent::__construct( 'ViewXML' );
- DTUtils::loadMessages();
- }
-
- function execute( $query ) {
- $this->setHeaders();
- doSpecialViewXML( $query );
- }
-}
-
-function getCategoriesList() {
- global $wgContLang, $dtgContLang;
- $dt_props = $dtgContLang->getPropertyLabels();
- $exclusion_cat_name = str_replace( ' ', '_', $dt_props[DT_SP_IS_EXCLUDED_FROM_XML] );
- $exclusion_cat_full_name = $wgContLang->getNSText( NS_CATEGORY ) . ':' . $exclusion_cat_name;
- $dbr = wfGetDB( DB_SLAVE );
- $categorylinks = $dbr->tableName( 'categorylinks' );
- $res = $dbr->query( "SELECT DISTINCT cl_to FROM $categorylinks" );
- $categories = array();
- while ( $row = $dbr->fetchRow( $res ) ) {
- $cat_name = $row[0];
- // add this category to the list, if it's not the
- // "Excluded from XML" category, and it's not a child of that
- // category
- if ( $cat_name != $exclusion_cat_name ) {
- $title = Title::newFromText( $cat_name, NS_CATEGORY );
- $parent_categories = $title->getParentCategoryTree( array() );
- if ( ! treeContainsElement( $parent_categories, $exclusion_cat_full_name ) )
- $categories[] = $cat_name;
- }
- }
- $dbr->freeResult( $res );
- sort( $categories );
- return $categories;
-}
-
-function getNamespacesList() {
- $dbr = wfGetDB( DB_SLAVE );
- $page = $dbr->tableName( 'page' );
- $res = $dbr->query( "SELECT DISTINCT page_namespace FROM $page" );
- $namespaces = array();
- while ( $row = $dbr->fetchRow( $res ) ) {
- $namespaces[] = $row[0];
- }
- $dbr->freeResult( $res );
- return $namespaces;
-}
-
-function getGroupings() {
- global $dtgContLang;
-
- global $smwgIP;
- if ( ! isset( $smwgIP ) ) {
- return array();
- } else {
- $groupings = array();
- $store = smwfGetStore();
- $grouping_prop = SMWPropertyValue::makeProperty( '_DT_XG' );
- $grouped_props = $store->getAllPropertySubjects( $grouping_prop );
- foreach ( $grouped_props as $grouped_prop ) {
- $res = $store->getPropertyValues( $grouped_prop, $grouping_prop );
- $num = count( $res );
- if ( $num > 0 ) {
- $grouping_label = $res[0]->getShortWikiText();
- $groupings[] = array( $grouped_prop, $grouping_label );
- }
- }
- return $groupings;
- }
-}
-
-function getSubpagesForPageGrouping( $page_name, $relation_name ) {
- $dbr = wfGetDB( DB_SLAVE );
- $smw_relations = $dbr->tableName( 'smw_relations' );
- $smw_attributes = $dbr->tableName( 'smw_attributes' );
- $res = $dbr->query( "SELECT subject_title FROM $smw_relations WHERE object_title = '$page_name' AND relation_title = '$relation_name'" );
- $subpages = array();
- while ( $row = $dbr->fetchRow( $res ) ) {
- $subpage_name = $row[0];
- $query_subpage_name = str_replace( "'", "\'", $subpage_name );
- // get the display order
- $res2 = $dbr->query( "SELECT value_num FROM $smw_attributes WHERE subject_title = '$query_subpage_name' AND attribute_title = 'Display_order'" );
- if ( $row2 = $dbr->fetchRow( $res2 ) ) {
- $display_order = $row2[0];
- } else {
- $display_order = - 1;
- }
- $dbr->freeResult( $res2 );
- // HACK - page name is the key, display order is the value
- $subpages[$subpage_name] = $display_order;
- }
- $dbr->freeResult( $res );
- uasort( $subpages, "cmp" );
- return array_keys( $subpages );
-}
-
-
-/*
- * Get all the pages that belong to a category and all its subcategories,
- * down a certain number of levels - heavily based on SMW's
- * SMWInlineQuery::includeSubcategories()
- */
- function getPagesForCategory( $top_category, $num_levels ) {
- if ( 0 == $num_levels ) return $top_category;
-
- $db = wfGetDB( DB_SLAVE );
- $fname = "getPagesForCategory";
- $categories = array( $top_category );
- $checkcategories = array( $top_category );
- $titles = array();
- for ( $level = $num_levels; $level > 0; $level-- ) {
- $newcategories = array();
- foreach ( $checkcategories as $category ) {
- $res = $db->select( // make the query
- array( 'categorylinks', 'page' ),
- array( 'page_id', 'page_title', 'page_namespace' ),
- array( 'cl_from = page_id',
- 'cl_to = ' . $db->addQuotes( $category ) ),
- $fname );
- if ( $res ) {
- while ( $res && $row = $db->fetchRow( $res ) ) {
- if ( array_key_exists( 'page_title', $row ) ) {
- $page_namespace = $row['page_namespace'];
- if ( $page_namespace == NS_CATEGORY ) {
- $new_category = $row[ 'page_title' ];
- if ( !in_array( $new_category, $categories ) ) {
- $newcategories[] = $new_category;
- }
- } else {
- $titles[] = Title::newFromID( $row['page_id'] );
- }
- }
- }
- $db->freeResult( $res );
- }
- }
- if ( count( $newcategories ) == 0 ) {
- return $titles;
- } else {
- $categories = array_merge( $categories, $newcategories );
- }
- $checkcategories = array_diff( $newcategories, array() );
- }
- return $titles;
- }
-
-/*
-function getPagesForCategory($category) {
- $dbr = wfGetDB( DB_SLAVE );
- $categorylinks = $dbr->tableName( 'categorylinks' );
- $res = $dbr->query("SELECT cl_from FROM $categorylinks WHERE cl_to = '$category'");
- $titles = array();
- while ($row = $dbr->fetchRow($res)) {
- $titles[] = Title::newFromID($row[0]);
- }
- $dbr->freeResult($res);
- return $titles;
-}
-*/
-
-function getPagesForNamespace( $namespace ) {
- $dbr = wfGetDB( DB_SLAVE );
- $page = $dbr->tableName( 'page' );
- $res = $dbr->query( "SELECT page_id FROM $page WHERE page_namespace = '$namespace'" );
- $titles = array();
- while ( $row = $dbr->fetchRow( $res ) ) {
- $titles[] = Title::newFromID( $row[0] );
- }
- $dbr->freeResult( $res );
- return $titles;
-}
-
-/**
- * Helper function for getXMLForPage()
- */
-function treeContainsElement( $tree, $element ) {
- // escape out if there's no tree (i.e., category)
- if ( $tree == null )
- return false;
-
- foreach ( $tree as $node => $child_tree ) {
- if ( $node === $element ) {
- return true;
- } elseif ( count( $child_tree ) > 0 ) {
- if ( treeContainsElement( $child_tree, $element ) ) {
- return true;
- }
- }
- }
- // no match found
- return false;
-}
-
-function getXMLForPage( $title, $simplified_format, $groupings, $depth = 0 ) {
- if ( $depth > 5 ) { return ""; }
-
- global $wgContLang, $dtgContLang;
-
- $namespace_labels = $wgContLang->getNamespaces();
- $template_label = $namespace_labels[NS_TEMPLATE];
- $namespace_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_namespace' ) );
- $page_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_page' ) );
- $field_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_field' ) );
- $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
- $title_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_title' ) );
- $id_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_id' ) );
- $free_text_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_freetext' ) );
-
- // if this page belongs to the exclusion category, exit
- $parent_categories = $title->getParentCategoryTree( array() );
- $dt_props = $dtgContLang->getPropertyLabels();
- // $exclusion_category = $title->newFromText($dt_props[DT_SP_IS_EXCLUDED_FROM_XML], NS_CATEGORY);
- $exclusion_category = $wgContLang->getNSText( NS_CATEGORY ) . ':' . str_replace( ' ', '_', $dt_props[DT_SP_IS_EXCLUDED_FROM_XML] );
- if ( treeContainsElement( $parent_categories, $exclusion_category ) )
- return "";
- $article = new Article( $title );
- $page_title = str_replace( '"', '"', $title->getText() );
- $page_title = str_replace( '&', '&', $page_title );
- if ( $simplified_format )
- $text = "<$page_str><$id_str>{$article->getID()}</$id_str><$title_str>$page_title</$title_str>\n";
- else
- $text = "<$page_str $id_str=\"" . $article->getID() . "\" $title_str=\"" . $page_title . '" >';
-
- // traverse the page contents, one character at a time
- $uncompleted_curly_brackets = 0;
- $page_contents = $article->getContent();
- // escape out variables like "{{PAGENAME}}"
- $page_contents = str_replace( '{{PAGENAME}}', '{{PAGENAME}}', $page_contents );
- // escape out parser functions
- $page_contents = preg_replace( '/{{(#.+)}}/', '{{$1}}', $page_contents );
- // escape out transclusions
- $page_contents = preg_replace( '/{{(:.+)}}/', '{{$1}}', $page_contents );
- // escape out variable names
- $page_contents = str_replace( '{{{', '{{{', $page_contents );
- $page_contents = str_replace( '}}}', '}}}', $page_contents );
- // escape out tables
- $page_contents = str_replace( '{|', '{|', $page_contents );
- $page_contents = str_replace( '|}', '|}', $page_contents );
- $free_text = "";
- $free_text_id = 1;
- $template_name = "";
- $field_name = "";
- $field_value = "";
- $field_has_name = false;
- for ( $i = 0; $i < strlen( $page_contents ); $i++ ) {
- $c = $page_contents[$i];
- if ( $uncompleted_curly_brackets == 0 ) {
- if ( $c == "{" || $i == strlen( $page_contents ) - 1 ) {
- if ( $i == strlen( $page_contents ) - 1 )
- $free_text .= $c;
- $uncompleted_curly_brackets++;
- $free_text = trim( $free_text );
- $free_text = str_replace( '&', '&', $free_text );
- $free_text = str_replace( '[', '[', $free_text );
- $free_text = str_replace( ']', ']', $free_text );
- $free_text = str_replace( '<', '<', $free_text );
- $free_text = str_replace( '>', '>', $free_text );
- if ( $free_text != "" ) {
- $text .= "<$free_text_str id=\"$free_text_id\">$free_text</$free_text_str>";
- $free_text = "";
- $free_text_id++;
- }
- } elseif ( $c == "{" ) {
- // do nothing
- } else {
- $free_text .= $c;
- }
- } elseif ( $uncompleted_curly_brackets == 1 ) {
- if ( $c == "{" ) {
- $uncompleted_curly_brackets++;
- $creating_template_name = true;
- } elseif ( $c == "}" ) {
- $uncompleted_curly_brackets--;
- // is this needed?
- // if ($field_name != "") {
- // $field_name = "";
- // }
- if ( $page_contents[$i - 1] == '}' ) {
- if ( $simplified_format )
- $text .= "</" . $template_name . ">";
- else
- $text .= "</$template_label>";
- }
- $template_name = "";
- }
- } else { // 2 or greater - probably 2
- if ( $c == "}" ) {
- $uncompleted_curly_brackets--;
- }
- if ( $c == "{" ) {
- $uncompleted_curly_brackets++;
- } else {
- if ( $creating_template_name ) {
- if ( $c == "|" || $c == "}" ) {
- $template_name = str_replace( ' ', '_', trim( $template_name ) );
- $template_name = str_replace( '&', '&', $template_name );
- if ( $simplified_format ) {
- $text .= "<" . $template_name . ">";
- } else
- $text .= "<$template_label $name_str=\"$template_name\">";
- $creating_template_name = false;
- $creating_field_name = true;
- $field_id = 1;
- } else {
- $template_name .= $c;
- }
- } else {
- if ( $c == "|" || $c == "}" ) {
- if ( $field_has_name ) {
- $field_value = str_replace( '&', '&', $field_value );
- if ( $simplified_format ) {
- $field_name = str_replace( ' ', '_', trim( $field_name ) );
- $text .= "<" . $field_name . ">";
- $text .= trim( $field_value );
- $text .= "</" . $field_name . ">";
- } else {
- $text .= "<$field_str $name_str=\"" . trim( $field_name ) . "\">";
- $text .= trim( $field_value );
- $text .= "</$field_str>";
- }
- $field_value = "";
- $field_has_name = false;
- } else {
- // "field_name" is actually the value
- if ( $simplified_format ) {
- $field_name = str_replace( ' ', '_', $field_name );
- // add "Field" to the beginning of the file name, since
- // XML tags that are simply numbers aren't allowed
- $text .= "<" . $field_str . '_' . $field_id . ">";
- $text .= trim( $field_name );
- $text .= "</" . $field_str . '_' . $field_id . ">";
- } else {
- $text .= "<$field_str $name_str=\"$field_id\">";
- $text .= trim( $field_name );
- $text .= "</$field_str>";
- }
- $field_id++;
- }
- $creating_field_name = true;
- $field_name = "";
- } elseif ( $c == "=" ) {
- // handle case of = in value
- if ( ! $creating_field_name ) {
- $field_value .= $c;
- } else {
- $creating_field_name = false;
- $field_has_name = true;
- }
- } elseif ( $creating_field_name ) {
- $field_name .= $c;
- } else {
- $field_value .= $c;
- }
- }
- }
- }
- }
-
- // handle groupings, if any apply here; first check if SMW is installed
- global $smwgIP;
- if ( isset( $smwgIP ) ) {
- $store = smwfGetStore();
- foreach ( $groupings as $pair ) {
- list( $property_page, $grouping_label ) = $pair;
- $wiki_page = SMWDataValueFactory::newTypeIDValue( '_wpg', $page_title );
- $options = new SMWRequestOptions();
- $options->sort = "subject_title";
- // get actual property from the wiki-page of the property
- $property = SMWPropertyValue::makeProperty( $property_page->getTitle()->getText() );
- $res = $store->getPropertySubjects( $property, $wiki_page, $options );
- $num = count( $res );
- if ( $num > 0 ) {
- $grouping_label = str_replace( ' ', '_', $grouping_label );
- $text .= "<$grouping_label>\n";
- foreach ( $res as $subject ) {
- $subject_title = $subject->getTitle();
- $text .= getXMLForPage( $subject_title, $simplified_format, $groupings, $depth + 1 );
- }
- $text .= "</$grouping_label>\n";
- }
- }
- }
-
- $text .= "</$page_str>\n";
- // escape back the curly brackets that were escaped out at the beginning
- $text = str_replace( '&#123;', '{', $text );
- $text = str_replace( '&#125;', '}', $text );
- return $text;
-}
-
-function doSpecialViewXML() {
- global $wgOut, $wgRequest, $wgUser, $wgContLang;
- $skin = $wgUser->getSkin();
- $namespace_labels = $wgContLang->getNamespaces();
- $category_label = $namespace_labels[NS_CATEGORY];
- $template_label = $namespace_labels[NS_TEMPLATE];
- $name_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_name' ) );
- $namespace_str = str_replace( ' ', '_', wfMsg( 'dt_xml_namespace' ) );
- $pages_str = str_replace( ' ', '_', wfMsgForContent( 'dt_xml_pages' ) );
-
- $form_submitted = false;
- $page_titles = array();
- $cats = $wgRequest->getArray( 'categories' );
- $nses = $wgRequest->getArray( 'namespaces' );
- if ( count( $cats ) > 0 || count( $nses ) > 0 ) {
- $form_submitted = true;
- }
-
- if ( $form_submitted ) {
- $wgOut->disable();
-
- // Cancel output buffering and gzipping if set
- // This should provide safer streaming for pages with history
- wfResetOutputBuffers();
- header( "Content-type: application/xml; charset=utf-8" );
-
- $groupings = getGroupings();
- $simplified_format = $wgRequest->getVal( 'simplified_format' );
- $text = "<$pages_str>";
- if ( $cats ) {
- foreach ( $cats as $cat => $val ) {
- if ( $simplified_format )
- $text .= '<' . str_replace( ' ', '_', $cat ) . ">\n";
- else
- $text .= "<$category_label $name_str=\"$cat\">\n";
- $titles = getPagesForCategory( $cat, 10 );
- foreach ( $titles as $title ) {
- $text .= getXMLForPage( $title, $simplified_format, $groupings );
- }
- if ( $simplified_format )
- $text .= '</' . str_replace( ' ', '_', $cat ) . ">\n";
- else
- $text .= "</$category_label>\n";
- }
- }
-
- if ( $nses ) {
- foreach ( $nses as $ns => $val ) {
- if ( $ns == 0 ) {
- $ns_name = "Main";
- } else {
- $ns_name = MWNamespace::getCanonicalName( $ns );
- }
- if ( $simplified_format )
- $text .= '<' . str_replace( ' ', '_', $ns_name ) . ">\n";
- else
- $text .= "<$namespace_str $name_str=\"$ns_name\">\n";
- $titles = getPagesForNamespace( $ns );
- foreach ( $titles as $title ) {
- $text .= getXMLForPage( $title, $simplified_format, $groupings );
- }
- if ( $simplified_format )
- $text .= '</' . str_replace( ' ', '_', $ns_name ) . ">\n";
- else
- $text .= "</$namespace_str>\n";
- }
- }
- $text .= "</$pages_str>";
- print $text;
- } else {
- // set 'title' as hidden field, in case there's no URL niceness
- global $wgContLang;
- $mw_namespace_labels = $wgContLang->getNamespaces();
- $special_namespace = $mw_namespace_labels[NS_SPECIAL];
- $text = <<<END
- <form action="" method="get">
- <input type="hidden" name="title" value="$special_namespace:ViewXML">
-
-END;
- $text .= "<p>" . wfMsg( 'dt_viewxml_docu' ) . "</p>\n";
- $text .= "<h2>" . wfMsg( 'dt_viewxml_categories' ) . "</h2>\n";
- $categories = getCategoriesList();
- foreach ( $categories as $category ) {
- $title = Title::makeTitle( NS_CATEGORY, $category );
- $link = $skin->makeLinkObj( $title, $title->getText() );
- $text .= "<input type=\"checkbox\" name=\"categories[$category]\" /> $link <br />\n";
- }
- $text .= "<h2>" . wfMsg( 'dt_viewxml_namespaces' ) . "</h2>\n";
- $namespaces = getNamespacesList();
- foreach ( $namespaces as $namespace ) {
- if ( $namespace == 0 ) {
- $ns_name = wfMsgHtml( 'blanknamespace' );
- } else {
- $ns_name = htmlspecialchars( $wgContLang->getFormattedNsText( $namespace ) );
- }
- $ns_name = str_replace( '_', ' ', $ns_name );
- $text .= "<input type=\"checkbox\" name=\"namespaces[$namespace]\" /> $ns_name <br />\n";
- }
- $text .= "<br /><p><input type=\"checkbox\" name=\"simplified_format\" /> " . wfMsg( 'dt_viewxml_simplifiedformat' ) . "</p>\n";
- $text .= "<input type=\"submit\" value=\"" . wfMsg( 'viewxml' ) . "\">\n";
- $text .= "</form>\n";
-
- $wgOut->addHTML( $text );
- }
-}
+++ /dev/null
-<noinclude>
-This is the "Annotation" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-{{#forminput:form=Annotation}}
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Annotation:<unique number;start=1>}}}
-__NOTOC__
-{{#ifexist: {{PAGENAME}}
- |<font size=6 color="#67536c">'''{{#show:{{PAGENAME}}|?has_Gene_Symbol}} (''{{#show:{{PAGENAME}}|?has_Species_Name}}'')'''</font>
- |
-}}
-
-
-= Annotation =
-
-{{{for template|Annotation}}}
-
-{| class="formtable"
-! Species Name:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Species Name]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|Species Name|autocomplete on property=Has Reference Taxon|restricted}}}
- | {{{field|Species Name|autocomplete on property=Has Reference Taxon}}}
- }}
-|-
-! Gene Symbol:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Gene Symbol]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- |{{{field|Gene Symbol|restricted}}}
- |{{{field|Gene Symbol}}}
- }}
-|-
-! Gene Name:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Gene Name]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|Gene Name|restricted}}}
- | {{{field|Gene Name}}}
- }}
-|-
-! Gene Synonyms:
-| {{#ifexist: {{PAGENAME}}
- | {{#if: {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}} ]]
- | ?is_Gene_Synonym
- | headers=hide
- | mainlabel=-
- | format=list
- }} {{#formlink:form=Gene_Synonyms|link text=Edit|link type=button|target={{PAGENAME}}/Gene_Synonyms }}
- | {{#formlink:form=Gene_Synonyms|link text=Add Synonyms|link type=button|query string=Gene_Synonyms[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
- }}
- | To add gene synonyms, first save your basic annotation information on this "Annotation" tab.
-}}
-|-
-! Gene Locus:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Gene Locus]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|Gene Locus|restricted}}}
- | {{{field|Gene Locus}}}
- }}
-|-
-! Gene Type:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Gene Type]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|Gene Type|restricted}}}
- | {{{field|Gene Type}}}
- }}
-|-
-! EC Number(s):
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::EC Numbers]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|EC Numbers|restricted|list|delimiter=,}}}
- | {{{field|EC Numbers|list|delimiter=,}}}
- }}
-|-
-! Chromosome:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Chromosome]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- |{{{field|Chromosome|restricted}}}
- |{{{field|Chromosome}}}
- }}
-|-
-! Has Phenotype:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Has Phenotype]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|Has Phenotype|restricted}}}
- | {{{field|Has Phenotype}}}
- }}
-|-
-! Description:
-| {{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field Or Object::Annotation Description]]
- [[Is Associated With Category::Annotations]]
- |?is_Provenance
- }}
- | {{{field|Annotation Description|restricted}}}
- | {{{field|Annotation Description}}}
- }}
-|}
-
-{{{end template}}}
-
-= External References =
-
-{{#ifexist: {{PAGENAME}}
- | {{#if: {{#ask:[[Category:External_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | Add, edit, or remove external reference data {{#formlink:form=External_References|link text=here|target={{PAGENAME}}/External_References }}.
- {{#ask:[[Is External Reference::~{{PAGENAME}}/External_References* ]]
- | mainlabel=-
- |? from_External_Source
- |? has_External_Accession_ID
- }}
- | Add external references for this annotation.<br>{{#formlink:form=External_References|link text=Add|link type=button|query string=External_References[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
- }}
- | To add external references, first save your basic annotation information on the "Annotation" tab.
-}}
-
-= Ontologies =
-
-{{#ifexist: {{PAGENAME}}
- | {{#if: {{#ask:[[Category:Ontological_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | Add, edit, or remove ontology references {{#formlink:form=Ontological_References|link text=here|target={{PAGENAME}}/Ontologies }}.
- {{#ask:[[Is Ontological Reference::~{{PAGENAME}}/Ontologies*]]
- | mainlabel=-
- |? from_Ontology
- |? has_Term_ID
- |? has_Term_Name
- |? has_Aspect
- |? has_Evidence_Code
- |? has_Evidence
- }}
- | Add ontological associations for this annotation.<br>{{#formlink:form=Ontological_References|link text=Add|link type=button|query string=Ontological_References[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
- }}
- | To add ontological references, first save your basic annotation information on the "Annotation" tab.
-}}
-
-= Sequences =
-
-{{#ifexist: {{PAGENAME}}
- | {{#if: {{#ask:[[Category:Sequences]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | Add, edit, or remove sequence references {{#formlink:form=Sequences|link text=here|target={{PAGENAME}}/Sequences }}.
- {{#ask:[[Is Sequence Reference::~{{PAGENAME}}/Sequences*]]
- | mainlabel=-
- |? has_Sequence_Type
- |? has_Sequence_Source
- |? has_External_Accession_ID
- }}
- | Add sequence references for this annotation.<br>{{#formlink:form=Sequences|link text=Add|link type=button|query string=Sequences[Annotation Page]={{PAGENAME}}&super_page={{PAGENAME}} }}
- }}
- | To add sequence references, first save your basic annotation information on the "Annotation" tab.
-}}
-
-= Literature =
-
-{{#ifexist: {{PAGENAME}}
- | Add a reference to a publication listed with PubMed or the DOI registry {{#formlink:form=Reference_Publication|link text=here|link type=|query string=Reference_Publication[New Annotation Reference]={{PAGENAME}} }}.<br>
-
-Need to add a reference to a publication without a PubMed ID or DOI (Digital Object Identifier)?<br>
-{{#formlink:form=Publication|link text=Add a new publication reference|link type=|query string=Publication[New Annotation Reference]={{PAGENAME}} }}
-
- {{#if: {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] }}
- | {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]]
- |? has First Author
- |? has Publication Title
- |? has Journal Name
- |? has Publication ID
- }}
- |
- }}
- | To add publication references, first save your basic annotation information on the "Annotation" tab.
-}}
-<headertabs/>
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "External References" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-
-{{#forminput:form=External References}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=External_References}}}
-
-{{{for template|External References}}}
-{| class="formtable"
-! Annotation Page:
-| {{{field|Annotation Page}}}
-|}
-{{{end template}}}
-
-{{{for template|External Reference Repeater|multiple}}}
-'''Source:''' {{{field|External Source}}}
-'''Accession ID:''' {{{field|External Accession ID}}}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Gene Synonyms" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-{{#forminput:form=Gene Synonyms}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Gene_Synonyms}}}
-
-{{{for template|Gene Synonyms}}}
-{| class="formtable"
-! Annotation Page:
-| {{{field|Annotation Page}}}
-|}
-{{{end template}}}
-
-{{{for template|Gene Synonym Repeater|multiple}}}
-
-<!----------------------------
-
-=== Gene Synonyms Test ===
-
-Annotation Page: {{#show:{{PAGENAME}}|?Is Associated With Annotation}}
-
-Provenance Page Test: {{#ask: [[Is Provenance::~Annotation:1/Provenance* ]] }}
-
-{{#if: {{#ask: [[Is Provenance::~{{PAGENAME}}/Provenance*]]
- [[Is Associated With Field::Gene Type]]
- [[Is Associated With Template::Annotation]]
- |?is_Provenance
- }}
- | {{{field|Gene Type|restricted}}}
- | {{{field|Gene Type}}}
- }}
-
-Provenance for Specific Synonym (Test): {{#ask:
- [[Is Provenance::~{{#show:{{PAGENAME}}|?Is Associated With Annotation}}/Provenance*]]
- [[Is Associated With Field::~Gene Synonym:*]]
- [[Is Associated With Template::Gene Synonym Repeater]]
- |link=none
-}}
-
-{{#if:
- {{#ask:
- [[Is Provenance::~{{#show:{{PAGENAME}}|?Is Associated With Annotation}}/Provenance*]]
- [[Is Associated With Field::~Gene Synonym:*]]
- [[Is Associated With Template::Gene Synonym Repeater]]
- |?is_Provenance
- }}
- |'''Gene Synonym:''' {{{field|Gene Synonym|restricted}}}
- |'''Gene Synonym:''' {{{field|Gene Synonym}}}
- }}
-
------------------------------>
-
-'''Gene Synonym:''' {{{field|Gene Synonym}}}
-
-<!----------------------------->
-
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Ontological References" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-
-{{#forminput:form=Ontological References}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Ontologies}}}
-__NOTOC__
-
-{{{for template|Ontological References}}}
-{| class="formtable"
-! Annotation Page:
-| {{{field|Annotation Page}}}
-|}
-{{{end template}}}
-
-=== Plant Ontology ===
-{{{for template|Plant Ontology Reference Repeater|multiple}}}
-'''Term Name:''' {{{field|Term Name|autocomplete from url=remote_PO_terms}}} '''or''' '''Term ID:''' {{{field|Term ID|autocomplete from url=remote_PO_ids}}}
-<br><br>'''Evidence Code:'''<br>
-{{{field|Evidence Code|list}}}
-<br><br>'''Evidence:''' {{{field|Evidence|}}}
-{{{end template}}}
-
-=== Gene Ontology ===
-{{{for template|Gene Ontology Reference Repeater|multiple}}}
-'''Term Name:''' {{{field|Term Name|autocomplete from url=remote_GO_terms}}} '''or''' '''Term ID:''' {{{field|Term ID|autocomplete from url=remote_GO_ids}}}
-<br><br>'''Evidence Code:'''<br>
-{{{field|Evidence Code|list}}}
-<br><br>'''Evidence:''' {{{field|Evidence|}}}
-{{{end template}}}
-
-=== Other Ontologies ===
-{{{for template|Ontological Reference Repeater|multiple}}}
-'''Ontology:''' {{{field|Ontology|}}}
-'''Term Name:''' {{{field|Term Name|}}}
-'''Term ID:''' {{{field|Term ID|}}}
-'''Branch:''' {{{field|Aspect|}}}
-<br><br>'''Evidence Code:'''<br>
-{{{field|Evidence Code|list}}}
-<br><br>'''Evidence:''' {{{field|Evidence|}}}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Provenance" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-{{#forminput:form=Provenance}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Provenance}}}
-
-{{{for template|Provenance}}}
-{| class="formtable"
-! Annotation Page:
-| {{{field|Annotation Page}}}
-|}
-{{{end template}}}
-
-{{{for template|Provenance Repeater|multiple}}}
-'''Field or Object:''' {{{field|Source Field or Object}}}
-'''Category:''' {{{field|Source Category}}}
-'''Accession ID:''' {{{field|Source Accession ID}}}
-'''Source:''' {{{field|Source}}}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Publication" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-
-{{#forminput:form=Publication}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Publication:<unique number;start=1>}}}
-{{{for template|Publication}}}
-
-{{#set:Annotation References={{{Annotation References|}}}, {{{New Annotation Reference|}}} }}
-
-{| class="formtable"
-! Publication:
-| {{{field|Publication}}}
-|-
-! Publication ID:
-| {{{field|Publication ID}}}
-|-
-! Publication Title:
-| {{{field|Publication Title}}}
-|-
-! First Author:
-| {{{field|First Author}}}
-|-
-! Journal Name:
-| {{{field|Journal Name}}}
-|-
-! Volume:
-| {{{field|Volume}}}
-|-
-! Year:
-| {{{field|Year}}}
-|-
-! Pages:
-| {{{field|Pages}}}
-|-
-! Annotation References:
-| {{{field|Annotation References}}}
-|-
-! New Annotation Reference (to be hidden):
-| {{{field|New Annotation Reference}}}
-|}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Reference Publication" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-
-{{#forminput:form=Reference Publication}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Publication:<unique number;start=1>}}}
-{{{for template|Reference Publication}}}
-{| class="formtable"
-! Publication:
-| {{{field|Publication}}}
-|-
-! Publication ID:
-| {{{field|Publication ID}}}
-|-
-! Publication Title:
-| {{{field|Publication Title|hidden}}}
-|-
-! First Author:
-| {{{field|First Author|hidden}}}
-|-
-! Journal Name:
-| {{{field|Journal Name|hidden}}}
-|-
-! Volume:
-| {{{field|Volume|hidden}}}
-|-
-! Year:
-| {{{field|Year|hidden}}}
-|-
-! Pages:
-| {{{field|Pages|hidden}}}
-|-
-! Annotation References:
-| {{{field|Annotation References}}}
-|-
-! New Annotation Reference (to be hidden):
-| {{{field|New Annotation Reference}}}
-|}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Sequences" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-
-{{#forminput:form=Sequences}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Sequences}}}
-
-{{{for template|Sequences}}}
-{| class="formtable"
-! Annotation Page:
-| {{{field|Annotation Page}}}
-|}
-{{{end template}}}
-
-{{{for template|Sequence Repeater|multiple}}}
-'''Sequence Type:''' {{{field|Sequence Type}}}
-'''Sequence Source:''' {{{field|Sequence Source}}}
-'''Accession ID:''' {{{field|External Accession ID}}}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Source" form.
-To create a page with this form, enter the page name below;
-if a page with that name already exists, you will be sent to a form to edit that page.
-
-
-{{#forminput:form=Source}}
-
-</noinclude><includeonly>
-<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
-{{{info|page name=Source:<unique number;start=1>}}}
-
-{{{for template|Source}}}
-{| class="formtable"
-! Source Date Stamp:
-| {{{field|Source Date Stamp}}}
-|-
-! Source Database:
-| {{{field|Source Database}}}
-|-
-! Source Version:
-| {{{field|Source Version}}}
-|-
-! Source URI:
-| {{{field|Source URI}}}
-|-
-! Source File:
-| {{{field|Source File}}}
-|}
-{{{end template}}}
-
-{{{standard input|summary}}}
-
-{{{standard input|watch}}}
-
-{{{standard input|save}}} {{{standard input|changes}}} {{{standard input|cancel}}}
-</includeonly>
-
+++ /dev/null
-<?php
-
-# This file was automatically generated by the MediaWiki installer.
-# If you make manual changes, please keep track in case you need to
-# recreate them later.
-#
-# See includes/DefaultSettings.php for all configurable settings
-# and their default values, but don't forget to make changes in _this_
-# file, not there.
-#
-# Further documentation for configuration settings may be found at:
-# http://www.mediawiki.org/wiki/Manual:Configuration_settings
-
-# If you customize your file layout, set $IP to the directory that contains
-# the other MediaWiki files. It will be used as a base to locate files.
-if( defined( 'MW_INSTALL_PATH' ) ) {
- $IP = MW_INSTALL_PATH;
-} else {
- $IP = dirname( __FILE__ );
-}
-
-$path = array( $IP, "$IP/includes", "$IP/languages" );
-set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
-
-require_once( "$IP/includes/DefaultSettings.php" );
-
-if ( $wgCommandLineMode ) {
- if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
- die( "This script must be run from the command line\n" );
- }
-}
-## Uncomment this to disable output compression
-# $wgDisableOutputCompression = true;
-
-$wgSitename = "Planteome Annotation Wiki - Development";
-
-## The URL base path to the directory containing the wiki;
-## defaults for all runtime URL paths are based off of this.
-## For more information on customizing the URLs please see:
-## http://www.mediawiki.org/wiki/Manual:Short_URL
-$wgScriptPath = "/w";
-$wgArticlePath = "/wiki/$1";
-$wgUsePathInfo = true;
-$wgScriptExtension = ".php5";
-
-## The relative URL path to the skins directory
-$wgStylePath = "$wgScriptPath/skins";
-
-## The relative URL path to the logo. Make sure you change this from the default,
-## or else you'll overwrite your logo when you upgrade!
-$wgLogo = "$wgStylePath/common/images/wiki_logo_with_text.png";
-
-## UPO means: this is also a user preference option
-
-$wgEnableEmail = true;
-$wgEnableUserEmail = true; # UPO
-
-$wgEmergencyContact = "preecej@science.oregonstate.edu";
-$wgPasswordSender = "preecej@science.oregonstate.edu";
-
-$wgEnotifUserTalk = true; # UPO
-$wgEnotifWatchlist = true; # UPO
-$wgEmailAuthentication = true;
-
-## Database settings
-$wgDBtype = "mysql";
-$wgDBserver = $_SERVER['dev_wgDBServer'];
-$wgDBname = $_SERVER['dev_wgDBName'];
-$wgDBuser = $_SERVER['dev_wgDBUser'];
-$wgDBpassword = $_SERVER['dev_wgDBPassword'];
-$JobRunRate = 1;
-
-# MySQL specific settings
-$wgDBprefix = "";
-
-# MySQL table options to use during installation or update
-$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
-
-# Experimental charset support for MySQL 4.1/5.0.
-$wgDBmysql5 = true;
-
-## Shared memory settings
-$wgMainCacheType = CACHE_NONE;
-$wgMemCachedServers = array();
-
-## To enable image uploads, make sure the 'images' directory
-## is writable, then set this to true:
-$wgEnableUploads = false;
-$wgUseImageMagick = true;
-$wgImageMagickConvertCommand = "/usr/bin/convert";
-
-## If you use ImageMagick (or any other shell command) on a
-## Linux server, this will need to be set to the name of an
-## available UTF-8 locale
-$wgShellLocale = "en_US.utf8";
-
-## If you want to use image uploads under safe mode,
-## create the directories images/archive, images/thumb and
-## images/temp, and make them all writable. Then uncomment
-## this, if it's not already uncommented:
-# $wgHashedUploadDirectory = false;
-
-## If you have the appropriate support software installed
-## you can enable inline LaTeX equations:
-$wgUseTeX = false;
-
-## Set $wgCacheDirectory to a writable directory on the web server
-## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
-#$wgCacheDirectory = "$IP/cache";
-
-$wgLocalInterwiki = strtolower( $wgSitename );
-
-$wgLanguageCode = "en";
-
-$wgSecretKey = "c7f2e0aee38b819689a65337257ed2d6c4eb7157e44563781da69bbfd3e2e45b";
-
-## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'vector', 'monobook':
-$wgDefaultSkin = 'planteome';
-
-## For attaching licensing metadata to pages, and displaying an
-## appropriate copyright notice / icon. GNU Free Documentation
-## License and Creative Commons licenses are supported so far.
-$wgEnableCreativeCommonsRdf = true;
-$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
-$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
-$wgRightsText = "Attribution-NonCommercial-ShareAlike 3.0 Unported";
-$wgRightsIcon = "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
-# $wgRightsCode = "[license_code]"; # Not yet used
-
-$wgDiff3 = "/usr/bin/diff3";
-
-# BEGIN: Justin Preece - Config changes and Semantic Bundle (SMW and other extensions)
-# (moved from top of file to address premature reference to $wgScriptPath)
-
-$wgHiddenPrefs[] = 'skin';
-$wgUseAjax = true;
-
-#include_once("$IP/extensions/DataTransfer_PS/DataTransfer.php");
-
-require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
-require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
-
-include("$IP/extensions/SimpleForms/SimpleForms.php");
-
-# PO web service calls
-$sfgAutocompletionURLs['remote_PO_terms'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=po&qval=<substr>&format=json&max=20';
-$sfgAutocompletionURLs['remote_PO_ids'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=po&qval=<substr>&format=json&max=20';
-
-# GO web service calls
-$sfgAutocompletionURLs['remote_GO_terms'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=go&qval=<substr>&format=json&max=25';
-$sfgAutocompletionURLs['remote_GO_ids'] = 'http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=go&qval=<substr>&format=json&max=25';
-
-$sfgAutocompleteOnAllChars = false;
-
-# END: Justin Preece - Semantic Bundle (SMW and other extensions)
-
-/** Allow client-side caching of pages */
-$wgCachePages = false;
-
-/**
- * * Set this to current time to invalidate all prior cached pages. Affects both
- * * client- and server-side caching.
- * * You can get the current date on your server by using the command:
- * * date +%Y%m%d%H%M%S
- * */
-$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
-
-
-# When you make changes to this configuration file, this will make
-# sure that cached pages are cleared.
-$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
+++ /dev/null
-<?php
-
-# This file was automatically generated by the MediaWiki installer.
-# If you make manual changes, please keep track in case you need to
-# recreate them later.
-#
-# See includes/DefaultSettings.php for all configurable settings
-# and their default values, but don't forget to make changes in _this_
-# file, not there.
-#
-# Further documentation for configuration settings may be found at:
-# http://www.mediawiki.org/wiki/Manual:Configuration_settings
-
-# If you customize your file layout, set $IP to the directory that contains
-# the other MediaWiki files. It will be used as a base to locate files.
-if( defined( 'MW_INSTALL_PATH' ) ) {
- $IP = MW_INSTALL_PATH;
-} else {
- $IP = dirname( __FILE__ );
-}
-
-$path = array( $IP, "$IP/includes", "$IP/languages" );
-set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
-
-require_once( "$IP/includes/DefaultSettings.php" );
-
-if ( $wgCommandLineMode ) {
- if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
- die( "This script must be run from the command line\n" );
- }
-}
-## Uncomment this to disable output compression
-# $wgDisableOutputCompression = true;
-
-$wgSitename = "Planteome Annotation Wiki - Prototype";
-
-## The URL base path to the directory containing the wiki;
-## defaults for all runtime URL paths are based off of this.
-## For more information on customizing the URLs please see:
-## http://www.mediawiki.org/wiki/Manual:Short_URL
-$wgScriptPath = "/w";
-$wgArticlePath = "/wiki/$1";
-$wgUsePathInfo = true;
-$wgScriptExtension = ".php5";
-
-## The relative URL path to the skins directory
-$wgStylePath = "$wgScriptPath/skins";
-
-## The relative URL path to the logo. Make sure you change this from the default,
-## or else you'll overwrite your logo when you upgrade!
-$wgLogo = "$wgStylePath/common/images/wiki_logo_proto.png";
-
-## UPO means: this is also a user preference option
-
-$wgEnableEmail = true;
-$wgEnableUserEmail = true; # UPO
-
-$wgEmergencyContact = "preecej@science.oregonstate.edu";
-$wgPasswordSender = "preecej@science.oregonstate.edu";
-
-$wgEnotifUserTalk = true; # UPO
-$wgEnotifWatchlist = true; # UPO
-$wgEmailAuthentication = true;
-
-## Database settings
-$wgDBtype = "mysql";
-$wgDBserver = $_SERVER['proto_wgDBServer'];
-$wgDBname = $_SERVER['proto_wgDBName'];
-$wgDBuser = $_SERVER['proto_wgDBUser'];
-$wgDBpassword = $_SERVER['proto_wgDBPassword'];
-$wgJobRunRate = 1;
-
-# MySQL specific settings
-$wgDBprefix = "";
-
-# MySQL table options to use during installation or update
-$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
-
-# Experimental charset support for MySQL 4.1/5.0.
-$wgDBmysql5 = true;
-
-## Shared memory settings
-$wgMainCacheType = CACHE_NONE;
-$wgMemCachedServers = array();
-
-## To enable image uploads, make sure the 'images' directory
-## is writable, then set this to true:
-$wgEnableUploads = false;
-$wgUseImageMagick = true;
-$wgImageMagickConvertCommand = "/usr/bin/convert";
-
-## If you use ImageMagick (or any other shell command) on a
-## Linux server, this will need to be set to the name of an
-## available UTF-8 locale
-$wgShellLocale = "en_US.utf8";
-
-## If you want to use image uploads under safe mode,
-## create the directories images/archive, images/thumb and
-## images/temp, and make them all writable. Then uncomment
-## this, if it's not already uncommented:
-# $wgHashedUploadDirectory = false;
-
-## If you have the appropriate support software installed
-## you can enable inline LaTeX equations:
-$wgUseTeX = false;
-
-## Set $wgCacheDirectory to a writable directory on the web server
-## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
-#$wgCacheDirectory = "$IP/cache";
-
-$wgLocalInterwiki = strtolower( $wgSitename );
-
-$wgLanguageCode = "en";
-
-$wgSecretKey = "2030c0cc408640a1809ec82a9fb16e660d9988a63aeb77871a94c94a5f2d2c56";
-
-## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'vector', 'monobook':
-$wgDefaultSkin = 'planteome';
-
-## For attaching licensing metadata to pages, and displaying an
-## appropriate copyright notice / icon. GNU Free Documentation
-## License and Creative Commons licenses are supported so far.
-$wgEnableCreativeCommonsRdf = true;
-$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
-$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
-$wgRightsText = "Attribution-NonCommercial-ShareAlike 3.0 Unported";
-$wgRightsIcon = "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
-# $wgRightsCode = "[license_code]"; # Not yet used
-
-$wgDiff3 = "/usr/bin/diff3";
-
-
-# BEGIN 04/04/11: Justin Preece - Add'l Extensions
-$wgHiddenPrefs[] = 'skin';
-$wgUseAjax = true;
-include("$IP/extensions/SimpleForms/SimpleForms.php");
-
-require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
-$wgPFEnableStringFunctions = true;
-
-require_once( "$IP/extensions/Variables/Variables.php" );
-require_once( "$IP/extensions/Loops/Loops.php" );
-
-# END 04/04/11: Justin Preece - Add'l Extensions
-
-# BEGIN 02/22/11: Justin Preece - Semantic Bundle (SMW and other extensions)
-# (moved from top of file to address premature reference to $wgScriptPath)
-
-#include_once("$IP/extensions/DataTransfer_PS/DataTransfer.php");
-
-require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
-require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
-
-$sfgAutocompletionURLs['remote_PO_terms'] = 'http://proto.planteome.org/w/prototyping/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&qval=<substr>&format=json&max=20';
-$sfgAutocompleteOnAllChars = false;
-
-# END 02/22/11: Justin Preece - Semantic Bundle (SMW and other extensions)
-
-/** Allow client-side caching of pages */
-$wgCachePages = false;
-
-/**
- * * Set this to current time to invalidate all prior cached pages. Affects both
- * * client- and server-side caching.
- * * You can get the current date on your server by using the command:
- * * date +%Y%m%d%H%M%S
- * */
-$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
-
-
-# When you make changes to this configuration file, this will make
-# sure that cached pages are cleared.
-$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
+++ /dev/null
-<?php
-
-# This file was automatically generated by the MediaWiki installer.
-# If you make manual changes, please keep track in case you need to
-# recreate them later.
-#
-# See includes/DefaultSettings.php for all configurable settings
-# and their default values, but don't forget to make changes in _this_
-# file, not there.
-#
-# Further documentation for configuration settings may be found at:
-# http://www.mediawiki.org/wiki/Manual:Configuration_settings
-
-# If you customize your file layout, set $IP to the directory that contains
-# the other MediaWiki files. It will be used as a base to locate files.
-if( defined( 'MW_INSTALL_PATH' ) ) {
- $IP = MW_INSTALL_PATH;
-} else {
- $IP = dirname( __FILE__ );
-}
-
-$path = array( $IP, "$IP/includes", "$IP/languages" );
-set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
-
-require_once( "$IP/includes/DefaultSettings.php" );
-
-if ( $wgCommandLineMode ) {
- if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
- die( "This script must be run from the command line\n" );
- }
-}
-## Uncomment this to disable output compression
-# $wgDisableOutputCompression = true;
-
-$wgSitename = "Planteome Annotation Wiki - Test";
-
-## The URL base path to the directory containing the wiki;
-## defaults for all runtime URL paths are based off of this.
-## For more information on customizing the URLs please see:
-## http://www.mediawiki.org/wiki/Manual:Short_URL
-$wgScriptPath = "/paw";
-$wgScriptExtension = ".php";
-
-## The relative URL path to the skins directory
-$wgStylePath = "$wgScriptPath/skins";
-
-## The relative URL path to the logo. Make sure you change this from the default,
-## or else you'll overwrite your logo when you upgrade!
-$wgLogo = "$wgStylePath/common/images/wiki_logo_with_text.png";
-
-## UPO means: this is also a user preference option
-
-$wgEnableEmail = true;
-$wgEnableUserEmail = true; # UPO
-
-$wgEmergencyContact = "preecej@science.oregonstate.edu";
-$wgPasswordSender = "preecej@science.oregonstate.edu";
-
-$wgEnotifUserTalk = true; # UPO
-$wgEnotifWatchlist = true; # UPO
-$wgEmailAuthentication = true;
-
-## Database settings
-$wgDBtype = "mysql";
-$wgDBserver = $_SERVER['test_wgDBServer'];
-$wgDBname = $_SERVER['test_wgDBName'];;
-$wgDBuser = $_SERVER['test_wgDBUser'];
-$wgDBpassword = $_SERVER['test_wgDBPassword'];
-$JobRunRate = 1;
-
-# MySQL specific settings
-$wgDBprefix = "";
-
-# MySQL table options to use during installation or update
-$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
-
-# Experimental charset support for MySQL 4.1/5.0.
-$wgDBmysql5 = true;
-
-## Shared memory settings
-$wgMainCacheType = CACHE_NONE;
-$wgMemCachedServers = array();
-
-## To enable image uploads, make sure the 'images' directory
-## is writable, then set this to true:
-$wgEnableUploads = false;
-$wgUseImageMagick = true;
-$wgImageMagickConvertCommand = "/usr/bin/convert";
-
-## If you use ImageMagick (or any other shell command) on a
-## Linux server, this will need to be set to the name of an
-## available UTF-8 locale
-$wgShellLocale = "en_US.utf8";
-
-## If you want to use image uploads under safe mode,
-## create the directories images/archive, images/thumb and
-## images/temp, and make them all writable. Then uncomment
-## this, if it's not already uncommented:
-# $wgHashedUploadDirectory = false;
-
-## If you have the appropriate support software installed
-## you can enable inline LaTeX equations:
-$wgUseTeX = false;
-
-## Set $wgCacheDirectory to a writable directory on the web server
-## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
-#$wgCacheDirectory = "$IP/cache";
-
-$wgLocalInterwiki = strtolower( $wgSitename );
-
-$wgLanguageCode = "en";
-
-$wgSecretKey = "9fbf4140fef09d215376947e74fef8cd873b79b5f97cdf4baf6cf5226db8b706";
-
-## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'vector', 'monobook':
-$wgDefaultSkin = 'planteome';
-
-## For attaching licensing metadata to pages, and displaying an
-## appropriate copyright notice / icon. GNU Free Documentation
-## License and Creative Commons licenses are supported so far.
-$wgEnableCreativeCommonsRdf = true;
-$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
-$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
-$wgRightsText = "Attribution-NonCommercial-ShareAlike 3.0 Unported";
-$wgRightsIcon = "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
-# $wgRightsCode = "[license_code]"; # Not yet used
-
-$wgDiff3 = "/usr/bin/diff3";
-
-# BEGIN: Justin Preece - Config changes and Semantic Bundle (SMW and other extensions)
-# (moved from top of file to address premature reference to $wgScriptPath)
-
-#$wgHiddenPrefs[] = 'skin';
-#$wgUseAjax = true;
-
-#include_once("$IP/extensions/DataTransfer_PS/DataTransfer.php");
-
-require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
-require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
-
-#include("$IP/extensions/SimpleForms/SimpleForms.php");
-
-# PO web service calls
-$sfgAutocompletionURLs['remote_PO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=po&qval=<substr>&format=json&max=20';
-$sfgAutocompletionURLs['remote_PO_ids'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=po&qval=<substr>&format=json&max=20';
-
-# GO web service calls
-$sfgAutocompletionURLs['remote_GO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=go&qval=<substr>&format=json&max=25';
-$sfgAutocompletionURLs['remote_GO_ids'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=go&qval=<substr>&format=json&max=25';
-
-$sfgAutocompleteOnAllChars = false;
-
-# END: Justin Preece - Semantic Bundle (SMW and other extensions)
-
-/** Allow client-side caching of pages */
-$wgCachePages = false;
-
-/**
- * * Set this to current time to invalidate all prior cached pages. Affects both
- * * client- and server-side caching.
- * * You can get the current date on your server by using the command:
- * * date +%Y%m%d%H%M%S
- * */
-$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
-
-# When you make changes to this configuration file, this will make
-# sure that cached pages are cleared.
-$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
+++ /dev/null
-<?php
-if ( !defined( 'MEDIAWIKI' ) ) {
- echo "This file is not a valid entry point.";
- exit( 1 );
-}
-
-# Semantic MediaWiki basic installation.
-# More info: http://semantic-mediawiki.org/wiki/Help:Installation
-$wgServerName = "palea.cgrb.oregonstate.edu";
-
-include_once( "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php" );
-enableSemantics($wgServerName);
-
-# Semantic Result Formats
-# More info: http://semantic-mediawiki.org/wiki/Help:Semantic_Result_Formats#Installation
-#include_once( "$IP/extensions/SemanticResultFormats/SemanticResultFormats.php" );
-
-# Semantic Forms
-# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Forms
-include_once( "$IP/extensions/SemanticForms/SemanticForms.php" );
-
-# Semantic Forms Inputs
-# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs
-#include_once( "$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php" );
-
-# Semantic Compound Queries
-# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
-#include_once( "$IP/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php" );
-
-# Semantic Drilldown
-# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Drilldown#Installation
-#include_once( "$IP/extensions/SemanticDrilldown/SemanticDrilldown.php" );
-
-# Validator, Maps and Semantic Maps
-# If you're planning to use Google Maps or Yahoo! Maps, you should also set
-# $egGoogleMapsKey and $egYahooMapsKey.
-# More info:
-# http://www.mediawiki.org/wiki/Extension:Maps#Download_and_installation
-# http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Download_and_installation
-#include_once( "$IP/extensions/Validator/Validator.php" );
-#include_once( "$IP/extensions/Maps/Maps.php" );
-#include_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );
-
-# Semantic Tasks
-# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Tasks#Installation
-#include_once( "$IP/extensions/SemanticTasks/SemanticTasks.php" );
-
-# Semantic Internal Objects
-# More info: http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
-include_once( "$IP/extensions/SemanticInternalObjects/SemanticInternalObjects.php" );
-
-# Admin Links
-# More info: http://www.mediawiki.org/wiki/Extension:Admin_Links#Installation
-#include_once( "$IP/extensions/AdminLinks/AdminLinks.php" );
-
-# Approved Revs
-# More info: http://www.mediawiki.org/wiki/Extension:Approved_Revs#Installation
-#include_once( "$IP/extensions/ApprovedRevs/ApprovedRevs.php" );
-
-# ArrayExtension
-# More info: http://www.mediawiki.org/wiki/Extension:ArrayExtension#Installation
-#include_once( "$IP/extensions/ArrayExtension/ArrayExtension.php" );
-
-# Data Transfer
-# More info: http://www.mediawiki.org/wiki/Extension:Data_Transfer#Installation
-include_once( "$IP/extensions/DataTransfer/DataTransfer.php" );
-
-# External Data
-# More info: http://www.mediawiki.org/wiki/Extension:External_Data#Installation
-include_once( "$IP/extensions/ExternalData/ExternalData.php" );
-
-# Header Tabs
-# More info: http://www.mediawiki.org/wiki/Extension:Header_Tabs#Installation
-include_once( "$IP/extensions/HeaderTabs/HeaderTabs.php" );
-
-# Page Object Model (POM)
-# More info: http://www.mediawiki.org/wiki/Extension:Page_Object_Model#Installation
-#include_once( "$IP/extensions/PageObjectModel/PageObjectModel.php" );
-
-# ParserFunctions
-# More info: http://www.mediawiki.org/wiki/Extension:ParserFunctions
-require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
-$wgPFEnableStringFunctions = true;
-
-# Replace Text
-# More info: http://www.mediawiki.org/wiki/Extension:Replace_Text#Installation
-#require_once( "$IP/extensions/ReplaceText/ReplaceText.php" );
-
-# Widgets
-# Also need to do some permission setup: http://www.mediawiki.org/wiki/Extension:Widgets#Folder_permissions
-# More info: http://www.mediawiki.org/wiki/Extension:Widgets#Installation
-#require_once( "$IP/extensions/Widgets/Widgets.php" );
-#$wgGroupPermissions['sysop']['editwidgets'] = true;
+++ /dev/null
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-Planteome Annotation Wiki - Data Import Script
-
-=head1 VERSION
-
-0.3
-
-=head1 DESCRIPTION
-
-Transform external gene annotation data into an XML document readable
-by the MediaWiki extension DataTransfer (Special:ImportXML) feature.
-
-Also generates appropriate provenance of data based on a prefixed
-Source header in the import file.
-
-Handles GAF file type option for import; accommodates ontologically-
-focused annotations.
-
-New to this revision: ...
-
-=head1 USAGE
-
-paw_TransformForImport.pl -i INPUT_FILE -t TYPE -o OUTPUT_FILE -v -d
-
-=head1 OPTIONS
-
- -i Name of input file
- (if no path supplied, assumes current working directory)
- -t Specifies input type of file
- (allowed values: 'csv', 'tab', 'gaf')
- -o Name/template of output XML file; if no path supplied, assumes
- current working directory. The first file will match the
- supplied value; consequent files will be numbered in this
- format: '-#.suffix'
- -s Seed values (comma-delimited) for Source, Annotation, and
- Publication IDs (in that order, e.g. '2,38,15'); Defaults to
- '1' for all seed values
- -v View verbose information
- -d View debugging information
-
-=head1 DEPENDENCIES
-
-Requires that the input file contain at least two headers: the first
-will hold the provenance information associated with the imported
-data, and all following headers will specify the annotation data to
-be imported in accordance with the input type.
-
-=head2 Source Header Format Example
-
- [Source]
- Source Date Time Stamp=Apr 2 2008
- Source Database=Oryzabase
- Source Version=rel. 10
- Source URI=http://www.shigen.nig.ac.jp/rice/oryzabase/
- Source File=http://www.shigen.nig.ac.jp/rice/oryzabase/genes/...
-
-=head2 Data Header Generic Format Examples
-
- NOTES: The field separator may also be a tab instead, but must be
- employed consistently across the entire file. GAF files do not
- require a [Format] section.
-
- [Format]
- Template=Annotation
- Fields=Species Name,Gene Symbol,Gene Name,Chromosome,Gene Type,Accession ID
- [Data]
- val1,val2,val3,...
- "
- "
- "
- [Format]
- Template=Publication
- Fields=Publication,Publication ID,Publication Title,...,Accession ID
- [Data]
- val1,val2,val3,...
- "
- "
- "
-
- NOTE: One of the fields in each format MUST be named "Accession
- ID" for the tracking of provenance.
-
-=head1 AUTHOR
-
-Justin Preece
- Faculty Research Assistant, Bioinformatics
- Jaiswal Lab, Botany & Plant Pathology
- Oregon State University
- L<mailto:preecej@science.oregonstate.edu>
-
-=cut
-
-# TODO: file size check and clip
-# TODO: file numbering
-
-# ---------------------------------------------------------------------------
-# modules
-# ---------------------------------------------------------------------------
-
-# general
-use strict;
-use Cwd;
-use Switch;
-use Getopt::Std;
-use Data::Dumper;
-
-# specific
-use XML::Smart;
-use XML::Writer;
-use IO::File;
-use Encode;
-
-# ---------------------------------------------------------------------------
-# declarations
-# ---------------------------------------------------------------------------
-
-my %opts; # arg options
-my $file_type; # tab, csv, gaf
-my $file_del; # data delimeter
-my $input_file;
-my $output_file;
-my $verbose = 0; # flag for verbose output
-my $debug = 0; # debugging switch
-
-# global data storage ----------
-
-# universal
-my %source;
-my $output_data;
-
-# tab, csv
-my $template_name;
-my @field_names;
-my @field_data;
-my $xml; # represents the xml doc
-
-# gaf
-my %ontology_info; # holds ontology names and aspects, keyed by abbreviation
-my $curr_ontology_type; # flag to track the proper ontology to reference, line by line
-my %annotation_universals; # holds values assumed not to vary across the file
-my %annotations; # keyed on Gene Symbol
-
-# other config constants (including temporary arrangements)
-
-# default page id seeds, until I can figure out how to auto-increment w/in the
-# an import/update script
-my $SOURCE_TITLE_SEED = 1;
-my $ANNOT_TITLE_SEED = 1;
-my $PUB_TITLE_SEED = 1;
-
-$Data::Dumper::Pad = "... ";
-
-# ---------------------------------------------------------------------------
-# functions
-# ---------------------------------------------------------------------------
-
-
-# ---------------------------------------------------------------------------
-sub init
-{
- # read and set options
- getopts('i:t:o:s:vd', \%opts);
-
- foreach my $key (keys %opts) {
- my $value = $opts{$key};
- switch ($key) {
- case "i" {
- if ($value =~ /\//) { # assume path
- $input_file = $value;
- } else {
- $input_file = getcwd() . "\/$value";
- }
- }
- case "t" { $file_type = $value; }
-
- case "o" {
- if ($value =~ /\//) { # assume path
- $output_file = $value;
- } else {
- $output_file = getcwd() . "\/$value";
- }
- }
- case "s" {
- my @seeds = split(',',$value);
- if (scalar @seeds == 3) {
- $SOURCE_TITLE_SEED = $seeds[0];
- $ANNOT_TITLE_SEED = $seeds[1];
- $PUB_TITLE_SEED = $seeds[2];
- } else {
- die("Please supply three consecutive, comma-delimited seed"
- . "values for the 's' option.");
- }
- }
- case "v" { $verbose = 1; }
-
- case "d" { $debug = 1; }
- }
- }
-
- # split data on either commas or tabs
- switch ($file_type) {
- case "csv" { $file_del = ','; }
- case "tab" { $file_del = '\t'; }
- case "gaf" { $file_del = '\t'; }
- else {
- die(uc($file_type) . " is not a valid file type. Please supply "
- . "a tab, csv, or gaf file.\n");
- }
- }
-
- system "clear";
- print "\n"
- . "------------------------------------------------------------\n"
- . "-- Planteome Annotation Wiki Import Transformation Script --\n"
- . "------------------------------------------------------------\n"
- . "\n"
- . "Input File: $input_file\n"
- . "Designated input file type: $file_type\n"
- . "Output File (Template): $output_file\n"
- . "Source ID Seed: $SOURCE_TITLE_SEED\n"
- . "Annotations ID Seed: $ANNOT_TITLE_SEED\n"
- . "Publications ID Seed: $PUB_TITLE_SEED\n"
- . "Running in verbose mode? " . ($verbose ? "Yes" : "No") . "\n"
- . "Running in debug mode? " . ($debug ? "Yes" : "No") . "\n"
- . "\n"
- . "------------------------------------------------------------\n"
- . "------------------------------------------------------------\n"
- . "------------------------------------------------------------\n"
- . "\n";
-}
-
-
-# read, parse, and store generic CSV and tab templates and annotations
-# ---------------------------------------------------------------------------
-sub import_generic
-{
- # read in "[Format] section...
- my $line;
- my $count = 0;
-
- while (<INPUT_FILE>)
- {
- $count++;
- $line = $_;
- chomp $line;
- my $data_val = (split('=',$line))[1];
- switch ($count) {
- case 2 { $template_name = $data_val; }
- case 3 { @field_names = split($file_del,$data_val); }
- else {;}
- }
- if ($count == 3) { last; }
- }
-
- # loop through data rows and add all data fields to an array of hashes
- while (<INPUT_FILE>)
- {
- $line = $_;
- chomp $line;
-
- my @tmp_data_ary = split($file_del, $line);
- my %tmp_hash;
-
- if ($debug) { print join(',',@tmp_data_ary) . "\n"; }
-
- for (my $i=0; $i<scalar(@field_names); $i++) {
- if ($debug) { print "$i: $field_names[$i]: $tmp_data_ary[$i]\n"; }
- $tmp_hash{$field_names[$i]} = $tmp_data_ary[$i];
- }
- push @field_data, \%tmp_hash;
- }
-}
-
-# Add new ontology reference data. Aggregates add'l evidence codes, evidence,
-# and publications for the existing term id.
-# ---------------------------------------------------------------------------
-sub add_ontology_ref_data($$)
-{
- my %ref_data = %{$_[0]};
- my $ont_type = $_[1];
-
- my @evidence = split('\|', $ref_data{"with_or_from"});
- my @publications = split('\|', $ref_data{"db_reference"});
-
- my @tmp_pubs = @publications;
- for my $tmp_pub (@tmp_pubs)
- {
- if (substr($tmp_pub,0,5) ne "PMID:")
- {
- my @junk = splice(@publications,0,1);
- }
- }
-
- # aspect (assumes only one, allows overwrite)
- $annotations{$ref_data{"db_object_symbol"}}
- {"Ontological References"}
- {$ref_data{"term_id"}}
- {"Aspect"} = $ontology_info{$ont_type}
- {"aspects"}
- {uc($ref_data{"aspect"})};
-
- # evidence codes
- $annotations{$ref_data{"db_object_symbol"}}
- {"Ontological References"}
- {$ref_data{"term_id"}}
- {"Evidence Codes"}{$ref_data{"evidence_code"}} = "";
-
- # evidence
- for (@evidence)
- {
- $annotations{$ref_data{"db_object_symbol"}}
- {"Ontological References"}
- {$ref_data{"term_id"}}
- {"Evidence"}{$_} = "";
- }
-
- # publications
- for (@publications)
- {
- $annotations{$ref_data{"db_object_symbol"}}
- {"Ontological References"}
- {$ref_data{"term_id"}}
- {"Publications"}{$_} = "";
- }
-}
-
-# populate a hash containing ontology types and their aspects; used as a
-# reference for aspect proper names when importing GAF data for transformation
-# ---------------------------------------------------------------------------
-sub initialize_ontology
-{
- %ontology_info = (
- GO => {
- name => "Gene Ontology",
- aspects => {
- P => "Biological Process",
- C => "Cellular Component",
- F => "Molecular Function"
- }
- },
- PO => {
- name => "Plant Ontology",
- aspects => {
- A => "Plant Anatomy",
- G => "Plant Growth and Development Stage"
- }
- }
- );
-
- if ($debug) { print "...<DEBUG: \%ontology_info>\n"
- . Dumper(\%ontology_info) . "\n\n"; }
-}
-
-# read, parse, and store GAF annotations
-# ---------------------------------------------------------------------------
-sub import_gaf
-{
- #[GAF implied data structure]
- # singletons: db/Source (not really, but OK for now), taxon/Species ID,
- # assigned_by, gene_type/Gene Type (later: proteins, too)
- # lower priority: db_object_id, date
- # not needed: qualifier
- # unvaried fields (gene-level): db_object_symbol/Gene Symbol,
- # db_object_name/Gene Name,
- # db_object_synonym/Gene Locus|Source Accession ID|Chromosome|Gene Synonyms (see below),
- # varied fields (gene synonyms): db_object_synonym/Gene Synonym
- # varied fields (ontology-level): term_id/Term ID, evidence_code/Evidence Code,
- # aspect/Aspect, db_reference (multi-, get PMID from here), with_or_from (multi-)
-
- # [Annotation Object Structure]
- # %annotation_universals
- # "Source"
- # "Species ID"
- # "Gene Type"
- # %annotations
- # "$Gene Symbol" => %annotation_properties
- # "Gene Name" => string
- # "Gene Locus"/"Source Accession ID" (first uc("AT.G")) => string
- # "Chromosome" (AT#G in "Gene Locus") => string
- # "Gene Synonyms" => % strings
- # "Ontological References" => % "$Term ID" => %annotation_ontology_ref
- # "Aspect" => string (assumes only one)
- # "Evidence Codes" => % strings
- # "Evidence" => % strings ("with_or_from" )
- # "Publications" => % PMID's from "db:reference", used to create separate Pub pages
-
- # set up a hash of ontology types and aspects to be referenced during data import
- initialize_ontology();
-
- # loop through data rows and build hashed annotation data structure
- my $count = 0;
-
- # regex for locating a useable accession id from a locus (species-specific)
- my $locus_finder_expr;
-
- while (<INPUT_FILE>)
- {
- $count++;
- my $line = $_;
- chomp $line;
-
- my @curr_line_ary = split("\t", $line);
- if ($debug) { print "...<DEBUG: \@curr_line_ary>\n"
- . Dumper(\@curr_line_ary) . "\n\n"; }
-
- my %curr_line_hash = (
- "db" => $curr_line_ary[0], # Source
- "db_object_symbol" => $curr_line_ary[2], # Gene Symbol
- "term_id" => $curr_line_ary[4], # Term ID
- "db_reference" => $curr_line_ary[5], # inc. Publication info (PMID)
- "evidence_code" => $curr_line_ary[6], # Evidence Code
- "with_or_from" => $curr_line_ary[7], # Evidence (data)
- "aspect" => $curr_line_ary[8], # Aspect
- "db_object_name" => $curr_line_ary[9], # Gene Name
-
- # Gene Locus, Source Accession ID, Chromosome, Gene Synonyms
- "db_object_synonym" => $curr_line_ary[10],
- "db_object_type" => $curr_line_ary[11], # Gene Type
- "taxon" => $curr_line_ary[12] # Species ID
- );
-
- if ($debug) { print "...<DEBUG: \%curr_line_hash>\n"
- . Dumper(\%curr_line_hash) . "\n\n"; }
-
- # grab the unvaried values from the first line
- if ($count == 1) {
- %annotation_universals = (
- "Source" => $curr_line_hash{"db"}, # currently not in use
- "Gene Type" => $curr_line_hash{"db_object_type"},
- "Species ID" => "NCBI:" . (split(':',$curr_line_hash{"taxon"}))[1]#,
- #"Species Name" => $species_name # TODO: get this from NCBI
- );
-
- # set species-specific values
- switch ($annotation_universals{"Species ID"}) {
- case "NCBI:3702" {
- $locus_finder_expr = "^([Aa][Tt].[Gg])";
- $annotation_universals{"Species Name"} = "Arabidopsis thaliana"; # temp; need an NCBI lookup
- }
- case "NCBI:4530" {
- $locus_finder_expr = "^(LOC_|[Oo][Ss]|osa-)";
- $annotation_universals{"Species Name"} = "Oryza sativa"; # temp; need an NCBI lookup
- }
- else {
- die($annotation_universals{"Species ID"}
- . " is not a valid NCBI taxon ID.\n");
- }
- }
-
- if ($debug) { print "...<DEBUG: \%annotation_universals>\n"
- . Dumper(\%annotation_universals) . "\n\n"; }
-
- }
-
- # set the ontology for the current line
- $curr_ontology_type = uc((split(':',$curr_line_hash{"term_id"}))[0]);
-
- # check to see if Gene Symbol hash key exists (for grouping)
- # if not, add the new Gene Symbol and its associated props
- if (!exists $annotations{$curr_line_hash{"db_object_symbol"}})
- {
-
- # print "\n*** NEW SYMBOL: $curr_line_hash{'db_object_symbol'} ***\n"; # TEST
-
- # prepare Gene Locus, Source Accession ID, Chromosome, Gene Synonyms
- my @loci;
- my $locus = "";
-
- if (exists $curr_line_hash{"db_object_synonym"})
- {
- my @synonyms = split('\|',$curr_line_hash{"db_object_synonym"});
-
- if ($debug) { print "...<DEBUG: \@synonyms>\n"
- . Dumper(\@synonyms) . "\n\n"; }
-
- # find the gene locus, if it is listed
- @loci = grep /$locus_finder_expr/, @synonyms;
-
- if ($debug) { print "...<DEBUG: \@loci>\n"
- . Dumper(\@loci) . "\n\n"; }
- }
-
- if (scalar(@loci) > 0) # we have at least one match; use the first one
- {
- $locus = $loci[0];
- }
- else # no match; attempt to use the Gene Symbol instead
- {
- if ($curr_line_hash{"db_object_symbol"} =~ $locus_finder_expr)
- {
- # the split drops the variant/allele signifier, if present
- if (!(split('.',$curr_line_hash{"db_object_symbol"}))[0])
- {
- $locus = $curr_line_hash{"db_object_symbol"};
- }
- else
- {
- $locus = (split('.',$curr_line_hash{"db_object_symbol"}))[0];
- }
- }
- else # no match; attempt to use the Gene Name instead
- {
- if ($curr_line_hash{"db_object_name"} =~ $locus_finder_expr)
- {
- $locus = (split('.',$curr_line_hash{"db_object_name"}))[0];
- }
- }
- }
-
- my $chromosome = "";
- if ($locus) {
- if ($annotation_universals{"Species ID"} eq "NCBI:3702") {
- # for Ath, third char in locus, if it exists
- $chromosome = ($locus ne "" ? (split('',$locus))[2] : "");
- }
- }
-
- # set some sort of pseudo-unique value as the accession id,
- # in order of succession: locus, then symbol
- # (NOTE: this is dangerous; a stable identifier is preferred)
- my $accession_id =
- $locus ? $locus : $curr_line_hash{"db_object_symbol"};
-
- # set up props
- my $annotation_properties = {
- "Accession ID" => $accession_id,
- "Gene Name" => $curr_line_hash{"db_object_name"},
- "Gene Locus" => $locus,
- "Chromosome" => $chromosome
- };
-
- # add synonyms
- for (split('\|', $curr_line_hash{"db_object_synonym"})) {
- $$annotation_properties{"Gene Synonyms"}{$_} = ""; }
-
- if ($debug) { print "...<DEBUG: \%annotation_properties>\n"
- . Dumper($annotation_properties) . "\n\n"; }
-
- # add new gene annotation and assign props
- $annotations{$curr_line_hash{"db_object_symbol"}} = $annotation_properties;
-
- add_ontology_ref_data(\%curr_line_hash, $curr_ontology_type); # add the first ontology reference (every time)
- }
- # that Gene Symbol does exist, so we just need to roll-up multi-line
- # annotation information, like gene synonyms and ontology refs
- else
- {
- #print "\n*** EXISTING SYMBOL: $curr_line_hash{'db_object_symbol'} ***\n"; # TEST
-
- # add any add'l synonyms
- for (split('\|', $curr_line_hash{"db_object_synonym"})) {
- $annotations{$curr_line_hash{"db_object_symbol"}}
- {"Gene Synonyms"}{$_} = ""; }
-
- add_ontology_ref_data(\%curr_line_hash, $curr_ontology_type); # add add'l ontology reference data
- }
- }
- if ($debug) { print "...<DEBUG: \%annotations>\n"
- . Dumper(\%annotations) . "\n\n"; }
-}
-
-
-# read, parse, and store source
-# ---------------------------------------------------------------------------
-sub import_data
-{
- print "Opening input file and reading header info...\n\n";
-
- # open file
- open(INPUT_FILE,$input_file) or die("Could not open input file.");
-
- # read in the source data
- my $count = 0;
- my $line;
- while (<INPUT_FILE>)
- {
- $count++;
- $line = $_;
- chomp $line;
- my $data_val = (split('=',$line))[1];
- switch ($count) {
- case 2 { $source{'SourceDateStamp'} = $data_val; }
- case 3 { $source{'SourceDatabase'} = $data_val; }
- case 4 { $source{'SourceVersion'} = $data_val; }
- case 5 { $source{'SourceURI'} = $data_val; }
- case 6 { $source{'SourceFile'} = $data_val; }
- else {;}
- }
- if ($count == 6) { last; }
- }
-
- print "Reading data...\n\n";
- $line = <INPUT_FILE>; # skip "[Data]"
-
- switch ($file_type) {
- case ('csv' || 'tab') { import_generic(); }
- case 'gaf' { import_gaf(); }
- }
-
- close INPUT_FILE;
-}
-
-
-# spit out the data to make sure you've read in the files correctly
-# ---------------------------------------------------------------------------
-sub show_input
-{
- print "\n[Source]\n";
- foreach my $key (keys %source) {
- print "$key: $source{$key}\n";
- }
- print "\n";
-
- switch ($file_type) {
- case ('csv' || 'tab') {
- print "[Template]\n$template_name\n\n";
- print "[Fields]\n" . join(', ',@field_names) . "\n\n";
-
- print "[Data]\n";
- foreach my $row (@field_data) {
- foreach my $key (keys %$row) {
- print "$key => " . $row->{$key} . "\n";
- }
- print "\n";
- }
- }
- case 'gaf' {
- print "[Data]\n";
-
- for my $key (keys %annotation_universals) {
- print "$key: " . $annotation_universals{$key} . "\n";
- }
- print "\n";
-
- print "[Annotations]\n" . Dumper(\%annotations) . "\n\n";
- }
- }
- print "\n";
-}
-
-# xml transformation for generic tab or CSV-templated data
-# (currently uses XML::Smart)
-# ---------------------------------------------------------------------------
-sub transform_generic
-{
- my $curr_node; # placeholder for general node cursor
- my $curr_prov_node; # placeholder for node cursor in provenance pages
- my $curr_annot_node; # placeholder for node cursor in annotation pages
- my $curr_accession_id; # holds each rows accession id for provenance marking
-
-
- $xml = new XML::Smart($output_data, 'XML::Smart::Parser');
-
- # set root element, source page and elements
- # (temp set of page title until moved to import extension)
- $xml->{Pages}{Page} = {Title => "Source:$SOURCE_TITLE_SEED"};
-
- $curr_node = $xml->{Pages}{Page};
- $curr_node->{Template} = {Name => 'Source'};
- $curr_node = $curr_node->{Template};
-
- $curr_node->{Field}[0] = {Name => 'Source Date Stamp'};
- $curr_node->{Field}[0]->content(0,$source{'SourceDateStamp'});
- $curr_node->{Field}[1] = {Name => 'Source Database'};
- $curr_node->{Field}[1]->content(0,$source{'SourceDatabase'});
- $curr_node->{Field}[2] = {Name => 'Source Version'};
- $curr_node->{Field}[2]->content(0,$source{'SourceVersion'});
- $curr_node->{Field}[3] = {Name => 'Source URI'};
- $curr_node->{Field}[3]->content(0,$source{'SourceURI'});
- $curr_node->{Field}[4] = {Name => 'Source File'};
- $curr_node->{Field}[4]->content(0,$source{'SourceFile'});
-
- $curr_node = $curr_node->back->back; # return to <Pages> node
-
- if ($debug) { print "Current node: " . $curr_node->path . "\n"; }
-
- my $next_page_title_id = $ANNOT_TITLE_SEED;
-
- # iterate through the data
- foreach my $row (@field_data) {
-
- # set up next annotation page
- my $next_page = { Title => "Annotation:$next_page_title_id" };
- push(@{$curr_node->{Page}}, $next_page);
-
- $curr_annot_node = $curr_node->{Page}(
- "Title","eq","Annotation:$next_page_title_id");
-
- if ($debug) { print "Curr annot node: ".$curr_annot_node->path."\n";}
-
- $curr_annot_node->{Template} = {Name => "$template_name"};
- $curr_annot_node = $curr_annot_node->{Template};
-
- # set up next provenance page
- $next_page = { Title => "Annotation:$next_page_title_id/Provenance" };
- push(@{$curr_node->{Page}}, $next_page);
-
- $curr_prov_node = $curr_node->{Page}(
- "Title","eq","Annotation:$next_page_title_id/Provenance");
-
- if ($debug) {print "Curr prov node: " . $curr_prov_node->path . "\n"; }
-
- $curr_prov_node->{Template} = {Name => 'Provenance'};
- $curr_prov_node = $curr_prov_node->{Template};
- $curr_prov_node->{Field} = {Name => 'Annotation Page'};
- $curr_prov_node->{Field}->content(0,"Annotation:$next_page_title_id");
- $curr_prov_node = $curr_prov_node->back;
-
- my $field_ct = 0; # counter for field position in pages
-
- # grab the Accession ID for the current row of data
- foreach my $key (keys %$row) {
- if ($key eq "Accession ID") {
- $curr_accession_id = $row->{$key};
- if ($debug) {
- print "* Found Accession ID: $curr_accession_id *\n";
- }
- }
- }
- if (!(defined $curr_accession_id)) {
- die "Error: No Accession ID available. Ending program.\n";
- }
-
- # iterate through the annotation data and assign to <Field> elements
- foreach my $key (keys %$row) {
- if ($debug) { print "$key => " . $row->{$key} . "\n"; }
-
- # build the annotation page
- $curr_annot_node->{Field}[$field_ct] = {Name => $key};
- $curr_annot_node->{Field}[$field_ct]->content(0,$row->{$key});
- $field_ct++;
-
- # add a corresponding template to the annotation provenance page
- my $next_prov_node = {Name => 'Provenance_Repeater'};
- push(@{$curr_prov_node->{Template}}, $next_prov_node);
-
- # grab the last template you added
- $curr_prov_node = @{$curr_prov_node->{Template}}[-1];
-
- # assign the relevant provenance field data
- $curr_prov_node->{Field}[0] = {Name => 'Source'};
- $curr_prov_node->{Field}[0]->content(0,"Source:$SOURCE_TITLE_SEED");
- $curr_prov_node->{Field}[1] = {Name => 'Source Accession ID'};
- $curr_prov_node->{Field}[1]->content(0,$curr_accession_id);
- $curr_prov_node->{Field}[2] = {Name => 'Source Template'};
- $curr_prov_node->{Field}[2]->content(0,$template_name);
- $curr_prov_node->{Field}[3] = {Name => 'Source Field'};
- $curr_prov_node->{Field}[3]->content(0,$key);
-
- $curr_prov_node = $curr_prov_node->back;
- }
- $next_page_title_id++;
- }
-
- # write out xml doc to a single ImportXML file
- print "Writing data to output file...\n\n";
- $xml->save($output_file);
- $output_data = $xml->data;
-}
-
-# xml transformation for GAF data
-# (currently uses XML::DOM)
-# ---------------------------------------------------------------------------
-sub transform_gaf
-{
- # define templates and their fields for Provenance-generation
- my $template_field_map = {
- Annotation => [
- 'Species Name',
- 'Species ID',
- 'Gene Symbol',
- 'Gene Name',
- 'Gene Locus',
- 'Gene Type',
- 'Chromosome',
- 'Has Phenotype'
- ]
- };
-
- my %ref_pubs; # list of non-duplicate publication references
-
- # create new xml doc, write to string
- my $writer = new XML::Writer(
- OUTPUT => \$output_data,
- DATA_MODE => 1,
- DATA_INDENT => 4,
- ENCODING => 'utf-8'
- );
-
- # create root elements
- $writer->xmlDecl;
- $writer->startTag("Pages");
-
- # create source page
- $writer->startTag("Page",Title=>"Source:$SOURCE_TITLE_SEED");
- $writer->startTag("Template",Name=>"Source");
-
- # iterate the source hash for element name attribs and vals
- my @pretty_elements;
- foreach my $element (keys %source)
- {
- # split on CamelCase (saves a few lines and was fun to write)
- for ($element) {
- @pretty_elements = /[A-Z](?:[A-Z]+|[a-z]*)(?=$|[A-Z])/g;
- }
- $writer->dataElement("Field", $source{$element}, Name=>"@pretty_elements");
- }
-
- $writer->endTag("Template");
- $writer->endTag("Page");
-
- # iterate %annotations
- my $annot_title_count = $ANNOT_TITLE_SEED;
-
- foreach my $annotation (keys %annotations)
- {
- # create annotation page
- $writer->startTag("Page",Title=>"Annotation:$annot_title_count");
- $writer->startTag("Template",Name=>"Annotation");
- $writer->dataElement("Field", $annotation_universals{"Species Name"}, Name=>"Species Name");
- $writer->dataElement("Field", $annotation_universals{"Species ID"}, Name=>"Species ID");
- $writer->dataElement("Field", $annotation, Name=>"Gene Symbol");
- $writer->dataElement("Field", $annotations{$annotation}{"Gene Name"}, Name=>"Gene Name");
- $writer->dataElement("Field", $annotations{$annotation}{"Gene Locus"}, Name=>"Gene Locus");
- $writer->dataElement("Field", ucfirst($annotation_universals{"Gene Type"}), Name=>"Gene Type");
- $writer->dataElement("Field", $annotations{$annotation}{"Chromosome"}, Name=>"Chromosome");
- $writer->dataElement("Field", "No", Name=>"Has Phenotype");
- $writer->endTag("Template");
- $writer->endTag("Page");
-
- # create gene synonyms page
- if (scalar keys (%{$annotations{$annotation}{'Gene Synonyms'}}) > 0)
- {
- $writer->startTag("Page",Title=>"Annotation:$annot_title_count/Gene Synonyms");
- $writer->startTag("Template",Name=>"Gene_Synonyms");
- $writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
- $writer->endTag("Template");
-
- foreach my $synonym (keys %{$annotations{$annotation}{'Gene Synonyms'}})
- {
- $writer->startTag("Template",Name=>"Gene_Synonym_Repeater");
- $writer->dataElement("Field", $synonym, Name=>"Gene Synonym");
- $writer->endTag("Template");
- }
- $writer->endTag("Page");
- }
-
- # create ont refs page
- if (scalar keys (%{$annotations{$annotation}{"Ontological References"}}) > 0)
- {
- $writer->startTag("Page",Title=>"Annotation:$annot_title_count/Ontologies");
- $writer->startTag("Template",Name=>"Ontological_References");
- $writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
- $writer->endTag("Template");
-
- foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}})
- {
- # gather PMID's for separate Ref Publication page creation (avoid dupes)
- if (scalar keys (%{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Publications"}}) > 0) {
- foreach my $pub_term (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Publications"}})
- {
- if (!exists $ref_pubs{$pub_term}) {
- $ref_pubs{$pub_term} = { "Annotation:$annot_title_count" => "" };
- }
- else
- {
- $ref_pubs{$pub_term}{"Annotation:$annot_title_count"} = "";
- }
- }
- }
-
- $writer->startTag("Template",Name=>"$ontology_info{$curr_ontology_type}{name} Reference Repeater");
- $writer->dataElement("Field", $ontology_info{$curr_ontology_type}{"name"}, Name=>"Ontology");
- $writer->dataElement("Field", $ont_term, Name=>"Term ID");
- $writer->dataElement("Field", $annotations{$annotation}{"Ontological References"}{$ont_term}{"Aspect"}, Name=>"Aspect");
-
- my @evidence_codes;
- foreach my $evidence_code (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Evidence Codes"}}) {
- push @evidence_codes, $evidence_code;
- }
- $writer->dataElement("Field", join(', ',@evidence_codes), Name=>"Evidence Code");
-
- my @ary_evidence;
- foreach my $evidence (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Evidence"}}) {
- push @ary_evidence, $evidence;
- }
- $writer->dataElement("Field", join(', ',@ary_evidence), Name=>"Evidence");
-
- $writer->endTag("Template");
- }
- $writer->endTag("Page");
- }
-
- # create provenance page
- $writer->startTag("Page",Title=>"Annotation:$annot_title_count/Provenance");
- $writer->startTag("Template",Name=>"Provenance");
- $writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
- $writer->endTag("Template");
-
- # items on the Annotation page
- foreach (@{@$template_field_map{"Annotation"}})
- {
- $writer->startTag("Template",Name=>"Provenance_Repeater");
- $writer->dataElement("Field", $_, Name=>"Source Field or Object");
- $writer->dataElement("Field", "Annotations", Name=>"Source Category");
- $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
- $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
- $writer->endTag("Template");
- }
-
- # items on the Gene Synonyms subpage
- if (scalar keys (%{$annotations{$annotation}{'Gene Synonyms'}}) > 0)
- {
- foreach my $synonym (keys %{$annotations{$annotation}{'Gene Synonyms'}})
- {
- $writer->startTag("Template",Name=>"Provenance_Repeater");
- $writer->dataElement("Field", $synonym, Name=>"Source Field or Object");
- $writer->dataElement("Field", "Gene Synonyms", Name=>"Source Category");
- $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
- $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
- $writer->endTag("Template");
- }
- }
-
- # items on the Ontologies subpage
- if (scalar keys (%{$annotations{$annotation}{"Ontological References"}}) > 0)
- {
- foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}})
- {
- $writer->startTag("Template",Name=>"Provenance_Repeater");
- $writer->dataElement("Field", $ont_term, Name=>"Source Field or Object");
- $writer->dataElement("Field", "Ontological References", Name=>"Source Category");
- $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
- $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
- $writer->endTag("Template");
- }
- }
-
-
- $writer->endTag("Page");
-
- $annot_title_count++;
- }
-
- if ($debug) { print "...<DEBUG: \%ref_pubs>\n"
- . Dumper(\%ref_pubs) . "\n\n"; }
-
- # create Reference Publication pages
- my $pub_title_count = $PUB_TITLE_SEED;
-
- if (scalar keys (%ref_pubs) > 0) {
-
- foreach my $ref_pub (keys %ref_pubs)
- {
- $writer->startTag("Page",Title=>"Publication:$pub_title_count");
- $writer->startTag("Template",Name=>"Reference_Publication");
- $writer->dataElement("Field", "PubMed", Name=>"Publication"); # TODO: replace hard-coded pub type w/ something dynamic
- $writer->dataElement("Field", $ref_pub, Name=>"Publication ID");
- my @annot_refs; # holds com-del string of annotation page references
- foreach my $annot_ref (keys %{$ref_pubs{$ref_pub}})
- {
- push @annot_refs, $annot_ref;
- }
- $writer->dataElement("Field", join(',',@annot_refs), Name=>"Annotation References");
- $writer->endTag("Template");
- $writer->endTag("Page");
-
- $pub_title_count++;
- }
- }
-
- # close doc
- $writer->endTag("Pages");
- $writer->end();
-
- # write out the file
- open(OUTPUT_FILE,">$output_file");
- print OUTPUT_FILE $output_data;
- close OUTPUT_FILE;
-}
-
-
-# loop through the hash and build annotation data and source xml doc
-# ---------------------------------------------------------------------------
-sub write_xml
-{
- print "Transforming " . uc($file_type) . " data to SMW/SF XML...\n\n";
-
- switch ($file_type) {
- case ('csv' || 'tab') { transform_generic(); }
- case 'gaf' { transform_gaf(); }
- }
-}
-
-
-# print the transformed data (as xml)
-# ---------------------------------------------------------------------------
-sub show_output
-{
- print "[XML]\n";
- print $output_data;
- print "\n";
-}
-
-# ---------------------------------------------------------------------------
-# main
-# ---------------------------------------------------------------------------
-
-init;
-import_data;
-if ($verbose) { show_input; }
-write_xml();
-if ($verbose) { show_output; }
-
-exit;
-
+++ /dev/null
-<?php
-$pub_id = $_GET["pub_id"];
-$url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi/?db=pubmed&id=" . $pub_id;
-$response = file_get_contents($url);
-
-$NCBI_doc = new SimpleXMLElement($response); // inst. NCBI eDocSummary as xml
-$xml_out = new SimpleXMLElement("<eSummaryResult/>"); // inst. new xml doc for output
-
-// build xml doc with NCBI data
-$DocSum = $xml_out->addChild("DocSum");
-$DocSum->addChild("Id",$NCBI_doc->DocSum->Id);
-
-foreach ($NCBI_doc->xpath("//Item") as $item) {
- switch((string) $item["Name"]) { // Get attributes as element indices
- case "PubDate":
- $DocSum->addChild("PubDate",$item);
- break;
- case "Author":
- $authorList[] = $item;
- break;
- case "LastAuthor":
- $DocSum->addChild("LastAuthor",$item);
- break;
- case "Title":
- $DocSum->addChild("Title",$item);
- break;
- case "Volume":
- $DocSum->addChild("Volume",$item);
- break;
- case "Pages":
- $DocSum->addChild("Pages",$item);
- break;
- case "FullJournalName":
- $DocSum->addChild("FullJournalName",$item);
- break;
- }
-}
-
-$author_list = "";
-foreach ($authorList as $author) {
- $author_list = $author_list . $author . ", ";
-}
-$DocSum->addChild("AuthorList",rtrim($author_list,", "));
-
-
-header('Content-Type: text/xml'); // output xml doctype in your response
-echo $xml_out->asXML();
-?>
-
+++ /dev/null
-<?php
-// JSON web service for PO terms: autocomplete and search methods
-
-/* require the user as the parameter */
-if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
-
- $arr_field_names = array('name','acc');
-
- /* read the params and/or set our own */
- $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
-
- // security measures; helps to avoid SQL injection attacks
- $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
- ? $_GET['field']
- : die('"field" is a required parameter and must match an available data field.');
-
- $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
- if ($number_of_terms > 50) { $number_of_terms = 50; }
-
- $qval = $_GET['qval'];
-
- $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
- ? strtolower($_GET['qval'])
- : die('Please provide a searchable value');
-
- $format = strtolower($_GET['format']) != 'json'
- ? strtolower($_GET['format'])
- : 'json'; //json is the default
-
- /* connect to the db */
- $link = mysql_connect($_SERVER['mysql_host'], $_SERVER['mysql_user'], $_SERVER['mysql_pw']) or die('Cannot connect to the DB');
- mysql_select_db($_SERVER['mysql_db'],$link) or die('Cannot select the DB');
-
- switch ($type) {
- case 'autocomplete':
- /* grab the terms from the db */
- $query = "SELECT t.$field FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.$field LIKE '%$qval%'"
- . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY name LIMIT $number_of_terms";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- $terms[] = array('title'=>$term[$field]);
- }
- }
-
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('sfautocomplete'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
-
- case 'term_detail':
- /* grab the ontology data from the db */
- $query = "SELECT DISTINCT t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
- . " FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.name = '$qval'"
- . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY t.name LIMIT 1";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- $terms[] = array(
- 'id'=>$term['acc'],
- 'aspect'=>$term['type'] == "plant_anatomy" ? "Plant Anatomy" : "Plant Growth and Development Stage",
- 'definition'=>$term['definition'],
- 'comment'=>$term['comment']);
- }
- }
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('PO_result'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
- default:
- die('Sorry, this web service method is not available.');
- }
- /* disconnect from the db */
- @mysql_close($link);
-}
-else { die('Not authorized.'); }
-?>
-
+++ /dev/null
-<?php
-// JSON test return for autocomplete field
-
-echo "{\"sfautocomplete\":[{\"title\":\"Arabidopsis thaliana\"},{\"title\":\"Oryza sativa\"},{\"title\":\"Chlorogalum pomeridianum\"}]}";
-
-?>
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<species_collection>
- <species name="Arabidopsis thaliana" />
- <species name="Oryza sativa" />
- <species name="Chlorogalum pomeridianum" />
-</species_collection>
-
+++ /dev/null
-<?php echo 'ajax returned successfully'; ?>
+++ /dev/null
-<?php
-$pub_id = $_GET["pub_id"];
-$url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi/?db=pubmed&id=" . $pub_id;
-$response = file_get_contents($url);
-
-$NCBI_doc = new SimpleXMLElement($response); // inst. NCBI eDocSummary as xml
-$xml_out = new SimpleXMLElement("<eSummaryResult/>"); // inst. new xml doc for output
-
-// build xml doc with NCBI data
-$DocSum = $xml_out->addChild("DocSum");
-$DocSum->addChild("Id",$NCBI_doc->DocSum->Id);
-
-foreach ($NCBI_doc->xpath("//Item") as $item) {
- switch((string) $item["Name"]) { // Get attributes as element indices
- case "PubDate":
- $DocSum->addChild("PubDate",$item);
- break;
- case "Author":
- $authorList[] = $item;
- break;
- case "LastAuthor":
- $DocSum->addChild("LastAuthor",$item);
- break;
- case "Title":
- $DocSum->addChild("Title",$item);
- break;
- case "Volume":
- $DocSum->addChild("Volume",$item);
- break;
- case "Pages":
- $DocSum->addChild("Pages",$item);
- break;
- case "FullJournalName":
- $DocSum->addChild("FullJournalName",$item);
- break;
- }
-}
-
-$author_list = "";
-foreach ($authorList as $author) {
- $author_list = $author_list . $author . ", ";
-}
-$DocSum->addChild("AuthorList",rtrim($author_list,", "));
-
-
-header('Content-Type: text/xml'); // output xml doctype in your response
-echo $xml_out->asXML();
-?>
-
+++ /dev/null
-<?php
-// JSON web service for PO terms: autocomplete and search methods
-
-/* require the user as the parameter */
-if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
-
- $arr_field_names = array('name','acc');
- $arr_ontologies = array('go','po');
-
- /* read the params and/or set our own */
- $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
-
- // security measures; helps to avoid SQL injection attacks
- $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
- ? $_GET['field']
- : die('"field" is a required parameter and must match an available data field.');
-
- $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
- if ($number_of_terms > 50) { $number_of_terms = 50; }
-
- $ont = isset($_GET['ontology']) && in_array(strtolower($_GET['ontology']),$arr_ontologies)
- ? strtolower($_GET['ontology'])
- : die('"ontology" is a required parameter and must match an available data field.');
-
- $qval = $_GET['qval'];
-
- $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
- ? strtolower($_GET['qval'])
- : die('Please provide a searchable value');
-
- $format = strtolower($_GET['format']) != 'json'
- ? strtolower($_GET['format'])
- : 'json'; //json is the default
-
- /* connect to the appropriate db */
- switch ($ont) {
- case 'po':
- $link = mysql_connect($_SERVER['dev_po_host'], $_SERVER['dev_po_user'], $_SERVER['dev_po_pw']) or die('Cannot connect to the DB');
- mysql_select_db($_SERVER['dev_po_db'],$link) or die('Cannot select the DB');
-
- $term_types = "'plant_anatomy','plant_growth_and_development_stage'";
- break;
-
- case 'go':
- $link = mysql_connect($_SERVER['dev_go_host'], $_SERVER['dev_go_user'], $_SERVER['dev_go_pw']) or die('Cannot connect to the DB');
- mysql_select_db($_SERVER['dev_go_db'],$link) or die('Cannot select the DB');
-
- $term_types = "'biological_process','cellular_component','molecular_function'";
- break;
-
- default:
- die('Sorry, this ontology type is not available.');
- }
-
- switch ($type) {
- case 'autocomplete':
- /* grab the terms from the db */
- $query = "SELECT t.$field FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.$field LIKE '%$qval%'"
- . " AND t.term_type in ($term_types)"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY name LIMIT $number_of_terms";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- $terms[] = array('title'=>$term[$field]);
- }
- }
-
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('sfautocomplete'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
-
- case 'term_detail':
- /* grab the ontology data from the db */
- $query = "SELECT DISTINCT t.name as 'name', t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
- . " FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.$field = '$qval'"
- . " AND t.term_type in ($term_types)"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY t.name LIMIT 1";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- switch($term['type']) {
- case 'plant_anatomy':
- $term_type_formal = "Plant Anatomy"; break;
- case 'plant_growth_and_development_stage':
- $term_type_formal = "Plant Growth and Development Stage"; break;
- case 'biological_process':
- $term_type_formal = "Biological Process"; break;
- case 'cellular_component':
- $term_type_formal = "Cellular Component"; break;
- case 'molecular_function':
- $term_type_formal = "Molecular Function"; break;
- }
- $terms[] = array(
- 'name'=>$term['name'],
- 'id'=>$term['acc'],
- 'aspect'=>$term_type_formal,
- 'definition'=>$term['definition'],
- 'comment'=>$term['comment']);
- }
- }
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('term_detail_result'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
- default:
- die('Sorry, this web service method is not available.');
- }
- /* disconnect from the db */
- @mysql_close($link);
-}
-else { die('Not authorized.'); }
-?>
-
+++ /dev/null
-<?php
-// JSON web service for PO terms: autocomplete and search methods
-
-/* require the user as the parameter */
-if(isset($_GET['user']) && ($_GET['user']) == 'paw') {
-
- $arr_field_names = array('name','acc');
- $arr_ontologies = array('go','po');
-
- /* read the params and/or set our own */
- $type = isset($_GET['type']) ? $_GET['type'] : autocomplete; // autocomplete is the default
-
- // security measures; helps to avoid SQL injection attacks
- $field = isset($_GET['field']) && in_array($_GET['field'],$arr_field_names)
- ? $_GET['field']
- : die('"field" is a required parameter and must match an available data field.');
-
- $number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
- if ($number_of_terms > 50) { $number_of_terms = 50; }
-
- $ont = isset($_GET['ontology']) && in_array(strtolower($_GET['ontology']),$arr_ontologies)
- ? strtolower($_GET['ontology'])
- : die('"ontology" is a required parameter and must match an available data field.');
-
- $qval = $_GET['qval'];
-
- $qval = isset($_GET['qval']) && strlen($_GET['qval']) > 0
- ? strtolower($_GET['qval'])
- : die('Please provide a searchable value');
-
- $format = strtolower($_GET['format']) != 'json'
- ? strtolower($_GET['format'])
- : 'json'; //json is the default
-
- /* connect to the appropriate db */
- switch ($ont) {
- case 'po':
- $link = mysql_connect($_SERVER['test_po_host'], $_SERVER['test_po_user'], $_SERVER['test_po_pw']) or die('Cannot connect to the DB');
- mysql_select_db($_SERVER['test_po_db'],$link) or die('Cannot select the DB');
-
- $term_types = "'plant_anatomy','plant_growth_and_development_stage'";
- break;
-
- case 'go':
- $link = mysql_connect($_SERVER['test_go_host'], $_SERVER['test_go_user'], $_SERVER['test_go_pw']) or die('Cannot connect to the DB');
- mysql_select_db($_SERVER['test_go_db'],$link) or die('Cannot select the DB');
-
- $term_types = "'biological_process','cellular_component','molecular_function'";
- break;
-
- default:
- die('Sorry, this ontology type is not available.');
- }
-
- switch ($type) {
- case 'autocomplete':
- /* grab the terms from the db */
- $query = "SELECT t.$field FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.$field LIKE '%$qval%'"
- . " AND t.term_type in ($term_types)"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY name LIMIT $number_of_terms";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- $terms[] = array('title'=>$term[$field]);
- }
- }
-
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('sfautocomplete'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
-
- case 'term_detail':
- /* grab the ontology data from the db */
- $query = "SELECT DISTINCT t.name as 'name', t.acc as 'acc', t.term_type as 'type', d.term_definition as 'definition', d.term_comment as 'comment'"
- . " FROM term t"
- . " LEFT JOIN term_definition d ON d.term_id = t.id"
- . " WHERE t.$field = '$qval'"
- . " AND t.term_type in ($term_types)"
- . " AND t.is_obsolete = 0"
- . " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
- . " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
- . " ORDER BY t.name LIMIT 1";
- $result = mysql_query($query,$link) or die('Errant query: '.$query);
-
- /* create one master array of the records */
- $terms = array();
- if(mysql_num_rows($result)) {
- while($term = mysql_fetch_assoc($result)) {
- switch($term['type']) {
- case 'plant_anatomy':
- $term_type_formal = "Plant Anatomy"; break;
- case 'plant_growth_and_development_stage':
- $term_type_formal = "Plant Growth and Development Stage"; break;
- case 'biological_process':
- $term_type_formal = "Biological Process"; break;
- case 'cellular_component':
- $term_type_formal = "Cellular Component"; break;
- case 'molecular_function':
- $term_type_formal = "Molecular Function"; break;
- }
- $terms[] = array(
- 'name'=>$term['name'],
- 'id'=>$term['acc'],
- 'aspect'=>$term_type_formal,
- 'definition'=>$term['definition'],
- 'comment'=>$term['comment']);
- }
- }
- /* output in necessary format */
- if($format == 'json') {
- header('Content-type: application/json');
- echo json_encode(array('term_detail_result'=>$terms));
- }
- else {
- die('Sorry, this request cannot be fulfilled in '.$format.' format.');
- }
- break;
- default:
- die('Sorry, this web service method is not available.');
- }
- /* disconnect from the db */
- @mysql_close($link);
-}
-else { die('Not authorized.'); }
-?>
-
+++ /dev/null
-<?php
-// This file exists to ensure that base classes are preloaded before
-// MonoBook.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
- die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
+++ /dev/null
-<?php
-/**
- * Planteome - Branch of Vector customized to the Planteome Annotation Wiki.
- *
- * @todo document
- * @file
- * @ingroup Skins
- * @version 0.0.1
- * @author Justin Preece (preecej@science.oregonstate.edu)
- * @license CC BY-NC-SA 3.0
-
- */
-
-if( !defined( 'MEDIAWIKI' ) )
- die( -1 );
-
-/**
- * SkinTemplate class for Planteome skin
- * @ingroup Skins
- */
-class SkinPlanteome extends SkinTemplate {
-
- /* Functions */
- var $skinname = 'planteome', $stylename = 'planteome',
- $template = 'PlanteomeTemplate', $useHeadElement = true;
-
- /**
- * Initializes output page and sets up skin-specific parameters
- * @param object $out Output page object to initialize
- */
- public function initPage( OutputPage $out ) {
- global $wgStylePath, $wgJsMimeType, $wgStyleVersion, $wgScriptPath, $wgPlanteomeExtraStyles;
-
- parent::initPage( $out );
-
- // Append skin-specific styles
- $out->addStyle( 'planteome/main-rtl.css', 'screen', '', 'rtl' );
- $out->addStyle( 'planteome/main-ltr.css', 'screen', '', 'ltr' );
- // Append CSS which includes IE only behavior fixes for hover support -
- // this is better than including this in a CSS fille since it doesn't
- // wait for the CSS file to load before fetching the HTC file.
- $out->addScript(
- '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
- $wgStylePath .
- '/planteome/csshover.htc")}</style><![endif]-->'
- );
- // Add extra stylesheets
- // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE.
- if ( is_array( $wgPlanteomeExtraStyles ) ) {
- foreach ( $wgPlanteomeExtraStyles as $style ) {
- $out->addStyle( 'planteome/' . $style, 'screen' );
- }
- }
- }
- /**
- * Builds a structured array of links used for tabs and menus
- * @return array
- * @private
- */
- function buildNavigationUrls() {
- global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath;
- global $wgDisableLangConversion, $wgPlanteomeUseIconWatch;
-
- wfProfileIn( __METHOD__ );
-
- $links = array(
- 'namespaces' => array(),
- 'views' => array(),
- 'actions' => array(),
- 'variants' => array()
- );
-
- // Detects parameters
- $action = $wgRequest->getVal( 'action', 'view' );
- $section = $wgRequest->getVal( 'section' );
-
- // Checks if page is some kind of content
- if( $this->iscontent ) {
-
- // Gets page objects for the related namespaces
- $subjectPage = $this->mTitle->getSubjectPage();
- $talkPage = $this->mTitle->getTalkPage();
-
- // Determines if this is a talk page
- $isTalk = $this->mTitle->isTalkPage();
-
- // Generates XML IDs from namespace names
- $subjectId = $this->mTitle->getNamespaceKey( '' );
-
- if ( $subjectId == 'main' ) {
- $talkId = 'talk';
- } else {
- $talkId = "{$subjectId}_talk";
- }
- $currentId = $isTalk ? $talkId : $subjectId;
-
- // Adds namespace links
- $links['namespaces'][$subjectId] = $this->tabAction(
- $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
- );
- $links['namespaces'][$subjectId]['context'] = 'subject';
- $links['namespaces'][$talkId] = $this->tabAction(
- $talkPage, 'vector-namespace-talk', $isTalk, '', true
- );
- $links['namespaces'][$talkId]['context'] = 'talk';
-
- // Adds view view link
- if ( $this->mTitle->exists() ) {
- $links['views']['view'] = $this->tabAction(
- $isTalk ? $talkPage : $subjectPage,
- 'vector-view-view', ( $action == 'view' ), '', true
- );
- }
-
- wfProfileIn( __METHOD__ . '-edit' );
-
- // Checks if user can...
- if (
- // edit the current page
- $this->mTitle->quickUserCan( 'edit' ) &&
- (
- // if it exists
- $this->mTitle->exists() ||
- // or they can create one here
- $this->mTitle->quickUserCan( 'create' )
- )
- ) {
- // Builds CSS class for talk page links
- $isTalkClass = $isTalk ? ' istalk' : '';
-
- // Determines if we're in edit mode
- $selected = (
- ( $action == 'edit' || $action == 'submit' ) &&
- ( $section != 'new' )
- );
- $links['views']['edit'] = array(
- 'class' => ( $selected ? 'selected' : '' ) . $isTalkClass,
- 'text' => $this->mTitle->exists()
- ? wfMsg( 'vector-view-edit' )
- : wfMsg( 'vector-view-create' ),
- 'href' =>
- $this->mTitle->getLocalUrl( $this->editUrlOptions() )
- );
- // Checks if this is a current rev of talk page and we should show a new
- // section link
- if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) {
- // Checks if we should ever show a new section link
- if ( !$wgOut->forceHideNewSectionLink() ) {
- // Adds new section link
- //$links['actions']['addsection']
- $links['views']['addsection'] = array(
- 'class' => 'collapsible ' . ( $section == 'new' ? 'selected' : false ),
- 'text' => wfMsg( 'vector-action-addsection' ),
- 'href' => $this->mTitle->getLocalUrl(
- 'action=edit§ion=new'
- )
- );
- }
- }
- // Checks if the page is known (some kind of viewable content)
- } elseif ( $this->mTitle->isKnown() ) {
- // Adds view source view link
- $links['views']['viewsource'] = array(
- 'class' => ( $action == 'edit' ) ? 'selected' : false,
- 'text' => wfMsg( 'vector-view-viewsource' ),
- 'href' =>
- $this->mTitle->getLocalUrl( $this->editUrlOptions() )
- );
- }
- wfProfileOut( __METHOD__ . '-edit' );
-
- wfProfileIn( __METHOD__ . '-live' );
-
- // Checks if the page exists
- if ( $this->mTitle->exists() ) {
- // Adds history view link
- $links['views']['history'] = array(
- 'class' => 'collapsible ' . ( ($action == 'history') ? 'selected' : false ),
- 'text' => wfMsg( 'vector-view-history' ),
- 'href' => $this->mTitle->getLocalUrl( 'action=history' ),
- 'rel' => 'archives',
- );
-
- if( $wgUser->isAllowed( 'delete' ) ) {
- $links['actions']['delete'] = array(
- 'class' => ($action == 'delete') ? 'selected' : false,
- 'text' => wfMsg( 'vector-action-delete' ),
- 'href' => $this->mTitle->getLocalUrl( 'action=delete' )
- );
- }
- if ( $this->mTitle->quickUserCan( 'move' ) ) {
- $moveTitle = SpecialPage::getTitleFor(
- 'Movepage', $this->thispage
- );
- $links['actions']['move'] = array(
- 'class' => $this->mTitle->isSpecial( 'Movepage' ) ?
- 'selected' : false,
- 'text' => wfMsg( 'vector-action-move' ),
- 'href' => $moveTitle->getLocalUrl()
- );
- }
-
- if (
- $this->mTitle->getNamespace() !== NS_MEDIAWIKI &&
- $wgUser->isAllowed( 'protect' )
- ) {
- if ( !$this->mTitle->isProtected() ){
- $links['actions']['protect'] = array(
- 'class' => ($action == 'protect') ?
- 'selected' : false,
- 'text' => wfMsg( 'vector-action-protect' ),
- 'href' =>
- $this->mTitle->getLocalUrl( 'action=protect' )
- );
-
- } else {
- $links['actions']['unprotect'] = array(
- 'class' => ($action == 'unprotect') ?
- 'selected' : false,
- 'text' => wfMsg( 'vector-action-unprotect' ),
- 'href' =>
- $this->mTitle->getLocalUrl( 'action=unprotect' )
- );
- }
- }
- } else {
- // article doesn't exist or is deleted
- if (
- $wgUser->isAllowed( 'deletedhistory' ) &&
- $wgUser->isAllowed( 'undelete' )
- ) {
- if( $n = $this->mTitle->isDeleted() ) {
- $undelTitle = SpecialPage::getTitleFor( 'Undelete' );
- $links['actions']['undelete'] = array(
- 'class' => false,
- 'text' => wfMsgExt(
- 'vector-action-undelete',
- array( 'parsemag' ),
- $wgLang->formatNum( $n )
- ),
- 'href' => $undelTitle->getLocalUrl(
- 'target=' . urlencode( $this->thispage )
- )
- );
- }
- }
-
- if (
- $this->mTitle->getNamespace() !== NS_MEDIAWIKI &&
- $wgUser->isAllowed( 'protect' )
- ) {
- if ( !$this->mTitle->getRestrictions( 'create' ) ) {
- $links['actions']['protect'] = array(
- 'class' => ($action == 'protect') ?
- 'selected' : false,
- 'text' => wfMsg( 'vector-action-protect' ),
- 'href' =>
- $this->mTitle->getLocalUrl( 'action=protect' )
- );
-
- } else {
- $links['actions']['unprotect'] = array(
- 'class' => ($action == 'unprotect') ?
- 'selected' : false,
- 'text' => wfMsg( 'vector-action-unprotect' ),
- 'href' =>
- $this->mTitle->getLocalUrl( 'action=unprotect' )
- );
- }
- }
- }
- wfProfileOut( __METHOD__ . '-live' );
- /**
- * The following actions use messages which, if made particular to
- * the Planteome skin, would break the Ajax code which makes this
- * action happen entirely inline. Skin::makeGlobalVariablesScript
- * defines a set of messages in a javascript object - and these
- * messages are assumed to be global for all skins. Without making
- * a change to that procedure these messages will have to remain as
- * the global versions.
- */
- // Checks if the user is logged in
- if ( $this->loggedin ) {
- if ( $wgPlanteomeUseIconWatch ) {
- $class = 'icon ';
- $place = 'views';
- } else {
- $class = '';
- $place = 'actions';
- }
- $mode = $this->mTitle->userIsWatching() ? 'unwatch' : 'watch';
- $links[$place][$mode] = array(
- 'class' => $class . ( ( $action == 'watch' || $action == 'unwatch' ) ? ' selected' : false ),
- 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message
- 'href' => $this->mTitle->getLocalUrl( 'action=' . $mode )
- );
- }
- // This is instead of SkinTemplateTabs - which uses a flat array
- wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
-
- // If it's not content, it's got to be a special page
- } else {
- $links['namespaces']['special'] = array(
- 'class' => 'selected',
- 'text' => wfMsg( 'vector-namespace-special' ),
- 'href' => $wgRequest->getRequestURL()
- );
- }
-
- // Gets list of language variants
- $variants = $wgContLang->getVariants();
- // Checks that language conversion is enabled and variants exist
- if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
- // Gets preferred variant
- $preferred = $wgContLang->getPreferredVariant();
- // Loops over each variant
- foreach( $variants as $code ) {
- // Gets variant name from language code
- $varname = $wgContLang->getVariantname( $code );
- // Checks if the variant is marked as disabled
- if( $varname == 'disable' ) {
- // Skips this variant
- continue;
- }
- // Appends variant link
- $links['variants'][] = array(
- 'class' => ( $code == $preferred ) ? 'selected' : false,
- 'text' => $varname,
- 'href' => $this->mTitle->getLocalURL( '', $code )
- );
- }
- }
-
- wfProfileOut( __METHOD__ );
-
- return $links;
- }
-}
-
-/**
- * QuickTemplate class for Planteome skin
- * @ingroup Skins
- */
-class PlanteomeTemplate extends QuickTemplate {
-
- /* Members */
-
- /**
- * @var Cached skin object
- */
- var $skin;
-
- /* Functions */
-
- /**
- * Outputs the entire contents of the XHTML page
- */
- public function execute() {
- global $wgRequest, $wgOut, $wgContLang;
-
- $this->skin = $this->data['skin'];
- $action = $wgRequest->getText( 'action' );
-
- // Build additional attributes for navigation urls
- $nav = $this->skin->buildNavigationUrls();
- foreach ( $nav as $section => $links ) {
- foreach ( $links as $key => $link ) {
- $xmlID = $key;
- if ( isset( $link['context'] ) && $link['context'] == 'subject' ) {
- $xmlID = 'ca-nstab-' . $xmlID;
- } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
- $xmlID = 'ca-talk';
- } else {
- $xmlID = 'ca-' . $xmlID;
- }
- $nav[$section][$key]['attributes'] =
- ' id="' . Sanitizer::escapeId( $xmlID ) . '"';
- if ( $nav[$section][$key]['class'] ) {
- $nav[$section][$key]['attributes'] .=
- ' class="' . htmlspecialchars( $link['class'] ) . '"';
- unset( $nav[$section][$key]['class'] );
- }
- // We don't want to give the watch tab an accesskey if the page
- // is being edited, because that conflicts with the accesskey on
- // the watch checkbox. We also don't want to give the edit tab
- // an accesskey, because that's fairly superfluous and conflicts
- // with an accesskey (Ctrl-E) often used for editing in Safari.
- if (
- in_array( $action, array( 'edit', 'submit' ) ) &&
- in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
- ) {
- $nav[$section][$key]['key'] =
- $this->skin->tooltip( $xmlID );
- } else {
- $nav[$section][$key]['key'] =
- $this->skin->tooltipAndAccesskey( $xmlID );
- }
- }
- }
- $this->data['namespace_urls'] = $nav['namespaces'];
- $this->data['view_urls'] = $nav['views'];
- $this->data['action_urls'] = $nav['actions'];
- $this->data['variant_urls'] = $nav['variants'];
- // Build additional attributes for personal_urls
- foreach ( $this->data['personal_urls'] as $key => $item) {
- $this->data['personal_urls'][$key]['attributes'] =
- ' id="' . Sanitizer::escapeId( "pt-$key" ) . '"';
- if ( isset( $item['active'] ) && $item['active'] ) {
- $this->data['personal_urls'][$key]['attributes'] .=
- ' class="active"';
- }
- $this->data['personal_urls'][$key]['key'] =
- $this->skin->tooltipAndAccesskey('pt-'.$key);
- }
-
- // Generate additional footer links
- $footerlinks = array(
- 'info' => array(
- 'lastmod',
- 'viewcount',
- 'numberofwatchingusers',
- 'credits',
- 'copyright',
- 'tagline',
- ),
- 'places' => array(
- 'privacy',
- 'about',
- 'disclaimer',
- ),
- );
- // Reduce footer links down to only those which are being used
- $validFooterLinks = array();
- foreach( $footerlinks as $category => $links ) {
- $validFooterLinks[$category] = array();
- foreach( $links as $link ) {
- if( isset( $this->data[$link] ) && $this->data[$link] ) {
- $validFooterLinks[$category][] = $link;
- }
- }
- }
- // Reverse horizontally rendered navigation elements
- if ( $wgContLang->isRTL() ) {
- $this->data['view_urls'] =
- array_reverse( $this->data['view_urls'] );
- $this->data['namespace_urls'] =
- array_reverse( $this->data['namespace_urls'] );
- $this->data['personal_urls'] =
- array_reverse( $this->data['personal_urls'] );
- }
- // Output HTML Page
- $this->html( 'headelement' );
-?>
- <div id="mw-page-base" class="noprint"></div>
- <div id="mw-head-base" class="noprint"></div>
- <!-- content -->
- <div id="content" <?php $this->html('specialpageattributes') ?>>
- <a id="top"></a>
- <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes') ?>></div>
- <?php if ( $this->data['sitenotice'] ): ?>
- <!-- sitenotice -->
- <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
- <!-- /sitenotice -->
- <?php endif; ?>
- <!-- firstHeading -->
- <h1 id="firstHeading" class="firstHeading"><?php $this->html( 'title' ) ?></h1>
- <!-- /firstHeading -->
- <!-- bodyContent -->
- <div id="bodyContent">
- <!-- tagline -->
- <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
- <!-- /tagline -->
- <!-- subtitle -->
- <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
- <!-- /subtitle -->
- <?php if ( $this->data['undelete'] ): ?>
- <!-- undelete -->
- <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
- <!-- /undelete -->
- <?php endif; ?>
- <?php if($this->data['newtalk'] ): ?>
- <!-- newtalk -->
- <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
- <!-- /newtalk -->
- <?php endif; ?>
- <?php if ( $this->data['showjumplinks'] ): ?>
- <!-- jumpto -->
- <div id="jump-to-nav">
- <?php $this->msg( 'jumpto' ) ?> <a href="#mw-head"><?php $this->msg( 'jumptonavigation' ) ?></a>,
- <a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
- </div>
- <!-- /jumpto -->
- <?php endif; ?>
- <!-- bodytext -->
- <?php $this->html( 'bodytext' ) ?>
- <!-- /bodytext -->
- <?php if ( $this->data['catlinks'] ): ?>
- <!-- catlinks -->
- <?php $this->html( 'catlinks' ); ?>
- <!-- /catlinks -->
- <?php endif; ?>
- <?php if ( $this->data['dataAfterContent'] ): ?>
- <!-- dataAfterContent -->
- <?php $this->html( 'dataAfterContent' ); ?>
- <!-- /dataAfterContent -->
- <?php endif; ?>
- <div class="visualClear"></div>
- </div>
- <!-- /bodyContent -->
- </div>
- <!-- /content -->
- <!-- header -->
- <div id="mw-head" class="noprint">
- <?php $this->renderNavigation( 'PERSONAL' ); ?>
- <div id="left-navigation">
- <?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
- </div>
- <div id="right-navigation">
- <?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
- </div>
- </div>
- <!-- /header -->
- <!-- panel -->
- <div id="mw-panel" class="noprint">
- <!-- logo -->
- <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo $this->skin->tooltipAndAccesskey( 'p-logo' ) ?>></a></div>
- <!-- /logo -->
- <?php $this->renderPortals( $this->data['sidebar'] ); ?>
- </div>
- <!-- /panel -->
- <!-- footer -->
- <div id="footer"<?php $this->html('userlangattributes') ?>>
- <?php foreach( $validFooterLinks as $category => $links ): ?>
- <?php if ( count( $links ) > 0 ): ?>
- <ul id="footer-<?php echo $category ?>">
- <?php foreach( $links as $link ): ?>
- <?php if( isset( $this->data[$link] ) && $this->data[$link] ): ?>
- <li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
- <?php endif; ?>
- <?php endforeach; ?>
- </ul>
- <?php endif; ?>
- <?php endforeach; ?>
- <ul id="footer-icons" class="noprint">
- <?php if ( $this->data['poweredbyico'] ): ?>
- <li id="footer-icon-poweredby"><?php $this->html( 'poweredbyico' ) ?></li>
- <?php endif; ?>
- <?php if ( $this->data['copyrightico'] ): ?>
- <li id="footer-icon-copyright"><?php $this->html( 'copyrightico' ) ?></li>
- <?php endif; ?>
- </ul>
- <div style="clear:both"></div>
- </div>
- <!-- /footer -->
- <!-- fixalpha -->
- <script type="<?php $this->text('jsmimetype') ?>"> if ( window.isMSIE55 ) fixalpha(); </script>
- <!-- /fixalpha -->
- <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
- <?php $this->html( 'reporttime' ) ?>
- <?php if ( $this->data['debug'] ): ?>
- <!-- Debug output: <?php $this->text( 'debug' ); ?> -->
- <?php endif; ?>
- </body>
-</html>
-<?php
- }
-
- /**
- * Render a series of portals
- */
- private function renderPortals( $portals ) {
- // Force the rendering of the following portals
- if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true;
- if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true;
- if ( !isset( $portals['LANGUAGES'] ) ) $portals['LANGUAGES'] = true;
- // Render portals
- foreach ( $portals as $name => $content ) {
- echo "\n<!-- {$name} -->\n";
- switch( $name ) {
- case 'SEARCH':
- break;
- case 'TOOLBOX':
-?>
-<div class="portal" id="p-tb">
- <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
- <div class="body">
- <ul>
- <?php if( $this->data['notspecialpage'] ): ?>
- <li id="t-whatlinkshere"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['whatlinkshere']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-whatlinkshere' ) ?>><?php $this->msg( 'whatlinkshere' ) ?></a></li>
- <?php if( $this->data['nav_urls']['recentchangeslinked'] ): ?>
- <li id="t-recentchangeslinked"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['recentchangeslinked']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-recentchangeslinked' ) ?>><?php $this->msg( 'recentchangeslinked-toolbox' ) ?></a></li>
- <?php endif; ?>
- <?php endif; ?>
- <?php if( isset( $this->data['nav_urls']['trackbacklink'] ) ): ?>
- <li id="t-trackbacklink"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['trackbacklink']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-trackbacklink' ) ?>><?php $this->msg( 'trackbacklink' ) ?></a></li>
- <?php endif; ?>
- <?php if( $this->data['feeds']): ?>
- <li id="feedlinks">
- <?php foreach( $this->data['feeds'] as $key => $feed ): ?>
- <a id="<?php echo Sanitizer::escapeId( "feed-$key" ) ?>" href="<?php echo htmlspecialchars( $feed['href'] ) ?>" rel="alternate" type="application/<?php echo $key ?>+xml" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey( 'feed-' . $key ) ?>><?php echo htmlspecialchars( $feed['text'] ) ?></a>
- <?php endforeach; ?>
- </li>
- <?php endif; ?>
- <?php foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?>
- <?php if( $this->data['nav_urls'][$special]): ?>
- <li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars( $this->data['nav_urls'][$special]['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-' . $special ) ?>><?php $this->msg( $special ) ?></a></li>
- <?php endif; ?>
- <?php endforeach; ?>
- <?php if( !empty( $this->data['nav_urls']['print']['href'] ) ): ?>
- <li id="t-print"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['print']['href'] ) ?>" rel="alternate"<?php echo $this->skin->tooltipAndAccesskey( 't-print' ) ?>><?php $this->msg( 'printableversion' ) ?></a></li>
- <?php endif; ?>
- <?php if ( !empty( $this->data['nav_urls']['permalink']['href'] ) ): ?>
- <li id="t-permalink"><a href="<?php echo htmlspecialchars( $this->data['nav_urls']['permalink']['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 't-permalink' ) ?>><?php $this->msg( 'permalink' ) ?></a></li>
- <?php elseif ( $this->data['nav_urls']['permalink']['href'] === '' ): ?>
- <li id="t-ispermalink"<?php echo $this->skin->tooltip( 't-ispermalink' ) ?>><?php $this->msg( 'permalink' ) ?></li>
- <?php endif; ?>
- <?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?>
- </ul>
- </div>
-</div>
-<?php
- break;
- case 'LANGUAGES':
- if ( $this->data['language_urls'] ) {
-?>
-<div class="portal" id="p-lang">
- <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'otherlanguages' ) ?></h5>
- <div class="body">
- <ul>
- <?php foreach ( $this->data['language_urls'] as $langlink ): ?>
- <li class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php echo $langlink['text'] ?></a></li>
- <?php endforeach; ?>
- </ul>
- </div>
-</div>
-<?php
- }
- break;
- default:
-?>
-<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
- <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?></h5>
- <div class="body">
- <?php if ( is_array( $content ) ): ?>
- <ul>
- <?php foreach( $content as $key => $val ): ?>
- <li id="<?php echo Sanitizer::escapeId( $val['id'] ) ?>"<?php if ( $val['active'] ): ?> class="active" <?php endif; ?>><a href="<?php echo htmlspecialchars( $val['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( $val['id'] ) ?>><?php echo htmlspecialchars( $val['text'] ) ?></a></li>
- <?php endforeach; ?>
- </ul>
- <?php else: ?>
- <?php echo $content; /* Allow raw HTML block to be defined by extensions */ ?>
- <?php endif; ?>
- </div>
-</div>
-<?php
- break;
- }
- echo "\n<!-- /{$name} -->\n";
- }
- }
-
- /**
- * Render one or more navigations elements by name, automatically reveresed
- * when UI is in RTL mode
- */
- private function renderNavigation( $elements ) {
- global $wgContLang, $wgPlanteomeUseSimpleSearch, $wgStylePath;
-
- // If only one element was given, wrap it in an array, allowing more
- // flexible arguments
- if ( !is_array( $elements ) ) {
- $elements = array( $elements );
- // If there's a series of elements, reverse them when in RTL mode
- } else if ( $wgContLang->isRTL() ) {
- $elements = array_reverse( $elements );
- }
- // Render elements
- foreach ( $elements as $name => $element ) {
- echo "\n<!-- {$name} -->\n";
- switch ( $element ) {
- case 'NAMESPACES':
-?>
-<div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h5><?php $this->msg('namespaces') ?></h5>
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
- <li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
- <?php endforeach; ?>
- </ul>
-</div>
-<?php
- break;
- case 'VARIANTS':
-?>
-<div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
- <div class="menu">
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
- <?php endforeach; ?>
- </ul>
- </div>
-</div>
-<?php
- break;
- case 'VIEWS':
-?>
-<div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h5><?php $this->msg('views') ?></h5>
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['view_urls'] as $key => $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
- <?php endforeach; ?>
- </ul>
-</div>
-<?php
- break;
- case 'ACTIONS':
-?>
-<div id="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h5><span><?php $this->msg('actions') ?></span><a href="#"></a></h5>
- <div class="menu">
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['action_urls'] as $key => $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
- <?php endforeach; ?>
- </ul>
- </div>
-</div>
-<?php
- break;
- case 'PERSONAL':
-?>
-<div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h5><?php $this->msg('personaltools') ?></h5>
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach($this->data['personal_urls'] as $key => $item): ?>
- <li <?php echo $item['attributes'] ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php echo $item['key'] ?><?php if(!empty($item['class'])): ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php endif; ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
- <?php endforeach; ?>
- </ul>
-</div>
-<?php
- break;
- case 'SEARCH':
-?>
-<div id="p-search">
- <h5<?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
- <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
- <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
- <?php if ( $wgPlanteomeUseSimpleSearch ): ?>
- <div id="simpleSearch">
- <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />
- <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>> </button>
- </div>
- <?php else: ?>
- <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />
- <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg( 'searcharticle' ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
- <input type="submit" name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg( 'searchbutton' ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
- <?php endif; ?>
- </form>
-</div>
-<?php
-
- break;
- }
- echo "\n<!-- /{$name} -->\n";
- }
- }
-}
+++ /dev/null
-#
-# Handy makefile to build the RTL variant with cssjanus
-#
-
-all: main-rtl.css
-
-main-rtl.css: main-ltr.css cssjanus/cssjanus.py
- python cssjanus/cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css
-
-# SVN version is broken; checking in our own.
-#cssjanus/cssjanus.py:
-# svn co http://cssjanus.googlecode.com/svn/trunk cssjanus
-
-#distclean: clean
-# rm -rf cssjanus
-
-clean:
- rm -f main-rtl.css
+++ /dev/null
-<public:attach event="ondocumentready" onevent="CSSHover()" />
-<script>
-// <?)|(a([^#.][^ ]+)+)):(hover|active|focus))/i,
- REG_AFFECTED = /(.*?)\:(hover|active|focus)/i,
- REG_PSEUDO = /[^:]+:([a-z-]+).*/i,
- REG_SELECT = /(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi,
- REG_CLASS = /\.([a-z0-9_-]*on(hover|active|focus))/i,
- REG_MSIE = /msie (5|6|7)/i,
- REG_COMPAT = /backcompat/i;
-
- // css prefix, a leading dash would be nice (spec), but IE6 doesn't like that.
- var CSSHOVER_PREFIX = 'csh-';
-
- /**
- * Local CSSHover object
- * --------------------------
- */
-
- var CSSHover = {
-
- // array of CSSHoverElements, used to unload created events
- elements: [],
-
- // buffer used for checking on duplicate expressions
- callbacks: {},
-
- // init, called once ondomcontentready via the exposed window.CSSHover function
- init:function() {
- // don't run in IE8 standards; expressions don't work in standards mode anyway,
- // and the stuff we're trying to fix should already work properly
- if(!REG_MSIE.test(navigator.userAgent) && !REG_COMPAT.test(window.document.compatMode)) return;
-
- // start parsing the existing stylesheets
- var sheets = window.document.styleSheets, l = sheets.length;
- for(var i=0; i<l; i++) {
- this.parseStylesheet(sheets[i]);
- }
- },
-
- // called from init, parses individual stylesheets
- parseStylesheet:function(sheet) {
- // check sheet imports and parse those recursively
- if(sheet.imports) {
- try {
- var imports = sheet.imports, l = imports.length;
- for(var i=0; i<l; i++) {
- this.parseStylesheet(sheet.imports[i]);
- }
- } catch(securityException){
- // trycatch for various possible errors,
- // todo; might need to be placed inside the for loop, since an error
- // on an import stops following imports from being processed.
- }
- }
-
- // interate the sheet's rules and send them to the parser
- try {
- var rules = sheet.rules, l = rules.length;
- for(var j=0; j<l; j++) {
- this.parseCSSRule(rules[j], sheet);
- }
- } catch(securityException){
- // trycatch for various errors, most likely accessing the sheet's rules,
- // don't see how individual rules would throw errors, but you never know.
- }
- },
-
- // magic starts here ...
- parseCSSRule:function(rule, sheet) {
-
- // The sheet is used to insert new rules into, this must be the same sheet the rule
- // came from, to ensure that relative paths keep pointing to the right location.
-
- // only parse a rule if it contains an interactive pseudo.
- var select = rule.selectorText;
- if(REG_INTERACTIVE.test(select)) {
- var style = rule.style.cssText,
-
- // affected elements are found by truncating the selector after the interactive pseudo,
- // eg: "div li:hover" >> "div li"
- affected = REG_AFFECTED.exec(select)[1],
-
- // that pseudo is needed for a classname, and defines the type of interaction (focus, hover, active)
- // eg: "li:hover" >> "onhover"
- pseudo = select.replace(REG_PSEUDO, 'on$1'),
-
- // the new selector is going to use that classname in a new css rule,
- // since IE6 doesn't support multiple classnames, this is merged into one classname
- // eg: "li:hover" >> "li.onhover", "li.folder:hover" >> "li.folderonhover"
- newSelect = select.replace(REG_SELECT, '.$2' + pseudo),
-
- // the classname is needed for the events that are going to be set on affected nodes
- // eg: "li.folder:hover" >> "folderonhover"
- className = REG_CLASS.exec(newSelect)[1];
-
- // no need to set the same callback more than once when the same selector uses the same classname
- var hash = affected + className;
- if(!this.callbacks[hash]) {
-
- // affected elements are given an expression under a fake css property, the classname is used
- // because a unique name (eg "behavior:") would be overruled (in IE6, not 7) by a following rule
- // selecting the same element. The expression does a callback to CSSHover.patch, rerouted via the
- // exposed window.CSSHover function.
-
- // because the expression is added to the stylesheet, and styles are always applied to html that is
- // dynamically added to the dom, the expression will also trigger for those new elements (provided
- // they are selected by the affected selector).
-
- sheet.addRule(affected, CSSHOVER_PREFIX + className + ':expression(CSSHover(this, "'+pseudo+'", "'+className+'"))');
-
- // hash it, so an identical selector/class combo does not duplicate the expression
- this.callbacks[hash] = true;
- }
-
- // duplicate expressions need not be set, but the style could differ
- sheet.addRule(newSelect, style);
- }
- },
-
- // called via the expression, patches individual nodes
- patch:function(node, type, className) {
-
- // the patch's type is returned to the expression. That way the expression property
- // can be found and removed, to stop it from calling patch over and over.
- // The if will fail the first time, since the expression has not yet received a value.
- var property = CSSHOVER_PREFIX + className;
- if(node.style[property]) {
- node.style[property] = null;
- }
-
- // just to make sure, also keep track of patched classnames locally on the node
- if(!node.csshover) node.csshover = [];
-
- // and check for it to prevent duplicate events with the same classname from being set
- if(!node.csshover[className]) {
- node.csshover[className] = true;
-
- // create an instance for the given type and class
- var element = new CSSHoverElement(node, type, className);
-
- // and store that instance for unloading later on
- this.elements.push(element);
- }
-
- // returns a dummy value to the expression
- return type;
- },
-
- // unload stuff onbeforeunload
- unload:function() {
- try {
-
- // remove events
- var l = this.elements.length;
- for(var i=0; i<l; i++) {
- this.elements[i].unload();
- }
-
- // and set properties to null
- this.elements = [];
- this.callbacks = {};
-
- } catch (e) {
- }
- }
- };
-
- // add the unload to the onbeforeunload event
- window.attachEvent('onbeforeunload', function(){
- CSSHover.unload();
- });
-
- /**
- * CSSHoverElement
- * --------------------------
- */
-
- // the event types associated with the interactive pseudos
- var CSSEvents = {
- onhover: { activator: 'onmouseenter', deactivator: 'onmouseleave' },
- onactive: { activator: 'onmousedown', deactivator: 'onmouseup' },
- onfocus: { activator: 'onfocus', deactivator: 'onblur' }
- };
-
- // CSSHoverElement constructor, called via CSSHover.patch
- function CSSHoverElement(node, type, className) {
-
- // the CSSHoverElement patches individual nodes by manually applying the events that should
- // have fired by the css pseudoclasses, eg mouseenter and mouseleave for :hover.
-
- this.node = node;
- this.type = type;
- var replacer = new RegExp('(^|\\s)'+className+'(\\s|$)', 'g');
-
- // store event handlers for removal onunload
- this.activator = function(){ node.className += ' ' + className; };
- this.deactivator = function(){ node.className = node.className.replace(replacer, ' '); };
-
- // add the events
- node.attachEvent(CSSEvents[type].activator, this.activator);
- node.attachEvent(CSSEvents[type].deactivator, this.deactivator);
- }
-
- CSSHoverElement.prototype = {
- // onbeforeunload, called via CSSHover.unload
- unload:function() {
-
- // remove events
- this.node.detachEvent(CSSEvents[this.type].activator, this.activator);
- this.node.detachEvent(CSSEvents[this.type].deactivator, this.deactivator);
-
- // and set properties to null
- this.activator = null;
- this.deactivator = null;
- this.node = null;
- this.type = null;
- }
- };
-
- /**
- * Public hook
- * --------------------------
- */
-
- return function(node, type, className) {
- if(node) {
- // called via the css expression; patches individual nodes
- return CSSHover.patch(node, type, className);
- } else {
- // called ondomcontentready via the public:attach node
- CSSHover.init();
- }
- };
-
-})();
-
-// ]]>
-</script>
\ No newline at end of file
+++ /dev/null
- Copyright 2008 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+++ /dev/null
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+++ /dev/null
-=CSSJanus=
-
-_Flips CSS from LTR to an RTL orienation and vice-versa_
-
-Author: `Lindsey Simon <elsigh@google.com>`
-
-==Introduction==
-
-CSSJanus is CSS parser utility designed to aid the conversion of a website's
-layout from left-to-right(LTR) to right-to-left(RTL). The script was born out of
-a need to convert CSS for RTL languages when tables are not being used for layout (since tables will automatically reorder TD's in RTL).
-CSSJanus will change most of the obvious CSS property names and their values as
-well as some not-so-obvious ones (cursor, background-position %, etc...).
-The script is designed to offer flexibility to account for cases when you do
-not want to change certain rules which exist to account for bidirectional text
-display bugs, as well as situations where you may or may not want to flip annotations inside of the background url string.
-Note that you can disable CSSJanus from running on an entire class or any
-rule within a class by prepending a /* @noflip */ comment before the rule(s)
-you want CSSJanus to ignore.
-
-CSSJanus itself is not always enough to make a website that works in a LTR
-language context work in a RTL language all the way, but it is a start.
-
-==Getting the code==
-
-View the trunk at:
-
- http://cssjanus.googlecode.com/svn/trunk/
-
-Check out the latest development version anonymously with:
-
-{{{
- $ svn checkout http://cssjanus.googlecode.com/svn/trunk/ cssjanus
-}}}
-
-==Using==
-
-Usage:
- ./cssjanus.py < file.css > file-rtl.css
-Flags:
- --swap_left_right_in_url: Fixes "left"/"right" string within urls.
- Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css
- --swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.
- Ex: ./cssjanus.py --swap_ltr_rtl_in_url < file.css > file_rtl.css
-
-If you'd like to make use of the webapp version of cssjanus, you'll need to
-download the Google App Engine SDK
- http://code.google.com/appengine/downloads.html
-and also drop a "django" directory into this directory, with the latest svn
-from django. You should be good to go with that setup. Please let me know
-otherwise.
-
-==Bugs, Patches==
-
-Patches and bug reports are welcome, just please keep the style
-consistent with the original source. If you find a bug, please include a diff
-of cssjanus_test.py with the bug included as a new unit test which fails. It
-will make understanding and fixing the bug easier.
-
-==Todo==
-
-* Include some helpers for some typical bidi text solutions?
-* Aural CSS (azimuth) swapping?
-
-==Contributors==
-
-Additional thanks to Mike Samuel for his work on csslex.py, Andy Perelson for
-his help coding and reviewing, Stephen Zabel for his help with i18n and my sanity,
-and to Eric Meyer for his thoughtful input.
-Thanks to Junyu Wang for the Chinese translation.
-Thanks to Masashi Kawashima for the Japanese translation.
-Thanks to Taaryk Taar and Tariq Al-Omaireeni for an updated Arabic translation.
-Thanks to Jens Meiert for the German translation.
-
-==License==
-
-{{{
- Copyright 2008 Google Inc. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the 'License');
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an 'AS IS' BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-}}}
+++ /dev/null
-#!/usr/bin/python
-#
-# Copyright 2008 Google Inc. All Rights Reserved.
-
-"""Converts a LeftToRight Cascading Style Sheet into a RightToLeft one.
-
- This is a utility script for replacing "left" oriented things in a CSS file
- like float, padding, margin with "right" oriented values.
- It also does the opposite.
- The goal is to be able to conditionally serve one large, cat'd, compiled CSS
- file appropriate for LeftToRight oriented languages and RightToLeft ones.
- This utility will hopefully help your structural layout done in CSS in
- terms of its RTL compatibility. It will not help with some of the more
- complicated bidirectional text issues.
-"""
-
-__author__ = 'elsigh@google.com (Lindsey Simon)'
-__version__ = '0.1'
-
-import logging
-import re
-import sys
-import getopt
-import os
-
-import csslex
-
-logging.getLogger().setLevel(logging.INFO)
-
-# Global for the command line flags.
-SWAP_LTR_RTL_IN_URL_DEFAULT = False
-SWAP_LEFT_RIGHT_IN_URL_DEFAULT = False
-FLAGS = {'swap_ltr_rtl_in_url': SWAP_LTR_RTL_IN_URL_DEFAULT,
- 'swap_left_right_in_url': SWAP_LEFT_RIGHT_IN_URL_DEFAULT}
-
-# Generic token delimiter character.
-TOKEN_DELIMITER = '~'
-
-# This is a temporary match token we use when swapping strings.
-TMP_TOKEN = '%sTMP%s' % (TOKEN_DELIMITER, TOKEN_DELIMITER)
-
-# Token to be used for joining lines.
-TOKEN_LINES = '%sJ%s' % (TOKEN_DELIMITER, TOKEN_DELIMITER)
-
-# Global constant text strings for CSS value matches.
-LTR = 'ltr'
-RTL = 'rtl'
-LEFT = 'left'
-RIGHT = 'right'
-
-# This is a lookbehind match to ensure that we don't replace instances
-# of our string token (left, rtl, etc...) if there's a letter in front of it.
-# Specifically, this prevents replacements like 'background: url(bright.png)'.
-LOOKBEHIND_NOT_LETTER = r'(?<![a-zA-Z])'
-
-# This is a lookahead match to make sure we don't replace left and right
-# in actual classnames, so that we don't break the HTML/CSS dependencies.
-# Read literally, it says ignore cases where the word left, for instance, is
-# directly followed by valid classname characters and a curly brace.
-# ex: .column-left {float: left} will become .column-left {float: right}
-LOOKAHEAD_NOT_OPEN_BRACE = (r'(?!(?:%s|%s|%s|#|\:|\.|\,|\+|>)*?{)' %
- (csslex.NMCHAR, TOKEN_LINES, csslex.SPACE))
-
-
-# These two lookaheads are to test whether or not we are within a
-# background: url(HERE) situation.
-# Ref: http://www.w3.org/TR/CSS21/syndata.html#uri
-VALID_AFTER_URI_CHARS = r'[\'\"]?%s' % csslex.WHITESPACE
-LOOKAHEAD_NOT_CLOSING_PAREN = r'(?!%s?%s\))' % (csslex.URL_CHARS,
- VALID_AFTER_URI_CHARS)
-LOOKAHEAD_FOR_CLOSING_PAREN = r'(?=%s?%s\))' % (csslex.URL_CHARS,
- VALID_AFTER_URI_CHARS)
-
-# Compile a regex to swap left and right values in 4 part notations.
-# We need to match negatives and decimal numeric values.
-# ex. 'margin: .25em -2px 3px 0' becomes 'margin: .25em 0 3px -2px'.
-POSSIBLY_NEGATIVE_QUANTITY = r'((?:-?%s)|(?:inherit|auto))' % csslex.QUANTITY
-POSSIBLY_NEGATIVE_QUANTITY_SPACE = r'%s%s%s' % (POSSIBLY_NEGATIVE_QUANTITY,
- csslex.SPACE,
- csslex.WHITESPACE)
-FOUR_NOTATION_QUANTITY_RE = re.compile(r'%s%s%s%s' %
- (POSSIBLY_NEGATIVE_QUANTITY_SPACE,
- POSSIBLY_NEGATIVE_QUANTITY_SPACE,
- POSSIBLY_NEGATIVE_QUANTITY_SPACE,
- POSSIBLY_NEGATIVE_QUANTITY),
- re.I)
-COLOR = r'(%s|%s)' % (csslex.NAME, csslex.HASH)
-COLOR_SPACE = r'%s%s' % (COLOR, csslex.SPACE)
-FOUR_NOTATION_COLOR_RE = re.compile(r'(-color%s:%s)%s%s%s(%s)' %
- (csslex.WHITESPACE,
- csslex.WHITESPACE,
- COLOR_SPACE,
- COLOR_SPACE,
- COLOR_SPACE,
- COLOR),
- re.I)
-
-# Compile the cursor resize regexes
-CURSOR_EAST_RE = re.compile(LOOKBEHIND_NOT_LETTER + '([ns]?)e-resize')
-CURSOR_WEST_RE = re.compile(LOOKBEHIND_NOT_LETTER + '([ns]?)w-resize')
-
-# Matches the condition where we need to replace the horizontal component
-# of a background-position value when expressed in horizontal percentage.
-# Had to make two regexes because in the case of position-x there is only
-# one quantity, and otherwise we don't want to match and change cases with only
-# one quantity.
-BG_HORIZONTAL_PERCENTAGE_RE = re.compile(r'background(-position)?(%s:%s)'
- '([^%%]*?)(%s)%%'
- '(%s(?:%s|%s))' % (csslex.WHITESPACE,
- csslex.WHITESPACE,
- csslex.NUM,
- csslex.WHITESPACE,
- csslex.QUANTITY,
- csslex.IDENT))
-
-BG_HORIZONTAL_PERCENTAGE_X_RE = re.compile(r'background-position-x(%s:%s)'
- '(%s)%%' % (csslex.WHITESPACE,
- csslex.WHITESPACE,
- csslex.NUM))
-
-# Matches the opening of a body selector.
-BODY_SELECTOR = r'body%s{%s' % (csslex.WHITESPACE, csslex.WHITESPACE)
-
-# Matches anything up until the closing of a selector.
-CHARS_WITHIN_SELECTOR = r'[^\}]*?'
-
-# Matches the direction property in a selector.
-DIRECTION_RE = r'direction%s:%s' % (csslex.WHITESPACE, csslex.WHITESPACE)
-
-# These allow us to swap "ltr" with "rtl" and vice versa ONLY within the
-# body selector and on the same line.
-BODY_DIRECTION_LTR_RE = re.compile(r'(%s)(%s)(%s)(ltr)' %
- (BODY_SELECTOR, CHARS_WITHIN_SELECTOR,
- DIRECTION_RE),
- re.I)
-BODY_DIRECTION_RTL_RE = re.compile(r'(%s)(%s)(%s)(rtl)' %
- (BODY_SELECTOR, CHARS_WITHIN_SELECTOR,
- DIRECTION_RE),
- re.I)
-
-
-# Allows us to swap "direction:ltr" with "direction:rtl" and
-# vice versa anywhere in a line.
-DIRECTION_LTR_RE = re.compile(r'%s(ltr)' % DIRECTION_RE)
-DIRECTION_RTL_RE = re.compile(r'%s(rtl)' % DIRECTION_RE)
-
-# We want to be able to switch left with right and vice versa anywhere
-# we encounter left/right strings, EXCEPT inside the background:url(). The next
-# two regexes are for that purpose. We have alternate IN_URL versions of the
-# regexes compiled in case the user passes the flag that they do
-# actually want to have left and right swapped inside of background:urls.
-LEFT_RE = re.compile('%s(%s)%s%s' % (LOOKBEHIND_NOT_LETTER,
- LEFT,
- LOOKAHEAD_NOT_CLOSING_PAREN,
- LOOKAHEAD_NOT_OPEN_BRACE),
- re.I)
-RIGHT_RE = re.compile('%s(%s)%s%s' % (LOOKBEHIND_NOT_LETTER,
- RIGHT,
- LOOKAHEAD_NOT_CLOSING_PAREN,
- LOOKAHEAD_NOT_OPEN_BRACE),
- re.I)
-LEFT_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
- LEFT,
- LOOKAHEAD_FOR_CLOSING_PAREN),
- re.I)
-RIGHT_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
- RIGHT,
- LOOKAHEAD_FOR_CLOSING_PAREN),
- re.I)
-LTR_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
- LTR,
- LOOKAHEAD_FOR_CLOSING_PAREN),
- re.I)
-RTL_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER,
- RTL,
- LOOKAHEAD_FOR_CLOSING_PAREN),
- re.I)
-
-COMMENT_RE = re.compile('(%s)' % csslex.COMMENT, re.I)
-
-NOFLIP_TOKEN = r'\@noflip'
-# The NOFLIP_TOKEN inside of a comment. For now, this requires that comments
-# be in the input, which means users of a css compiler would have to run
-# this script first if they want this functionality.
-NOFLIP_ANNOTATION = r'/\*%s%s%s\*/' % (csslex.WHITESPACE,
- NOFLIP_TOKEN,
- csslex. WHITESPACE)
-
-# After a NOFLIP_ANNOTATION, and within a class selector, we want to be able
-# to set aside a single rule not to be flipped. We can do this by matching
-# our NOFLIP annotation and then using a lookahead to make sure there is not
-# an opening brace before the match.
-NOFLIP_SINGLE_RE = re.compile(r'(%s%s[^;}]+;?)' % (NOFLIP_ANNOTATION,
- LOOKAHEAD_NOT_OPEN_BRACE),
- re.I)
-
-# After a NOFLIP_ANNOTATION, we want to grab anything up until the next } which
-# means the entire following class block. This will prevent all of its
-# declarations from being flipped.
-NOFLIP_CLASS_RE = re.compile(r'(%s%s})' % (NOFLIP_ANNOTATION,
- CHARS_WITHIN_SELECTOR),
- re.I)
-
-
-class Tokenizer:
- """Replaces any CSS comments with string tokens and vice versa."""
-
- def __init__(self, token_re, token_string):
- """Constructor for the Tokenizer.
-
- Args:
- token_re: A regex for the string to be replace by a token.
- token_string: The string to put between token delimiters when tokenizing.
- """
- logging.debug('Tokenizer::init token_string=%s' % token_string)
- self.token_re = token_re
- self.token_string = token_string
- self.originals = []
-
- def Tokenize(self, line):
- """Replaces any string matching token_re in line with string tokens.
-
- By passing a function as an argument to the re.sub line below, we bypass
- the usual rule where re.sub will only replace the left-most occurrence of
- a match by calling the passed in function for each occurrence.
-
- Args:
- line: A line to replace token_re matches in.
-
- Returns:
- line: A line with token_re matches tokenized.
- """
- line = self.token_re.sub(self.TokenizeMatches, line)
- logging.debug('Tokenizer::Tokenize returns: %s' % line)
- return line
-
- def DeTokenize(self, line):
- """Replaces tokens with the original string.
-
- Args:
- line: A line with tokens.
-
- Returns:
- line with any tokens replaced by the original string.
- """
-
- # Put all of the comments back in by their comment token.
- for i, original in enumerate(self.originals):
- token = '%s%s_%s%s' % (TOKEN_DELIMITER, self.token_string, i + 1,
- TOKEN_DELIMITER)
- line = line.replace(token, original)
- logging.debug('Tokenizer::DeTokenize i:%s w/%s' % (i, token))
- logging.debug('Tokenizer::DeTokenize returns: %s' % line)
- return line
-
- def TokenizeMatches(self, m):
- """Replaces matches with tokens and stores the originals.
-
- Args:
- m: A match object.
-
- Returns:
- A string token which replaces the CSS comment.
- """
- logging.debug('Tokenizer::TokenizeMatches %s' % m.group(1))
- self.originals.append(m.group(1))
- return '%s%s_%s%s' % (TOKEN_DELIMITER,
- self.token_string,
- len(self.originals),
- TOKEN_DELIMITER)
-
-
-def FixBodyDirectionLtrAndRtl(line):
- """Replaces ltr with rtl and vice versa ONLY in the body direction.
-
- Args:
- line: A string to replace instances of ltr with rtl.
- Returns:
- line with direction: ltr and direction: rtl swapped only in body selector.
- line = FixBodyDirectionLtrAndRtl('body { direction:ltr }')
- line will now be 'body { direction:rtl }'.
- """
-
- line = BODY_DIRECTION_LTR_RE.sub('\\1\\2\\3%s' % TMP_TOKEN, line)
- line = BODY_DIRECTION_RTL_RE.sub('\\1\\2\\3%s' % LTR, line)
- line = line.replace(TMP_TOKEN, RTL)
- logging.debug('FixBodyDirectionLtrAndRtl returns: %s' % line)
- return line
-
-
-def FixLeftAndRight(line):
- """Replaces left with right and vice versa in line.
-
- Args:
- line: A string in which to perform the replacement.
-
- Returns:
- line with left and right swapped. For example:
- line = FixLeftAndRight('padding-left: 2px; margin-right: 1px;')
- line will now be 'padding-right: 2px; margin-left: 1px;'.
- """
-
- line = LEFT_RE.sub(TMP_TOKEN, line)
- line = RIGHT_RE.sub(LEFT, line)
- line = line.replace(TMP_TOKEN, RIGHT)
- logging.debug('FixLeftAndRight returns: %s' % line)
- return line
-
-
-def FixLeftAndRightInUrl(line):
- """Replaces left with right and vice versa ONLY within background urls.
-
- Args:
- line: A string in which to replace left with right and vice versa.
-
- Returns:
- line with left and right swapped in the url string. For example:
- line = FixLeftAndRightInUrl('background:url(right.png)')
- line will now be 'background:url(left.png)'.
- """
-
- line = LEFT_IN_URL_RE.sub(TMP_TOKEN, line)
- line = RIGHT_IN_URL_RE.sub(LEFT, line)
- line = line.replace(TMP_TOKEN, RIGHT)
- logging.debug('FixLeftAndRightInUrl returns: %s' % line)
- return line
-
-
-def FixLtrAndRtlInUrl(line):
- """Replaces ltr with rtl and vice versa ONLY within background urls.
-
- Args:
- line: A string in which to replace ltr with rtl and vice versa.
-
- Returns:
- line with left and right swapped. For example:
- line = FixLtrAndRtlInUrl('background:url(rtl.png)')
- line will now be 'background:url(ltr.png)'.
- """
-
- line = LTR_IN_URL_RE.sub(TMP_TOKEN, line)
- line = RTL_IN_URL_RE.sub(LTR, line)
- line = line.replace(TMP_TOKEN, RTL)
- logging.debug('FixLtrAndRtlInUrl returns: %s' % line)
- return line
-
-
-def FixCursorProperties(line):
- """Fixes directional CSS cursor properties.
-
- Args:
- line: A string to fix CSS cursor properties in.
-
- Returns:
- line reformatted with the cursor properties substituted. For example:
- line = FixCursorProperties('cursor: ne-resize')
- line will now be 'cursor: nw-resize'.
- """
-
- line = CURSOR_EAST_RE.sub('\\1' + TMP_TOKEN, line)
- line = CURSOR_WEST_RE.sub('\\1e-resize', line)
- line = line.replace(TMP_TOKEN, 'w-resize')
- logging.debug('FixCursorProperties returns: %s' % line)
- return line
-
-
-def FixFourPartNotation(line):
- """Fixes the second and fourth positions in 4 part CSS notation.
-
- Args:
- line: A string to fix 4 part CSS notation in.
-
- Returns:
- line reformatted with the 4 part notations swapped. For example:
- line = FixFourPartNotation('padding: 1px 2px 3px 4px')
- line will now be 'padding: 1px 4px 3px 2px'.
- """
- line = FOUR_NOTATION_QUANTITY_RE.sub('\\1 \\4 \\3 \\2', line)
- line = FOUR_NOTATION_COLOR_RE.sub('\\1\\2 \\5 \\4 \\3', line)
- logging.debug('FixFourPartNotation returns: %s' % line)
- return line
-
-
-def FixBackgroundPosition(line):
- """Fixes horizontal background percentage values in line.
-
- Args:
- line: A string to fix horizontal background position values in.
-
- Returns:
- line reformatted with the 4 part notations swapped.
- """
- line = BG_HORIZONTAL_PERCENTAGE_RE.sub(CalculateNewBackgroundPosition, line)
- line = BG_HORIZONTAL_PERCENTAGE_X_RE.sub(CalculateNewBackgroundPositionX,
- line)
- logging.debug('FixBackgroundPosition returns: %s' % line)
- return line
-
-
-def CalculateNewBackgroundPosition(m):
- """Fixes horizontal background-position percentages.
-
- This function should be used as an argument to re.sub since it needs to
- perform replacement specific calculations.
-
- Args:
- m: A match object.
-
- Returns:
- A string with the horizontal background position percentage fixed.
- BG_HORIZONTAL_PERCENTAGE_RE.sub(FixBackgroundPosition,
- 'background-position: 75% 50%')
- will return 'background-position: 25% 50%'.
- """
-
- # The flipped value is the offset from 100%
- new_x = str(100-int(m.group(4)))
-
- # Since m.group(1) may very well be None type and we need a string..
- if m.group(1):
- position_string = m.group(1)
- else:
- position_string = ''
-
- return 'background%s%s%s%s%%%s' % (position_string, m.group(2), m.group(3),
- new_x, m.group(5))
-
-
-def CalculateNewBackgroundPositionX(m):
- """Fixes percent based background-position-x.
-
- This function should be used as an argument to re.sub since it needs to
- perform replacement specific calculations.
-
- Args:
- m: A match object.
-
- Returns:
- A string with the background-position-x percentage fixed.
- BG_HORIZONTAL_PERCENTAGE_X_RE.sub(CalculateNewBackgroundPosition,
- 'background-position-x: 75%')
- will return 'background-position-x: 25%'.
- """
-
- # The flipped value is the offset from 100%
- new_x = str(100-int(m.group(2)))
-
- return 'background-position-x%s%s%%' % (m.group(1), new_x)
-
-
-def ChangeLeftToRightToLeft(lines,
- swap_ltr_rtl_in_url=None,
- swap_left_right_in_url=None):
- """Turns lines into a stream and runs the fixing functions against it.
-
- Args:
- lines: An list of CSS lines.
- swap_ltr_rtl_in_url: Overrides this flag if param is set.
- swap_left_right_in_url: Overrides this flag if param is set.
-
- Returns:
- The same lines, but with left and right fixes.
- """
-
- global FLAGS
-
- # Possibly override flags with params.
- logging.debug('ChangeLeftToRightToLeft swap_ltr_rtl_in_url=%s, '
- 'swap_left_right_in_url=%s' % (swap_ltr_rtl_in_url,
- swap_left_right_in_url))
- if swap_ltr_rtl_in_url is None:
- swap_ltr_rtl_in_url = FLAGS['swap_ltr_rtl_in_url']
- if swap_left_right_in_url is None:
- swap_left_right_in_url = FLAGS['swap_left_right_in_url']
-
- # Turns the array of lines into a single line stream.
- logging.debug('LINES COUNT: %s' % len(lines))
- line = TOKEN_LINES.join(lines)
-
- # Tokenize any single line rules with the /* noflip */ annotation.
- noflip_single_tokenizer = Tokenizer(NOFLIP_SINGLE_RE, 'NOFLIP_SINGLE')
- line = noflip_single_tokenizer.Tokenize(line)
-
- # Tokenize any class rules with the /* noflip */ annotation.
- noflip_class_tokenizer = Tokenizer(NOFLIP_CLASS_RE, 'NOFLIP_CLASS')
- line = noflip_class_tokenizer.Tokenize(line)
-
- # Tokenize the comments so we can preserve them through the changes.
- comment_tokenizer = Tokenizer(COMMENT_RE, 'C')
- line = comment_tokenizer.Tokenize(line)
-
- # Here starteth the various left/right orientation fixes.
- line = FixBodyDirectionLtrAndRtl(line)
-
- if swap_left_right_in_url:
- line = FixLeftAndRightInUrl(line)
-
- if swap_ltr_rtl_in_url:
- line = FixLtrAndRtlInUrl(line)
-
- line = FixLeftAndRight(line)
- line = FixCursorProperties(line)
- line = FixFourPartNotation(line)
- line = FixBackgroundPosition(line)
-
- # DeTokenize the single line noflips.
- line = noflip_single_tokenizer.DeTokenize(line)
-
- # DeTokenize the class-level noflips.
- line = noflip_class_tokenizer.DeTokenize(line)
-
- # DeTokenize the comments.
- line = comment_tokenizer.DeTokenize(line)
-
- # Rejoin the lines back together.
- lines = line.split(TOKEN_LINES)
-
- return lines
-
-def usage():
- """Prints out usage information."""
-
- print 'Usage:'
- print ' ./cssjanus.py < file.css > file-rtl.css'
- print 'Flags:'
- print ' --swap_left_right_in_url: Fixes "left"/"right" string within urls.'
- print ' Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css'
- print ' --swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.'
- print ' Ex: ./cssjanus --swap_ltr_rtl_in_url < file.css > file_rtl.css'
-
-def setflags(opts):
- """Parse the passed in command line arguments and set the FLAGS global.
-
- Args:
- opts: getopt iterable intercepted from argv.
- """
-
- global FLAGS
-
- # Parse the arguments.
- for opt, arg in opts:
- logging.debug('opt: %s, arg: %s' % (opt, arg))
- if opt in ("-h", "--help"):
- usage()
- sys.exit()
- elif opt in ("-d", "--debug"):
- logging.getLogger().setLevel(logging.DEBUG)
- elif opt == '--swap_ltr_rtl_in_url':
- FLAGS['swap_ltr_rtl_in_url'] = True
- elif opt == '--swap_left_right_in_url':
- FLAGS['swap_left_right_in_url'] = True
-
-
-def main(argv):
- """Sends stdin lines to ChangeLeftToRightToLeft and writes to stdout."""
-
- # Define the flags.
- try:
- opts, args = getopt.getopt(argv, 'hd', ['help', 'debug',
- 'swap_left_right_in_url',
- 'swap_ltr_rtl_in_url'])
- except getopt.GetoptError:
- usage()
- sys.exit(2)
-
- # Parse and set the flags.
- setflags(opts)
-
- # Call the main routine with all our functionality.
- fixed_lines = ChangeLeftToRightToLeft(sys.stdin.readlines())
- sys.stdout.write(''.join(fixed_lines))
-
-if __name__ == '__main__':
- main(sys.argv[1:])
+++ /dev/null
-#!/usr/bin/python
-#
-# Copyright 2007 Google Inc. All Rights Reserved.
-
-"""CSS Lexical Grammar rules.
-
-CSS lexical grammar from http://www.w3.org/TR/CSS21/grammar.html
-"""
-
-__author__ = ['elsigh@google.com (Lindsey Simon)',
- 'msamuel@google.com (Mike Samuel)']
-
-# public symbols
-__all__ = [ "NEWLINE", "HEX", "NON_ASCII", "UNICODE", "ESCAPE", "NMSTART", "NMCHAR", "STRING1", "STRING2", "IDENT", "NAME", "HASH", "NUM", "STRING", "URL", "SPACE", "WHITESPACE", "COMMENT", "QUANTITY", "PUNC" ]
-
-# The comments below are mostly copied verbatim from the grammar.
-
-# "@import" {return IMPORT_SYM;}
-# "@page" {return PAGE_SYM;}
-# "@media" {return MEDIA_SYM;}
-# "@charset" {return CHARSET_SYM;}
-KEYWORD = r'(?:\@(?:import|page|media|charset))'
-
-# nl \n|\r\n|\r|\f ; a newline
-NEWLINE = r'\n|\r\n|\r|\f'
-
-# h [0-9a-f] ; a hexadecimal digit
-HEX = r'[0-9a-f]'
-
-# nonascii [\200-\377]
-NON_ASCII = r'[\200-\377]'
-
-# unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
-UNICODE = r'(?:(?:\\' + HEX + r'{1,6})(?:\r\n|[ \t\r\n\f])?)'
-
-# escape {unicode}|\\[^\r\n\f0-9a-f]
-ESCAPE = r'(?:' + UNICODE + r'|\\[^\r\n\f0-9a-f])'
-
-# nmstart [_a-z]|{nonascii}|{escape}
-NMSTART = r'(?:[_a-z]|' + NON_ASCII + r'|' + ESCAPE + r')'
-
-# nmchar [_a-z0-9-]|{nonascii}|{escape}
-NMCHAR = r'(?:[_a-z0-9-]|' + NON_ASCII + r'|' + ESCAPE + r')'
-
-# ident -?{nmstart}{nmchar}*
-IDENT = r'-?' + NMSTART + NMCHAR + '*'
-
-# name {nmchar}+
-NAME = NMCHAR + r'+'
-
-# hash
-HASH = r'#' + NAME
-
-# string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\" ; "string"
-STRING1 = r'"(?:[^\"\\]|\\.)*"'
-
-# string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\' ; 'string'
-STRING2 = r"'(?:[^\'\\]|\\.)*'"
-
-# string {string1}|{string2}
-STRING = '(?:' + STRING1 + r'|' + STRING2 + ')'
-
-# num [0-9]+|[0-9]*"."[0-9]+
-NUM = r'(?:[0-9]*\.[0-9]+|[0-9]+)'
-
-# s [ \t\r\n\f]
-SPACE = r'[ \t\r\n\f]'
-
-# w {s}*
-WHITESPACE = '(?:' + SPACE + r'*)'
-
-# url special chars
-URL_SPECIAL_CHARS = r'[!#$%&*-~]'
-
-# url chars ({url_special_chars}|{nonascii}|{escape})*
-URL_CHARS = r'(?:%s|%s|%s)*' % (URL_SPECIAL_CHARS, NON_ASCII, ESCAPE)
-
-# url
-URL = r'url\(%s(%s|%s)%s\)' % (WHITESPACE, STRING, URL_CHARS, WHITESPACE)
-
-# comments
-# see http://www.w3.org/TR/CSS21/grammar.html
-COMMENT = r'/\*[^*]*\*+([^/*][^*]*\*+)*/'
-
-# {E}{M} {return EMS;}
-# {E}{X} {return EXS;}
-# {P}{X} {return LENGTH;}
-# {C}{M} {return LENGTH;}
-# {M}{M} {return LENGTH;}
-# {I}{N} {return LENGTH;}
-# {P}{T} {return LENGTH;}
-# {P}{C} {return LENGTH;}
-# {D}{E}{G} {return ANGLE;}
-# {R}{A}{D} {return ANGLE;}
-# {G}{R}{A}{D} {return ANGLE;}
-# {M}{S} {return TIME;}
-# {S} {return TIME;}
-# {H}{Z} {return FREQ;}
-# {K}{H}{Z} {return FREQ;}
-# % {return PERCENTAGE;}
-UNIT = r'(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)'
-
-# {num}{UNIT|IDENT} {return NUMBER;}
-QUANTITY = '%s(?:%s%s|%s)?' % (NUM, WHITESPACE, UNIT, IDENT)
-
-# "<!--" {return CDO;}
-# "-->" {return CDC;}
-# "~=" {return INCLUDES;}
-# "|=" {return DASHMATCH;}
-# {w}"{" {return LBRACE;}
-# {w}"+" {return PLUS;}
-# {w}">" {return GREATER;}
-# {w}"," {return COMMA;}
-PUNC = r'<!--|-->|~=|\|=|[\{\+>,:;]'
+++ /dev/null
-/* Babaco Color Scheme A */
-
-
-a:visited,
-a:visited div.vectorTabs li.selected a:visited span {
- color: #260e9c;
-}
-
-html .thumbimage,
-#toc, .toc, .mw-warning, div.thumbinner {
- border-color: #cccccc;
- background-color: #f7f7f7;
-}
-
-/* Framework */
-#mw-page-base {
- background-color: inherit !important;
- background-image: none !important;
-}
-body {
- background-color: #f9f9f9 !important;
- background-image:url(images/page-base-updated.png);
-}
-
-/* Links */
-a {
- color: #0066cc;
-}
-a:visited {
- color: #004d99;
-}
-a:active {
- color: #ff6600;
-}
-a.stub {
- color: #56228b;
-}
-a.new, #p-personal a.new {
- color: #a31205 !important;
-}
-a.new:visited, #p-personal a.new:visited {
- color: #a31205;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- border-color:#999999;
- font-family:georgia, times, serif;
- font-weight:bold;
-}
-#firstHeading {
- font-size:1.5em;
-}
-h2 .editsection,
-.portal h5{
- font-family:sans-serif;
- font-weight:normal;
-
-}
-#toc h2, .toc h2 {
- font-family:sans-serif;
- font-weight:normal;
-}
-body #mw-panel div.portal div.body {
- background-image:url(images/new-portal-break-ltr.png);
-}
-body.rtl #mw-panel div.portal div.body {
- background-image:url(images/new-portal-break-rtl.png);
-}
-body div.vectorTabs li a, div.vectorTabs li a span{
- color:#4d4d4d;
-}
-body div.vectorTabs li.selected a,
-body div.vectorTabs li.selected a span,
-body div.vectorTabs li.selected a:visited
-body div.vectorTabs li.selected a:visited span {
- color: #ff9900 !important;
- font-weight:bold;
-}
-div.vectorTabs li.new a,
-div.vectorTabs li.new a span,
-div.vectorTabs li.new a:visited,
-div.vectorTabs li.new a:visited span {
- color:#a31205;
-}
-#toc,
-.toc,
-.mw-warning,
-div.gallerybox div.thumb,
-table.gallery,
-#preferences fieldset.prefsection fieldset,
-#preferences,
-html .thumbimage,
-.usermessage,
-img.thumbborder,
-div.thumbinner{
- border: 1px solid #cccccc;
- background-color: #f7f7f7;
-}
-#mw-panel div.portal h5 {
- font-weight:bold;
- margin-bottom:0;
- padding-bottom:0.05em;
- color:#000000;
-}
+++ /dev/null
-/* Babaco Color Scheme A */
-
-
-html .thumbimage,
-#toc, .toc, .mw-warning, div.thumbinner {
- border-color: #cccccc;
- background-color: #f7f7f7;
-}
-
-/* Framework */
-#mw-page-base {
- background-color: inherit !important;
- background-image: none !important;
-}
-body {
- background-color: #f9f9f9 !important;
- background-image:url(images/page-base-updated.png);
-}
-/* Links */
-a {
- color: #003cb3;
-}
-a.stub {
- color: #772233;
-}
-a.new, #p-personal a.new {
- color: #a31205 !important;
-}
-{
- color: #260e9c;
-}
-a:visited,
-a:visited div.vectorTabs li.selected a:visited span,
-a.new:visited,
-#p-personal a.new:visited {
- color: #260e9c;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- border-color:#999999;
-}
-
-div.vectorTabs li.new a,
-div.vectorTabs li.new a span,
-div.vectorTabs li.new a:visited,
-div.vectorTabs li.new a:visited span {
- color:#a31205;
-}
-
-#toc,
-.toc,
-.mw-warning,
-div.gallerybox div.thumb,
-table.gallery,
-#preferences fieldset.prefsection fieldset,
-#preferences,
-html .thumbimage,
-.usermessage,
-img.thumbborder,
-div.thumbinner{
- border: 1px solid #cccccc;
- background-color: #f7f7f7;
-}
+++ /dev/null
-/* Babaco Color Scheme C */
-
-/* ridding ourselves of the gradient */
-#mw-page-base {
- background-color: inherit !important;
- background-image: none !important;
-}
-
-a:visited,
-a:visited div.vectorTabs li.selected a:visited span {
- color: #260e9c;
-}
-
-html .thumbimage,
-#toc, .toc, .mw-warning, div.thumbinner {
- border-color: #cccccc;
- background-color: #f7f7f7;
-}
-
-/* Framework */
-body {
- background-color: #f9f9f9 !important;
- background-image:url(images/page-base-updated.png);
-}
-
-/* Links */
-a {
- color: #0066cc;
-}
-a:visited {
- color: #004d99;
-}
-a:active {
- color: #ff6600;
-}
-a.stub {
- color: #56228b;
-}
-a.new, #p-personal a.new {
- color: #a31205 !important;
-}
-a.new:visited, #p-personal a.new:visited {
- color: #a31205;
-}
-
-#firstHeading {
- font-size:1.5em;
-}
-h2 .editsection,
-.portal h5 {
- font-weight:normal;
-}
-#toc h2, .toc h2 {
- font-weight:normal;
-}
-body #mw-panel div.portal div.body {
- background-image:url(images/new-portal-break-ltr.png);
-}
-
-div.vectorTabs li.new a,
-div.vectorTabs li.new a span,
-div.vectorTabs li.new a:visited,
-div.vectorTabs li.new a:visited span {
- color:#a31205;
-}
-#toc,
-.toc,
-.mw-warning,
-div.gallerybox div.thumb,
-table.gallery,
-#preferences fieldset.prefsection fieldset,
-#preferences,
-html .thumbimage,
-.usermessage,
-img.thumbborder,
-div.thumbinner {
- border: 1px solid #cccccc;
- background-color: #f7f7f7;
-}
-#mw-panel div.portal h5 {
- font-weight:bold;
- margin-bottom:0;
- padding-bottom:0.05em;
- color:#000000;
-}
-div.vectorTabs li.selected a,
-div.vectorTabs li.selected a span,
-div.vectorTabs li.selected a:visited
-div.vectorTabs li.selected a:visited span {
- color: #333333 !important;
-}
\ No newline at end of file
+++ /dev/null
-/* new border color */
-#content {
- background-image: url(images/new-border.png);
-}
-
-#footer {
- background-image: url(images/new-border.png);
-}
- body div#left-navigation,
- body div#right-navigation {
- top:3.2em;
- }
- body div#right-navigation {
- margin-top:3.2em;
- }
- body #p-search form,
- body #p-search input,
- body #simpleSearch {
- margin-top:0;
- }
- body div#p-cactions {
- margin-top:0;
- }
- /* Namespaces and Views */
- /* @noflip */
- div.vectorTabs {
- float: left;
- }
- body div.vectorTabs {
- background-image: none;
- padding-left: 0;
- }
- /* @noflip */
- div.vectorTabs ul {
- float: left;
- }
- div.vectorTabs ul {
- height: 100%;
- list-style: none;
- background-image:none;
- margin: 0;
- padding: 0;
- }
- /* @noflip */
- div.vectorTabs ul li {
- float: left;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- body div.vectorTabs ul li {
- line-height: 1em;
- display: inline-block;
- height: 2em;
- margin: 0 1px 0 0;
- padding: 0;
- background:none;
- overflow:hidden;
- white-space:nowrap;
- }
- /* IGNORED BY IE6 */
- div.vectorTabs ul > li {
- display: block;
- }
- body div.vectorTabs li.selected {
- background-image: none;
- border:none;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- body div.vectorTabs li a {
- border-top:1px solid #cccccc;
- border-left:1px solid #cccccc;
- border-right:1px solid #cccccc;
- display: inline-block;
- height: 1.7em;
- padding-left: 0.6em;
- padding-right: 0.6em;
- background-image:url(images/tab-fade.png);
- background-position:bottom left;
- background-repeat:repeat-x;
- background-color:#ffffff;
- }
- body div.vectorTabs li.new a{
- background-image:url(images/tab-new-fade.png);
-
- }
- div.vectorTabs li a,
- div.vectorTabs li a span {
- cursor: pointer;
- }
- div.vectorTabs li a span {
- font-size: 0.8em;
- }
- /* IGNORED BY IE6 */
- div.vectorTabs li > a {
- display: block;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- body div.vectorTabs a span {
- display: inline-block;
- padding-top: 0.5em;
- }
- /* IGNORED BY IE6 */
- /* @noflip */
- div.vectorTabs a > span {
- float: left;
- display: block;
- }
- body div.vectorTabs li.last {
- background-image: url(images/tab-last.png);
- background-repeat:no-repeat;
- background-position:top right;
- border:none;
- }
- body div.vectorTabs li.last a {
- margin-right:7px;
- padding-left:0.4em;
- padding-right:0;
- border-left:1px solid #cccccc;
- border-top:1px solid #cccccc;
- border-right:none;
- background-image:url(images/tab-fade.png);
- background-position:top left;
- background-repeat:repeat-x;
- }
- body div.vectorTabs li.first {
- background-image: url(images/tab-first.png);
- background-repeat:no-repeat;
- background-position:top left;
- border:none;
- }
- body div.vectorTabs li.first a {
- margin-left:7px;
- padding-left:0em;
- padding-right:0.4em;
- border-right:1px solid #cccccc;
- border-top:1px solid #cccccc;
- background-image:url(images/tab-fade.png);
- background-position:top left;
- background-repeat:repeat-x;
- }
-
- div.vectorTabs li.selected a,
- div.vectorTabs li.selected a span,
- div.vectorTabs li.selected a:visited
- div.vectorTabs li.selected a:visited span {
- color: #be5900 !important;
- text-decoration: none;
- }
-
- body div.vectorTabs li.selected a {
- border-top:1px solid #6cc8f3;
- border-right:1px solid #6cc8f3;
- border-left:1px solid #6cc8f3;
- background-color:#fff;
- height:1.75em;
- background-image:none;
- }
- body div.vectorTabs li.selected.first {
- background-image: url(images/tab-active-first.png);
- background-repeat:no-repeat;
- background-position:top left;
- }
- body div.vectorTabs li.selected.first a {
- margin-left:7px;
- padding-right:0.6em;
- padding-left:0.4em;
- border-left:none;
- }
- body div.vectorTabs li.selected.last {
- background-image: url(images/tab-active-last.png);
- background-repeat:no-repeat;
- background-position:top right;
- }
- body div.vectorTabs li.selected.last a {
- margin-right:7px;
- padding-left:0.6em;
- padding-right:0.4em;
- border-right:none;
- }
-
- /* Variants and Actions */
- /* @noflip */
- div.vectorMenu {
- background-image:url(images/tab-fade.png);
- background-position:bottom left;
- background-repeat:repeat-x;
- border-top:1px solid #cccccc;
- border-left:1px solid #cccccc;
- border-right:1px solid #cccccc;
- }
- body.rtl div.vectorMenu {
- direction: rtl;
- }
- /* @noflip */
- body #mw-head div.vectorMenu h5 {
- background-image: url(../images/arrow-down-icon.png);
- background-position: center center;
- background-repeat: no-repeat;
- padding-left: 0;
- margin-left: 0px;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- body div.vectorMenu h5 a {
- display: inline-block;
- width: 24px;
- height:1.5em;
- background-image: none !important;
-
- }
- /* IGNORED BY IE6 */
- div.vectorMenu h5 > a {
- display: block;
- }
- div.vectorMenu div.menu {
- position: relative;
- left:1px;
- display: none;
- clear: both;
- text-align: left;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- body.rtl div.vectorMenu div.menu {
- margin-right: 24px;
- }
- /* IGNORED BY IE6 */
- body.rtl div.vectorMenu > div.menu {
- margin-right: auto;
- }
- /* Fixes old versions of FireFox */
- body.rtl div.vectorMenu > div.menu,
- x:-moz-any-link {
- margin-right: 24px;
- }
- div.vectorMenu:hover div.menu {
- display: block;
- }
- div.vectorMenu ul {
- position: absolute;
- background-color: white;
- border: solid 1px silver;
- border-top-width: 0;
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
- margin-left: -1px;
- text-align: left;
- }
- /* Fixes old versions of FireFox */
- div.vectorMenu ul,
- x:-moz-any-link {
- min-width: 5em;
- }
- /* Returns things back to normal in modern versions of FireFox */
- div.vectorMenu ul,
- x:-moz-any-link,
- x:default {
- min-width: 0;
- }
- div.vectorMenu li {
- padding: 0;
- margin: 0;
- text-align: left;
- line-height: 1em;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorMenu li a {
- display: inline-block;
- padding: 0.5em;
- white-space: nowrap;
- }
- /* IGNORED BY IE6 */
- div.vectorMenu li > a {
- display: block;
- }
- div.vectorMenu li a {
- color: #0645ad;
- cursor: pointer;
- font-size: 0.8em;
- }
- div.vectorMenu li.selected a,
- div.vectorMenu li.selected a:visited {
- color: #333333;
- text-decoration: none;
- }
-#ca-unwatch.icon,
-#ca-watch.icon {
- background-color:#ffffff;
- height:1.75em !important;
- background-image:url(images/tab-fade.png);
- background-position:bottom left;
- background-repeat:repeat-x;
-}
-#ca-unwatch.icon a,
-#ca-watch.icon a {
- height: 1.7em !important;
- border-bottom:none;
- background-color:transparent;
-}
-#ca-watch.icon a,
-#ca-unwatch.icon a {
- background-repeat:no-repeat;
-}
-.wikiEditor-ui-tabs {
- border: none;
- height: 2.15em;
-}
-.wikiEditor-ui-buttons {
- height: 2.15em;
-}
-.wikiEditor-ui-tabs div {
- border: 1px solid silver;
- margin-right: 1px;
- height: 2.15em;
-}
-.wikiEditor-ui-tabs div a {
- line-height: 2.15em;
- background: #FFFFFF url(images/tab-fade.png) repeat-x 0 100%;
-}
-.wikiEditor-ui-tabs div.current a {
- background: #FFFFFF;
-}
+++ /dev/null
-/*
- * main-rtl.css is automatically generated using CSSJanus, a python script for
- * creating RTL versions of otherwise LTR stylesheets.
- *
- * You may download the tool to rebuild this stylesheet
- * http://code.google.com/p/cssjanus/
- *
- * An online version of this tool can be used at:
- * http://cssjanus.commoner.com/
- *
- * The following command is used to generate the RTL version of this file
- * ./cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css
- *
- * Any rules which should not be flipped should be prepended with @noflip in
- * a comment block.
- */
-/* Framework */
-html,
-body {
- height: 100%;
- margin: 0;
- padding: 0;
- font-family: sans-serif;
- font-size: 1em;
-}
-body {
- /*background-color: #f3f3f3;*/
- /*background-color: #b7c8b7;*/
- /*background-image: url(images/page-base.png);*/
-
- /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
- /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
- /* fallback (Opera) */
- background: #b7c8b7;
- /* Mozilla: */
- background: -moz-linear-gradient(top, #b7c8b7, #e7f8e7);
- /* Chrome, Safari:*/
- background: -webkit-gradient(linear,
- left top, left bottom, from(#b7c8b7), to(#e7f8e7));
- /* MSIE */
- filter: progid:DXImageTransform.Microsoft.Gradient(
- StartColorStr='#b7c8b7', EndColorStr='#e7f8e7', GradientType=0);
-}
-
-/* Content */
-#content {
- margin-left: 10em;
- padding: 1em;
- background-image: url(images/border.png);
- background-position: top left;
- background-repeat: repeat-y;
- /* fallback (Opera) */
- background: white;
- /* Mozilla: */
- background: -moz-linear-gradient(top, white, #c7b3cc);
- /* Chrome, Safari:*/
- background: -webkit-gradient(linear,
- left top, left bottom, from(white), to(#c7b3cc));
- /* MSIE */
- filter: progid:DXImageTransform.Microsoft.Gradient(
- StartColorStr='white', EndColorStr='#c7b3cc', GradientType=0);
- /*background-color: white;*/
-}
-/* Head */
-#mw-page-base {
- height: 5em;
- /*background-color: grey;*/
- background-image: url(images/page-fade.png);
- opacity: 0.0;
- background-position: bottom left;
- background-repeat: repeat-x;
-}
-#mw-head-base {
- margin-top: -5em;
- margin-left: 10em;
- height: 5em;
- background-image: url(images/border.png);
- background-position: bottom left;
- background-repeat: repeat-x;
-}
-#mw-head {
- position: absolute;
- top: 0;
- right: 0;
- width: 100%;
-}
-#mw-head h5 {
- margin: 0;
- padding: 0;
-}
- /* Hide empty portlets */
- div.emptyPortlet {
- display: none;
- }
- /* Personal */
- #p-personal {
- position: absolute;
- top: 0;
- margin-left: 10em;
- right: 0.75em;
- }
- #p-personal h5 {
- display: none;
- }
- #p-personal ul {
- list-style: none;
- margin: 0;
- padding: 0;
- }
- /* @noflip */
- #p-personal li {
- line-height: 1.125em;
- float: left;
- }
- #p-personal li {
- margin-left: 0.75em;
- margin-top: 0.5em;
- font-size: 0.75em;
- }
- /* Navigation Containers */
- #left-navigation {
- position: absolute;
- left: 10em;
- top: 2.5em;
- }
- #right-navigation {
- float: right;
- margin-top: 2.5em;
- }
- /* Navigation Labels */
- div.vectorTabs h5,
- div.vectorMenu h5 span {
- display: none;
- }
- /* Namespaces and Views */
- /* @noflip */
- div.vectorTabs {
- float: left;
- }
- div.vectorTabs {
- background-image: url(images/tab-break.png);
- background-position: bottom left;
- background-repeat: no-repeat;
- padding-left: 1px;
- }
- /* @noflip */
- div.vectorTabs ul {
- float: left;
- }
- div.vectorTabs ul {
- height: 100%;
- list-style: none;
- margin: 0;
- padding: 0;
- }
- /* @noflip */
- div.vectorTabs ul li {
- float: left;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorTabs ul li {
- line-height: 1.125em;
- display: inline-block;
- height: 100%;
- margin: 0;
- padding: 0;
-
- /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
- /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
- /* fallback (Opera) */
- background: #b7c8b7;
- /* Mozilla: */
- background: -moz-linear-gradient(top, #b7c8b7, #aaaaaa);
- /* Chrome, Safari:*/
- background: -webkit-gradient(linear,
- left top, left bottom, from(#b7c8b7), to(#aaaaaa));
- /* MSIE */
- filter: progid:DXImageTransform.Microsoft.Gradient(
- StartColorStr='#b7c8b7', EndColorStr='#aaaaaa', GradientType=0);
-
- /*background-color: #f3f3f3;*/
- /*background-color: #b7c8b7;*/
- /*background-image: url(images/tab-normal-fade.png);*/
- background-position: bottom left;
- background-repeat: repeat-x;
- white-space:nowrap;
- }
- /* IGNORED BY IE6 */
- div.vectorTabs ul > li {
- display: block;
- }
- div.vectorTabs li.selected {
-
- /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
- /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
- /* fallback (Opera) */
- background: #b7c8b7;
- /* Mozilla: */
- background: -moz-linear-gradient(top, #b7c8b7, white);
- /* Chrome, Safari:*/
- background: -webkit-gradient(linear,
- left top, left bottom, from(#b7c8b7), to(white));
- /* MSIE */
- filter: progid:DXImageTransform.Microsoft.Gradient(
- StartColorStr='#b7c8b7', EndColorStr='white', GradientType=0);
-
- /*background-image: url(images/tab-current-fade.png);*/
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorTabs li a {
- display: inline-block;
- height: 2.5em;
- padding-left: 0.4em;
- padding-right: 0.4em;
- background-image: url(images/tab-break.png);
- background-position: bottom right;
- background-repeat: no-repeat;
- }
- div.vectorTabs li a,
- div.vectorTabs li a span {
- /*color: #0645ad;*/
- color: #67536c;
- cursor: pointer;
- }
- div.vectorTabs li a span {
- font-size: 0.8em;
- }
- /* IGNORED BY IE6 */
- div.vectorTabs li > a {
- display: block;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorTabs a span {
- display: inline-block;
- padding-top: 1.25em;
- }
- /* IGNORED BY IE6 */
- /* @noflip */
- div.vectorTabs a > span {
- float: left;
- display: block;
- }
- div.vectorTabs li.selected a,
- div.vectorTabs li.selected a span,
- div.vectorTabs li.selected a:visited
- div.vectorTabs li.selected a:visited span {
- color: #333333;
- text-decoration: none;
- }
- div.vectorTabs li.new a,
- div.vectorTabs li.new a span,
- div.vectorTabs li.new a:visited,
- div.vectorTabs li.new a:visited span {
- color: #a55858;
- }
- /* Variants and Actions */
- /* @noflip */
- div.vectorMenu {
- direction: ltr;
- float: left;
- background-image: url(images/arrow-down-icon.png);
- background-position: center center;
- background-repeat: no-repeat;
- }
- /* @noflip */
- body.rtl div.vectorMenu {
- direction: rtl;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- /* @noflip */
- #mw-head div.vectorMenu h5 {
- float: left;
- background-image: url(images/tab-break.png);
- background-repeat: no-repeat;
- }
- /* IGNORED BY IE6 */
- #mw-head div.vectorMenu > h5 {
- background-image: none;
- }
- #mw-head div.vectorMenu h5 {
- background-position: bottom left;
- margin-left: -1px;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- /* @noflip */
- div.vectorMenu h5 a {
- display: inline-block;
- width: 24px;
- height: 2.5em;
- text-decoration: none;
- background-image: url(images/tab-break.png);
- background-repeat: no-repeat;
- }
- div.vectorMenu h5 a{
- background-position: bottom right;
- }
- /* IGNORED BY IE6 */
- div.vectorMenu h5 > a {
- display: block;
- }
- div.vectorMenu div.menu {
- position: relative;
- display: none;
- clear: both;
- text-align: left;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- /* @noflip */
- body.rtl div.vectorMenu div.menu {
- margin-left: 24px;
- }
- /* IGNORED BY IE6 */
- /* @noflip */
- body.rtl div.vectorMenu > div.menu {
- margin-left: auto;
- }
- /* Fixes old versions of FireFox */
- /* @noflip */
- body.rtl div.vectorMenu > div.menu,
- x:-moz-any-link {
- margin-left: 23px;
- }
- div.vectorMenu:hover div.menu {
- display: block;
- }
- div.vectorMenu ul {
- position: absolute;
-
- /* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
- /* and http://www.puremango.co.uk/2010/04/css-gradient/ */
- /* fallback (Opera) */
- background: white;
- /* Mozilla: */
- background: -moz-linear-gradient(top, white, #b7c8b7);
- /* Chrome, Safari:*/
- background: -webkit-gradient(linear,
- left top, left bottom, from(white), to(#b7c8b7));
- /* MSIE */
- filter: progid:DXImageTransform.Microsoft.Gradient(
- StartColorStr='white', EndColorStr='#b7c8b7', GradientType=0);
-
- /*background-color: white;*/
- border: solid 1px silver;
- border-top-width: 0;
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
- margin-left: -1px;
- text-align: left;
- }
- /* Fixes old versions of FireFox */
- div.vectorMenu ul,
- x:-moz-any-link {
- min-width: 5em;
- }
- /* Returns things back to normal in modern versions of FireFox */
- div.vectorMenu ul,
- x:-moz-any-link,
- x:default {
- min-width: 0;
- }
- div.vectorMenu li {
- padding: 0;
- margin: 0;
- text-align: left;
- line-height: 1em;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorMenu li a {
- display: inline-block;
- padding: 0.5em;
- white-space: nowrap;
- }
- /* IGNORED BY IE6 */
- div.vectorMenu li > a {
- display: block;
- }
- div.vectorMenu li a {
- color: #0645ad;
- cursor: pointer;
- font-size: 0.8em;
- }
- div.vectorMenu li.selected a,
- div.vectorMenu li.selected a:visited {
- color: #333333;
- text-decoration: none;
- }
- /* Search */
- #p-search h5 {
- display: none;
- }
- /* @noflip */
- #p-search {
- float: left;
- }
- #p-search {
- margin-right: 0.5em;
- margin-left: 0.5em;
- }
- #p-search form,
- #p-search input {
- margin: 0;
- margin-top: 0.4em;
- }
- #simpleSearch {
- margin-top: 0.5em;
- position: relative;
- border: solid 1px #AAAAAA;
- background-color: white;
- background-image: url(images/search-fade.png);
- background-position: top left;
- background-repeat: repeat-x;
- }
- #simpleSearch label {
- font-size: 0.8em;
- top: 0.25em;
- }
- #simpleSearch input#searchInput {
- margin: 0;
- border-width: 0;
- padding: 0.25em;
- line-height: 1em;
- font-size: 0.8em;
- width: 9em;
- background-color: transparent;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- #simpleSearch button#searchButton {
- margin: 0;
- padding: 0;
- width: 1.75em;
- height: 1.5em;
- border: none;
- cursor: pointer;
- background-color: transparent;
- background-image: url(images/search-ltr.png);
- background-position: center center;
- background-repeat: no-repeat;
- }
- /* IGNORED BY IE6 */
- #simpleSearch > button#searchButton {
- height: 100%;
- }
- .suggestions-special .special-label {
- font-size: 0.8em;
- color: gray;
- }
- .suggestions-special .special-query {
- color: black;
- font-style: italic;
- }
- .suggestions-special .special-hover {
- background-color: silver;
- }
-/* Panel */
-#mw-panel {
- position: absolute;
- top: 160px;
- padding-top: 1em;
- width: 10em;
- left: 0;
-}
- #mw-panel div.portal {
- padding-bottom: 1.5em;
- }
- #mw-panel div.portal h5 {
- font-weight: normal;
- color: #444444;
- padding: 0.25em;
- padding-top: 0;
- padding-left: 1.75em;
- cursor: default;
- border: none;
- font-size: 0.75em;
- }
- #mw-panel div.portal div.body {
- margin: 0;
- padding-top: 0.5em;
- margin-left: 1.25em;
- background-image: url(images/portal-break.png);
- background-repeat: no-repeat;
- background-position: top left;
- }
- #mw-panel div.portal div.body ul {
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
- }
- #mw-panel div.portal div.body ul li {
- line-height: 1.125em;
- padding: 0;
- padding-bottom: 0.5em;
- margin: 0;
- overflow: hidden;
- font-size: 0.75em;
- }
- #mw-panel div.portal div.body ul li a {
- color: #0645ad;
- }
- #mw-panel div.portal div.body ul li a:visited {
- color: #0b0080;
- }
-/* Footer */
-#footer {
- margin-left: 10em;
- margin-top: 0;
- padding: 0.75em;
- background-image: url(images/border.png);
- background-position: top left;
- background-repeat: repeat-x;
-}
-#footer ul {
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-#footer ul li {
- margin: 0;
- padding: 0;
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- color: #333333;
- font-size: 0.7em;
-}
-#footer #footer-icons {
- float: right;
-}
-/* @noflip */
-body.ltr #footer #footer-places {
- float: left;
-}
-#footer #footer-info li {
- line-height: 1.4em;
-}
-#footer #footer-icons li {
- float: left;
- margin-left: 0.5em;
- line-height: 2em;
-}
-#footer #footer-places li {
- float: left;
- margin-right: 1em;
- line-height: 2em;
-}
-/* Logo */
-#p-logo {
- position: absolute;
- top: -160px;
- left: 0;
- width: 10em;
- height: 160px;
-}
-#p-logo a {
- display: block;
- width: 10em;
- height: 160px;
- background-repeat: no-repeat;
- background-position: center center;
- text-decoration: none;
-}
-
-/*
- *
- * The following code is highly modified from monobook. It would be nice if the
- * preftoc id was more human readable like preferences-toc for instance,
- * howerver this would require backporting the other skins.
- */
-
-/* Preferences */
-#preftoc {
- /* Tabs */
- width: 100%;
- float: left;
- clear: both;
- margin: 0 !important;
- padding: 0 !important;
- background-image: url(images/preferences-break.png);
- background-position: bottom left;
- background-repeat: no-repeat;
-}
- #preftoc li {
- /* Tab */
- float: left;
- margin: 0;
- padding: 0;
- padding-right: 1px;
- height: 2.25em;
- white-space: nowrap;
- list-style-type: none;
- list-style-image: none;
- background-image: url(images/preferences-break.png);
- background-position: bottom right;
- background-repeat: no-repeat;
- }
- /* IGNORED BY IE6 */
- #preftoc li:first-child {
- margin-left: 1px;
- }
- #preftoc a,
- #preftoc a:active {
- display: inline-block;
- position: relative;
- color: #0645ad;
- padding: 0.5em;
- text-decoration: none;
- background-image: none;
- font-size: 0.9em;
- }
- #preftoc a:hover {
- text-decoration: underline;
- }
- #preftoc li.selected a {
- background-image: url(images/preferences-fade.png);
- background-position: bottom;
- background-repeat: repeat-x;
- color: #333333;
- text-decoration: none;
- }
-#preferences {
- float: left;
- width: 100%;
- margin: 0;
- margin-top: -2px;
- clear: both;
- border: solid 1px #cccccc;
- background-color: #f9f9f9;
- background-image: url(images/preferences-base.png);
-}
-#preferences fieldset.prefsection {
- border: none;
- padding: 0;
- margin: 1em;
-}
-#preferences fieldset.prefsection fieldset {
- border: none;
- border-top: solid 1px #cccccc;
-}
-#preferences legend {
- color: #666666;
-}
-#preferences fieldset.prefsection legend.mainLegend {
- display: none;
-}
-#preferences td {
- padding-left: 0.5em;
- padding-right: 0.5em;
-}
-#preferences td.htmlform-tip {
- font-size: x-small;
- padding: .2em 2em;
- color: #666666;
-}
-#preferences div.mw-prefs-buttons {
- padding: 1em;
-}
-#preferences div.mw-prefs-buttons input {
- margin-right: 0.25em;
-}
-
-/*
- * Styles for the user login and create account forms
- */
-#userlogin, #userloginForm {
- border: solid 1px #cccccc;
- padding: 1.2em;
- margin: .5em;
- float: left;
-}
-
-#userlogin {
- min-width: 20em;
- max-width: 90%;
- width: 40em;
-}
-
-/*
- *
- * The following code is slightly modified from monobook
- *
- */
-#content {
- line-height: 1.5em;
-}
-#bodyContent {
- font-size: 0.8em;
-}
-/* Links */
-a {
- text-decoration: none;
- color: #0645ad;
- /*color: #67536c;*/
- background: none;
-}
-a:visited {
- color: #0b0080;
-}
-a:active {
- color: #faa700;
-}
-a:hover {
- text-decoration: underline;
-}
-a.stub {
- color: #772233;
-}
-a.new, #p-personal a.new {
- color: #ba0000;
-}
-a.new:visited, #p-personal a.new:visited {
- color: #a55858;
-}
-
-/* Inline Elements */
-img {
- border: none;
- vertical-align: middle;
-}
-hr {
- height: 1px;
- color: #aaa;
- background-color: #aaa;
- border: 0;
- margin: .2em 0 .2em 0;
-}
-
-/* Structural Elements */
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- /*color: black;*/
- color: #67536c;
- background: none;
- font-weight: normal;
- margin: 0;
- padding-top: .5em;
- padding-bottom: .17em;
- border-bottom: 1px solid #aaa;
- width: auto;
-}
-h1 { font-size: 188%; }
-h1 .editsection { font-size: 53%; }
-h2 { font-size: 150%; }
-h2 .editsection { font-size: 67%; }
-h3,
-h4,
-h5,
-h6 {
- border-bottom: none;
- font-weight: bold;
-}
-h3 { font-size: 132%; }
-h3 .editsection { font-size: 76%; font-weight: normal; }
-h4 { font-size: 116%; }
-h4 .editsection { font-size: 86%; font-weight: normal; }
-h5 { font-size: 100%; }
-h5 .editsection { font-weight: normal; }
-h6 { font-size: 80%; }
-h6 .editsection { font-size: 125%; font-weight: normal; }
-p {
- margin: .4em 0 .5em 0;
- line-height: 1.5em;
-}
- p img {
- margin: 0;
- }
-abbr,
-acronym,
-.explain {
- border-bottom: 1px dotted black;
- color: black;
- background: none;
- cursor: help;
-}
-q {
- font-family: Times, "Times New Roman", serif;
- font-style: italic;
-}
-/* Disabled for now
-blockquote {
- font-family: Times, "Times New Roman", serif;
- font-style: italic;
-}*/
-code {
- background-color: #f9f9f9;
-}
-pre {
- padding: 1em;
- border: 1px dashed #2f6fab;
- color: black;
- background-color: #f9f9f9;
- line-height: 1.1em;
-}
-ul {
- line-height: 1.5em;
- list-style-type: square;
- margin: .3em 0 0 1.5em;
- padding: 0;
- list-style-image: url(images/bullet-icon.png);
-}
-ol {
- line-height: 1.5em;
- margin: .3em 0 0 3.2em;
- padding: 0;
- list-style-image: none;
-}
-li {
- margin-bottom: .1em;
-}
-dt {
- font-weight: bold;
- margin-bottom: .1em;
-}
-dl {
- margin-top: .2em;
- margin-bottom: .5em;
-}
-dd {
- line-height: 1.5em;
- margin-left: 2em;
- margin-bottom: .1em;
-}
-/* Tables */
-table {
- font-size: 100%;
- color: black;
- /* we don't want the bottom borders of <h2>s to be visible through
- * floated tables */
- background-color: white;
-}
-fieldset table {
- /* but keep table layouts in forms clean... */
- background: none;
-}
-/* Forms */
-fieldset {
- border: 1px solid #2f6fab;
- margin: 1em 0 1em 0;
- padding: 0 1em 1em;
- line-height: 1.5em;
-}
- fieldset.nested {
- margin: 0 0 0.5em 0;
- padding: 0 0.5em 0.5em;
- }
-legend {
- padding: .5em;
- font-size: 95%;
-}
-form {
- border: none;
- margin: 0;
-}
-textarea {
- width: 100%;
- padding: .1em;
-}
-select {
- vertical-align: top;
-}
-/* Table of Contents */
-#toc,
-.toc,
-.mw-warning {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- padding: 5px;
- font-size: 95%;
-}
-#toc h2,
-.toc h2 {
- display: inline;
- border: none;
- padding: 0;
- font-size: 100%;
- font-weight: bold;
-}
-#toc #toctitle,
-.toc #toctitle,
-#toc .toctitle,
-.toc .toctitle {
- text-align: center;
-}
-#toc ul,
-.toc ul {
- list-style-type: none;
- list-style-image: none;
- margin-left: 0;
- padding-left: 0;
- text-align: left;
-}
-#toc ul ul,
-.toc ul ul {
- margin: 0 0 0 2em;
-}
-#toc .toctoggle,
-.toc .toctoggle {
- font-size: 94%;
-}
-/* Images */
-div.floatright, table.floatright {
- clear: right;
- float: right;
- position: relative;
- margin: 0 0 .5em .5em;
- border: 0;
-}
-div.floatright p { font-style: italic; }
-div.floatleft, table.floatleft {
- float: left;
- clear: left;
- position: relative;
- margin: 0 .5em .5em 0;
- border: 0;
-}
-div.floatleft p { font-style: italic; }
-/* Thumbnails */
-div.thumb {
- margin-bottom: .5em;
- border-style: solid;
- border-color: white;
- width: auto;
- background-color: transparent;
-}
-div.thumbinner {
- border: 1px solid #cccccc;
- padding: 3px !important;
- background-color: #f9f9f9;
- font-size: 94%;
- text-align: center;
- overflow: hidden;
-}
-html .thumbimage {
- border: 1px solid #ccc;
-}
-html .thumbcaption {
- border: none;
- text-align: left;
- line-height: 1.4em;
- padding: 3px !important;
- font-size: 94%;
-}
-div.magnify {
- float: right;
- border: none !important;
- background: none !important;
-}
-div.magnify a, div.magnify img {
- display: block;
- border: none !important;
- background: none !important;
-}
-div.tright {
- clear: right;
- float: right;
- border-width: .5em 0 .8em 1.4em;
-}
-div.tleft {
- float: left;
- clear: left;
- margin-right: .5em;
- border-width: .5em 1.4em .8em 0;
-}
-img.thumbborder {
- border: 1px solid #dddddd;
-}
-.hiddenStructure {
- display: none;
-}
-/* Warning */
-.mw-warning {
- margin-left: 50px;
- margin-right: 50px;
- text-align: center;
-}
-/* User Message */
-.usermessage {
- background-color: #ffce7b;
- border: 1px solid #ffa500;
- color: black;
- font-weight: bold;
- margin: 2em 0 1em;
- padding: .5em 1em;
- vertical-align: middle;
-}
-/* Site Notice */
-#siteNotice {
- text-align: center;
- font-size: 0.8em;
- margin: 0;
-}
- #siteNotice div,
- #siteNotice p {
- margin: 0;
- padding: 0;
- margin-bottom: 0.9em;
- }
-/* Categories */
-.catlinks {
- border: 1px solid #888;
- background-color: #cccccc;
- padding: 5px;
- margin-top: 1em;
- clear: both;
-}
-/* Sub-navigation */
-#siteSub {
- display: none;
-}
-#jump-to-nav {
- display: none;
-}
-#contentSub, #contentSub2 {
- font-size: 84%;
- line-height: 1.2em;
- margin: 0 0 1.4em 1em;
- color: #7d7d7d;
- width: auto;
-}
-span.subpages {
- display: block;
-}
-/* Emulate Center */
-.center {
- width: 100%;
- text-align: center;
-}
-*.center * {
- margin-left: auto;
- margin-right: auto;
-}
-/* Small for tables and similar */
-.small, .small * {
- font-size: 94%;
-}
-table.small {
- font-size: 100%;
-}
-/* Edge Cases for Content */
-h1, h2 {
- margin-bottom: .6em;
-}
-h3, h4, h5 {
- margin-bottom: .3em;
-}
-#firstHeading {
- padding-top: 0;
- margin-top: 0;
- padding-top: 0;
- margin-bottom: 0.1em;
- line-height: 1.2em;
- font-size: 1.6em;
- padding-bottom: 0;
-}
-#content a.external,
-#content a[href ^="gopher://"] {
- background: url(images/external-link-ltr-icon.png) center right no-repeat;
- padding: 0 13px 0 0;
-}
-#content a[href ^="https://"],
-.link-https {
- background: url(images/lock-icon.png) center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a[href ^="mailto:"],
-.link-mailto {
- background: url(images/mail-icon.png) center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a[href ^="news://"] {
- background: url(images/news-icon.png) center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a[href ^="ftp://"],
-.link-ftp {
- background: url(images/file-icon.png) center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a[href ^="irc://"],
-#content a.extiw[href ^="irc://"],
-.link-irc {
- background: url(images/talk-icon.png) center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a.external[href $=".ogg"], #content a.external[href $=".OGG"],
-#content a.external[href $=".mid"], #content a.external[href $=".MID"],
-#content a.external[href $=".midi"], #content a.external[href $=".MIDI"],
-#content a.external[href $=".mp3"], #content a.external[href $=".MP3"],
-#content a.external[href $=".wav"], #content a.external[href $=".WAV"],
-#content a.external[href $=".wma"], #content a.external[href $=".WMA"],
-.link-audio {
- background: url("images/audio-icon.png") center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a.external[href $=".ogm"], #content a.external[href $=".OGM"],
-#content a.external[href $=".avi"], #content a.external[href $=".AVI"],
-#content a.external[href $=".mpeg"], #content a.external[href $=".MPEG"],
-#content a.external[href $=".mpg"], #content a.external[href $=".MPG"],
-.link-video {
- background: url("images/video-icon.png") center right no-repeat;
- padding: 0 18px 0 0;
-}
-#content a.external[href $=".pdf"], #content a.external[href $=".PDF"],
-#content a.external[href *=".pdf#"], #content a.external[href *=".PDF#"],
-#content a.external[href *=".pdf?"], #content a.external[href *=".PDF?"],
-.link-document {
- background: url("images/document-icon.png") center right no-repeat;
- padding: 0 18px 0 0;
-}
-/* Interwiki Styling (Disabled) */
-#content a.extiw,
-#content a.extiw:active {
- color: #36b;
- background: none;
- padding: 0;
-}
-#content a.external {
- color: #36b;
-}
-#content .printfooter {
- display: none;
-}
-/* Icon for Usernames */
-#pt-userpage,
-#pt-anonuserpage,
-#pt-login {
- background: url(images/user-icon.png) left top no-repeat;
- padding-left: 15px !important;
- text-transform: none;
-}
-
-.toccolours {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- padding: 5px;
- font-size: 95%;
-}
-#bodyContent {
- position: relative;
- width: 100%;
-}
-#mw-js-message {
- font-size: 0.8em;
-}
-div#bodyContent {
- line-height: 1.5em;
-}
-
-/* Watch/Unwatch Icon Styling */
-#ca-unwatch.icon,
-#ca-watch.icon {
- margin-right:1px;
-}
-#ca-unwatch.icon a,
-#ca-watch.icon a {
- margin: 0;
- padding: 0;
- outline: none;
- display: block;
- width: 26px;
- height: 2.5em;
-}
-#ca-unwatch.icon a {
- background-image: url(images/watch-icons.png);
- background-position: -43px 60%;
-}
-#ca-watch.icon a {
- background-image: url(images/watch-icons.png);
- background-position: 5px 60%;
-}
-#ca-unwatch.icon a:hover {
- background-image: url(images/watch-icons.png);
- background-position: -67px 60%;
-}
-#ca-watch.icon a:hover {
- background-image: url(images/watch-icons.png);
- background-position: -19px 60%;
-}
-#ca-unwatch.icon a.loading,
-#ca-watch.icon a.loading {
- background-image: url(images/watch-icon-loading.gif);
- background-position: center 60%;
-}
-#ca-unwatch.icon a span,
-#ca-watch.icon a span {
- display: none;
-}
-div.vectorTabs ul {
- background-image:url(images/tab-break.png);
- background-position:right bottom;
- background-repeat:no-repeat;
-}
+++ /dev/null
-/*
- * main-rtl.css is automatically generated using CSSJanus, a python script for
- * creating RTL versions of otherwise LTR stylesheets.
- *
- * You may download the tool to rebuild this stylesheet
- * http://code.google.com/p/cssjanus/
- *
- * An online version of this tool can be used at:
- * http://cssjanus.commoner.com/
- *
- * The following command is used to generate the RTL version of this file
- * ./cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css
- *
- * Any rules which should not be flipped should be prepended with @noflip in
- * a comment block.
- */
-/* Framework */
-html,
-body {
- height: 100%;
- margin: 0;
- padding: 0;
- font-family: sans-serif;
- font-size: 1em;
-}
-body {
- background-color: #f3f3f3;
- background-image: url(images/page-base.png);
-}
-/* Content */
-#content {
- margin-right: 10em;
- padding: 1em;
- background-image: url(images/border.png);
- background-position: top right;
- background-repeat: repeat-y;
- background-color: white;
-}
-/* Head */
-#mw-page-base {
- height: 5em;
- background-color: white;
- background-image: url(images/page-fade.png);
- background-position: bottom right;
- background-repeat: repeat-x;
-}
-#mw-head-base {
- margin-top: -5em;
- margin-right: 10em;
- height: 5em;
- background-image: url(images/border.png);
- background-position: bottom right;
- background-repeat: repeat-x;
-}
-#mw-head {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
-}
-#mw-head h5 {
- margin: 0;
- padding: 0;
-}
- /* Hide empty portlets */
- div.emptyPortlet {
- display: none;
- }
- /* Personal */
- #p-personal {
- position: absolute;
- top: 0;
- margin-right: 10em;
- left: 0.75em;
- }
- #p-personal h5 {
- display: none;
- }
- #p-personal ul {
- list-style: none;
- margin: 0;
- padding: 0;
- }
- /* @noflip */
- #p-personal li {
- line-height: 1.125em;
- float: left;
- }
- #p-personal li {
- margin-right: 0.75em;
- margin-top: 0.5em;
- font-size: 0.75em;
- }
- /* Navigation Containers */
- #left-navigation {
- position: absolute;
- right: 10em;
- top: 2.5em;
- }
- #right-navigation {
- float: left;
- margin-top: 2.5em;
- }
- /* Navigation Labels */
- div.vectorTabs h5,
- div.vectorMenu h5 span {
- display: none;
- }
- /* Namespaces and Views */
- /* @noflip */
- div.vectorTabs {
- float: left;
- }
- div.vectorTabs {
- background-image: url(images/tab-break.png);
- background-position: bottom right;
- background-repeat: no-repeat;
- padding-right: 1px;
- }
- /* @noflip */
- div.vectorTabs ul {
- float: left;
- }
- div.vectorTabs ul {
- height: 100%;
- list-style: none;
- margin: 0;
- padding: 0;
- }
- /* @noflip */
- div.vectorTabs ul li {
- float: left;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorTabs ul li {
- line-height: 1.125em;
- display: inline-block;
- height: 100%;
- margin: 0;
- padding: 0;
- background-color: #f3f3f3;
- background-image: url(images/tab-normal-fade.png);
- background-position: bottom right;
- background-repeat: repeat-x;
- white-space:nowrap;
- }
- /* IGNORED BY IE6 */
- div.vectorTabs ul > li {
- display: block;
- }
- div.vectorTabs li.selected {
- background-image: url(images/tab-current-fade.png);
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorTabs li a {
- display: inline-block;
- height: 2.5em;
- padding-right: 0.4em;
- padding-left: 0.4em;
- background-image: url(images/tab-break.png);
- background-position: bottom left;
- background-repeat: no-repeat;
- }
- div.vectorTabs li a,
- div.vectorTabs li a span {
- color: #0645ad;
- cursor: pointer;
- }
- div.vectorTabs li a span {
- font-size: 0.8em;
- }
- /* IGNORED BY IE6 */
- div.vectorTabs li > a {
- display: block;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorTabs a span {
- display: inline-block;
- padding-top: 1.25em;
- }
- /* IGNORED BY IE6 */
- /* @noflip */
- div.vectorTabs a > span {
- float: left;
- display: block;
- }
- div.vectorTabs li.selected a,
- div.vectorTabs li.selected a span,
- div.vectorTabs li.selected a:visited
- div.vectorTabs li.selected a:visited span {
- color: #333333;
- text-decoration: none;
- }
- div.vectorTabs li.new a,
- div.vectorTabs li.new a span,
- div.vectorTabs li.new a:visited,
- div.vectorTabs li.new a:visited span {
- color: #a55858;
- }
- /* Variants and Actions */
- /* @noflip */
- div.vectorMenu {
- direction: ltr;
- float: left;
- background-image: url(images/arrow-down-icon.png);
- background-position: center center;
- background-repeat: no-repeat;
- }
- /* @noflip */
- body.rtl div.vectorMenu {
- direction: rtl;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- /* @noflip */
- #mw-head div.vectorMenu h5 {
- float: left;
- background-image: url(images/tab-break.png);
- background-repeat: no-repeat;
- }
- /* IGNORED BY IE6 */
- #mw-head div.vectorMenu > h5 {
- background-image: none;
- }
- #mw-head div.vectorMenu h5 {
- background-position: bottom right;
- margin-right: -1px;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- /* @noflip */
- div.vectorMenu h5 a {
- display: inline-block;
- width: 24px;
- height: 2.5em;
- text-decoration: none;
- background-image: url(images/tab-break.png);
- background-repeat: no-repeat;
- }
- div.vectorMenu h5 a{
- background-position: bottom left;
- }
- /* IGNORED BY IE6 */
- div.vectorMenu h5 > a {
- display: block;
- }
- div.vectorMenu div.menu {
- position: relative;
- display: none;
- clear: both;
- text-align: right;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- /* @noflip */
- body.rtl div.vectorMenu div.menu {
- margin-left: 24px;
- }
- /* IGNORED BY IE6 */
- /* @noflip */
- body.rtl div.vectorMenu > div.menu {
- margin-left: auto;
- }
- /* Fixes old versions of FireFox */
- /* @noflip */
- body.rtl div.vectorMenu > div.menu,
- x:-moz-any-link {
- margin-left: 23px;
- }
- div.vectorMenu:hover div.menu {
- display: block;
- }
- div.vectorMenu ul {
- position: absolute;
- background-color: white;
- border: solid 1px silver;
- border-top-width: 0;
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
- margin-right: -1px;
- text-align: right;
- }
- /* Fixes old versions of FireFox */
- div.vectorMenu ul,
- x:-moz-any-link {
- min-width: 5em;
- }
- /* Returns things back to normal in modern versions of FireFox */
- div.vectorMenu ul,
- x:-moz-any-link,
- x:default {
- min-width: 0;
- }
- div.vectorMenu li {
- padding: 0;
- margin: 0;
- text-align: right;
- line-height: 1em;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- div.vectorMenu li a {
- display: inline-block;
- padding: 0.5em;
- white-space: nowrap;
- }
- /* IGNORED BY IE6 */
- div.vectorMenu li > a {
- display: block;
- }
- div.vectorMenu li a {
- color: #0645ad;
- cursor: pointer;
- font-size: 0.8em;
- }
- div.vectorMenu li.selected a,
- div.vectorMenu li.selected a:visited {
- color: #333333;
- text-decoration: none;
- }
- /* Search */
- #p-search h5 {
- display: none;
- }
- /* @noflip */
- #p-search {
- float: left;
- }
- #p-search {
- margin-left: 0.5em;
- margin-right: 0.5em;
- }
- #p-search form,
- #p-search input {
- margin: 0;
- margin-top: 0.4em;
- }
- #simpleSearch {
- margin-top: 0.5em;
- position: relative;
- border: solid 1px #AAAAAA;
- background-color: white;
- background-image: url(images/search-fade.png);
- background-position: top right;
- background-repeat: repeat-x;
- }
- #simpleSearch label {
- font-size: 0.8em;
- top: 0.25em;
- }
- #simpleSearch input#searchInput {
- margin: 0;
- border-width: 0;
- padding: 0.25em;
- line-height: 1em;
- font-size: 0.8em;
- width: 9em;
- background-color: transparent;
- }
- /* OVERRIDDEN BY COMPLIANT BROWSERS */
- #simpleSearch button#searchButton {
- margin: 0;
- padding: 0;
- width: 1.75em;
- height: 1.5em;
- border: none;
- cursor: pointer;
- background-color: transparent;
- background-image: url(images/search-rtl.png);
- background-position: center center;
- background-repeat: no-repeat;
- }
- /* IGNORED BY IE6 */
- #simpleSearch > button#searchButton {
- height: 100%;
- }
- .suggestions-special .special-label {
- font-size: 0.8em;
- color: gray;
- }
- .suggestions-special .special-query {
- color: black;
- font-style: italic;
- }
- .suggestions-special .special-hover {
- background-color: silver;
- }
-/* Panel */
-#mw-panel {
- position: absolute;
- top: 160px;
- padding-top: 1em;
- width: 10em;
- right: 0;
-}
- #mw-panel div.portal {
- padding-bottom: 1.5em;
- }
- #mw-panel div.portal h5 {
- font-weight: normal;
- color: #444444;
- padding: 0.25em;
- padding-top: 0;
- padding-right: 1.75em;
- cursor: default;
- border: none;
- font-size: 0.75em;
- }
- #mw-panel div.portal div.body {
- margin: 0;
- padding-top: 0.5em;
- margin-right: 1.25em;
- background-image: url(images/portal-break.png);
- background-repeat: no-repeat;
- background-position: top right;
- }
- #mw-panel div.portal div.body ul {
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
- }
- #mw-panel div.portal div.body ul li {
- line-height: 1.125em;
- padding: 0;
- padding-bottom: 0.5em;
- margin: 0;
- overflow: hidden;
- font-size: 0.75em;
- }
- #mw-panel div.portal div.body ul li a {
- color: #0645ad;
- }
- #mw-panel div.portal div.body ul li a:visited {
- color: #0b0080;
- }
-/* Footer */
-#footer {
- margin-right: 10em;
- margin-top: 0;
- padding: 0.75em;
- background-image: url(images/border.png);
- background-position: top right;
- background-repeat: repeat-x;
-}
-#footer ul {
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-#footer ul li {
- margin: 0;
- padding: 0;
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- color: #333333;
- font-size: 0.7em;
-}
-#footer #footer-icons {
- float: left;
-}
-/* @noflip */
-body.ltr #footer #footer-places {
- float: left;
-}
-#footer #footer-info li {
- line-height: 1.4em;
-}
-#footer #footer-icons li {
- float: right;
- margin-right: 0.5em;
- line-height: 2em;
-}
-#footer #footer-places li {
- float: right;
- margin-left: 1em;
- line-height: 2em;
-}
-/* Logo */
-#p-logo {
- position: absolute;
- top: -160px;
- right: 0;
- width: 10em;
- height: 160px;
-}
-#p-logo a {
- display: block;
- width: 10em;
- height: 160px;
- background-repeat: no-repeat;
- background-position: center center;
- text-decoration: none;
-}
-
-/*
- *
- * The following code is highly modified from monobook. It would be nice if the
- * preftoc id was more human readable like preferences-toc for instance,
- * howerver this would require backporting the other skins.
- */
-
-/* Preferences */
-#preftoc {
- /* Tabs */
- width: 100%;
- float: right;
- clear: both;
- margin: 0 !important;
- padding: 0 !important;
- background-image: url(images/preferences-break.png);
- background-position: bottom right;
- background-repeat: no-repeat;
-}
- #preftoc li {
- /* Tab */
- float: right;
- margin: 0;
- padding: 0;
- padding-left: 1px;
- height: 2.25em;
- white-space: nowrap;
- list-style-type: none;
- list-style-image: none;
- background-image: url(images/preferences-break.png);
- background-position: bottom left;
- background-repeat: no-repeat;
- }
- /* IGNORED BY IE6 */
- #preftoc li:first-child {
- margin-right: 1px;
- }
- #preftoc a,
- #preftoc a:active {
- display: inline-block;
- position: relative;
- color: #0645ad;
- padding: 0.5em;
- text-decoration: none;
- background-image: none;
- font-size: 0.9em;
- }
- #preftoc a:hover {
- text-decoration: underline;
- }
- #preftoc li.selected a {
- background-image: url(images/preferences-fade.png);
- background-position: bottom;
- background-repeat: repeat-x;
- color: #333333;
- text-decoration: none;
- }
-#preferences {
- float: right;
- width: 100%;
- margin: 0;
- margin-top: -2px;
- clear: both;
- border: solid 1px #cccccc;
- background-color: #f9f9f9;
- background-image: url(images/preferences-base.png);
-}
-#preferences fieldset.prefsection {
- border: none;
- padding: 0;
- margin: 1em;
-}
-#preferences fieldset.prefsection fieldset {
- border: none;
- border-top: solid 1px #cccccc;
-}
-#preferences legend {
- color: #666666;
-}
-#preferences fieldset.prefsection legend.mainLegend {
- display: none;
-}
-#preferences td {
- padding-right: 0.5em;
- padding-left: 0.5em;
-}
-#preferences td.htmlform-tip {
- font-size: x-small;
- padding: .2em 2em;
- color: #666666;
-}
-#preferences div.mw-prefs-buttons {
- padding: 1em;
-}
-#preferences div.mw-prefs-buttons input {
- margin-left: 0.25em;
-}
-
-/*
- * Styles for the user login and create account forms
- */
-#userlogin, #userloginForm {
- border: solid 1px #cccccc;
- padding: 1.2em;
- margin: .5em;
- float: right;
-}
-
-#userlogin {
- min-width: 20em;
- max-width: 90%;
- width: 40em;
-}
-
-/*
- *
- * The following code is slightly modified from monobook
- *
- */
-#content {
- line-height: 1.5em;
-}
-#bodyContent {
- font-size: 0.8em;
-}
-/* Links */
-a {
- text-decoration: none;
- color: #0645ad;
- background: none;
-}
-a:visited {
- color: #0b0080;
-}
-a:active {
- color: #faa700;
-}
-a:hover {
- text-decoration: underline;
-}
-a.stub {
- color: #772233;
-}
-a.new, #p-personal a.new {
- color: #ba0000;
-}
-a.new:visited, #p-personal a.new:visited {
- color: #a55858;
-}
-
-/* Inline Elements */
-img {
- border: none;
- vertical-align: middle;
-}
-hr {
- height: 1px;
- color: #aaa;
- background-color: #aaa;
- border: 0;
- margin: .2em 0 .2em 0;
-}
-
-/* Structural Elements */
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- color: black;
- background: none;
- font-weight: normal;
- margin: 0;
- padding-top: .5em;
- padding-bottom: .17em;
- border-bottom: 1px solid #aaa;
- width: auto;
-}
-h1 { font-size: 188%; }
-h1 .editsection { font-size: 53%; }
-h2 { font-size: 150%; }
-h2 .editsection { font-size: 67%; }
-h3,
-h4,
-h5,
-h6 {
- border-bottom: none;
- font-weight: bold;
-}
-h3 { font-size: 132%; }
-h3 .editsection { font-size: 76%; font-weight: normal; }
-h4 { font-size: 116%; }
-h4 .editsection { font-size: 86%; font-weight: normal; }
-h5 { font-size: 100%; }
-h5 .editsection { font-weight: normal; }
-h6 { font-size: 80%; }
-h6 .editsection { font-size: 125%; font-weight: normal; }
-p {
- margin: .4em 0 .5em 0;
- line-height: 1.5em;
-}
- p img {
- margin: 0;
- }
-abbr,
-acronym,
-.explain {
- border-bottom: 1px dotted black;
- color: black;
- background: none;
- cursor: help;
-}
-q {
- font-family: Times, "Times New Roman", serif;
- font-style: italic;
-}
-/* Disabled for now
-blockquote {
- font-family: Times, "Times New Roman", serif;
- font-style: italic;
-}*/
-code {
- background-color: #f9f9f9;
-}
-pre {
- padding: 1em;
- border: 1px dashed #2f6fab;
- color: black;
- background-color: #f9f9f9;
- line-height: 1.1em;
-}
-ul {
- line-height: 1.5em;
- list-style-type: square;
- margin: .3em 1.5em 0 0;
- padding: 0;
- list-style-image: url(images/bullet-icon.png);
-}
-ol {
- line-height: 1.5em;
- margin: .3em 3.2em 0 0;
- padding: 0;
- list-style-image: none;
-}
-li {
- margin-bottom: .1em;
-}
-dt {
- font-weight: bold;
- margin-bottom: .1em;
-}
-dl {
- margin-top: .2em;
- margin-bottom: .5em;
-}
-dd {
- line-height: 1.5em;
- margin-right: 2em;
- margin-bottom: .1em;
-}
-/* Tables */
-table {
- font-size: 100%;
- color: black;
- /* we don't want the bottom borders of <h2>s to be visible through
- * floated tables */
- background-color: white;
-}
-fieldset table {
- /* but keep table layouts in forms clean... */
- background: none;
-}
-/* Forms */
-fieldset {
- border: 1px solid #2f6fab;
- margin: 1em 0 1em 0;
- padding: 0 1em 1em;
- line-height: 1.5em;
-}
- fieldset.nested {
- margin: 0 0 0.5em 0;
- padding: 0 0.5em 0.5em;
- }
-legend {
- padding: .5em;
- font-size: 95%;
-}
-form {
- border: none;
- margin: 0;
-}
-textarea {
- width: 100%;
- padding: .1em;
-}
-select {
- vertical-align: top;
-}
-/* Table of Contents */
-#toc,
-.toc,
-.mw-warning {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- padding: 5px;
- font-size: 95%;
-}
-#toc h2,
-.toc h2 {
- display: inline;
- border: none;
- padding: 0;
- font-size: 100%;
- font-weight: bold;
-}
-#toc #toctitle,
-.toc #toctitle,
-#toc .toctitle,
-.toc .toctitle {
- text-align: center;
-}
-#toc ul,
-.toc ul {
- list-style-type: none;
- list-style-image: none;
- margin-right: 0;
- padding-right: 0;
- text-align: right;
-}
-#toc ul ul,
-.toc ul ul {
- margin: 0 2em 0 0;
-}
-#toc .toctoggle,
-.toc .toctoggle {
- font-size: 94%;
-}
-/* Images */
-div.floatright, table.floatright {
- clear: left;
- float: left;
- position: relative;
- margin: 0 .5em .5em 0;
- border: 0;
-}
-div.floatright p { font-style: italic; }
-div.floatleft, table.floatleft {
- float: right;
- clear: right;
- position: relative;
- margin: 0 0 .5em .5em;
- border: 0;
-}
-div.floatleft p { font-style: italic; }
-/* Thumbnails */
-div.thumb {
- margin-bottom: .5em;
- border-style: solid;
- border-color: white;
- width: auto;
- background-color: transparent;
-}
-div.thumbinner {
- border: 1px solid #ccc;
- padding: 3px !important;
- background-color: #f9f9f9;
- font-size: 94%;
- text-align: center;
- overflow: hidden;
-}
-html .thumbimage {
- border: 1px solid #ccc;
-}
-html .thumbcaption {
- border: none;
- text-align: right;
- line-height: 1.4em;
- padding: 3px !important;
- font-size: 94%;
-}
-div.magnify {
- float: left;
- border: none !important;
- background: none !important;
-}
-div.magnify a, div.magnify img {
- display: block;
- border: none !important;
- background: none !important;
-}
-div.tright {
- clear: left;
- float: left;
- border-width: .5em 1.4em .8em 0;
-}
-div.tleft {
- float: right;
- clear: right;
- margin-left: .5em;
- border-width: .5em 0 .8em 1.4em;
-}
-img.thumbborder {
- border: 1px solid #dddddd;
-}
-.hiddenStructure {
- display: none;
-}
-/* Warning */
-.mw-warning {
- margin-right: 50px;
- margin-left: 50px;
- text-align: center;
-}
-/* User Message */
-.usermessage {
- background-color: #ffce7b;
- border: 1px solid #ffa500;
- color: black;
- font-weight: bold;
- margin: 2em 0 1em;
- padding: .5em 1em;
- vertical-align: middle;
-}
-/* Site Notice */
-#siteNotice {
- text-align: center;
- font-size: 0.8em;
- margin: 0;
-}
- #siteNotice div,
- #siteNotice p {
- margin: 0;
- padding: 0;
- margin-bottom: 0.9em;
- }
-/* Categories */
-.catlinks {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- padding: 5px;
- margin-top: 1em;
- clear: both;
-}
-/* Sub-navigation */
-#siteSub {
- display: none;
-}
-#jump-to-nav {
- display: none;
-}
-#contentSub, #contentSub2 {
- font-size: 84%;
- line-height: 1.2em;
- margin: 0 1em 1.4em 0;
- color: #7d7d7d;
- width: auto;
-}
-span.subpages {
- display: block;
-}
-/* Emulate Center */
-.center {
- width: 100%;
- text-align: center;
-}
-*.center * {
- margin-right: auto;
- margin-left: auto;
-}
-/* Small for tables and similar */
-.small, .small * {
- font-size: 94%;
-}
-table.small {
- font-size: 100%;
-}
-/* Edge Cases for Content */
-h1, h2 {
- margin-bottom: .6em;
-}
-h3, h4, h5 {
- margin-bottom: .3em;
-}
-#firstHeading {
- padding-top: 0;
- margin-top: 0;
- padding-top: 0;
- margin-bottom: 0.1em;
- line-height: 1.2em;
- font-size: 1.6em;
- padding-bottom: 0;
-}
-#content a.external,
-#content a[href ^="gopher://"] {
- background: url(images/external-link-rtl-icon.png) center left no-repeat;
- padding: 0 0 0 13px;
-}
-#content a[href ^="https://"],
-.link-https {
- background: url(images/lock-icon.png) center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a[href ^="mailto:"],
-.link-mailto {
- background: url(images/mail-icon.png) center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a[href ^="news://"] {
- background: url(images/news-icon.png) center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a[href ^="ftp://"],
-.link-ftp {
- background: url(images/file-icon.png) center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a[href ^="irc://"],
-#content a.extiw[href ^="irc://"],
-.link-irc {
- background: url(images/talk-icon.png) center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a.external[href $=".ogg"], #content a.external[href $=".OGG"],
-#content a.external[href $=".mid"], #content a.external[href $=".MID"],
-#content a.external[href $=".midi"], #content a.external[href $=".MIDI"],
-#content a.external[href $=".mp3"], #content a.external[href $=".MP3"],
-#content a.external[href $=".wav"], #content a.external[href $=".WAV"],
-#content a.external[href $=".wma"], #content a.external[href $=".WMA"],
-.link-audio {
- background: url("images/audio-icon.png") center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a.external[href $=".ogm"], #content a.external[href $=".OGM"],
-#content a.external[href $=".avi"], #content a.external[href $=".AVI"],
-#content a.external[href $=".mpeg"], #content a.external[href $=".MPEG"],
-#content a.external[href $=".mpg"], #content a.external[href $=".MPG"],
-.link-video {
- background: url("images/video-icon.png") center left no-repeat;
- padding: 0 0 0 18px;
-}
-#content a.external[href $=".pdf"], #content a.external[href $=".PDF"],
-#content a.external[href *=".pdf#"], #content a.external[href *=".PDF#"],
-#content a.external[href *=".pdf?"], #content a.external[href *=".PDF?"],
-.link-document {
- background: url("images/document-icon.png") center left no-repeat;
- padding: 0 0 0 18px;
-}
-/* Interwiki Styling (Disabled) */
-#content a.extiw,
-#content a.extiw:active {
- color: #36b;
- background: none;
- padding: 0;
-}
-#content a.external {
- color: #36b;
-}
-#content .printfooter {
- display: none;
-}
-/* Icon for Usernames */
-#pt-userpage,
-#pt-anonuserpage,
-#pt-login {
- background: url(images/user-icon.png) right top no-repeat;
- padding-right: 15px !important;
- text-transform: none;
-}
-
-.toccolours {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- padding: 5px;
- font-size: 95%;
-}
-#bodyContent {
- position: relative;
- width: 100%;
-}
-#mw-js-message {
- font-size: 0.8em;
-}
-div#bodyContent {
- line-height: 1.5em;
-}
-
-/* Watch/Unwatch Icon Styling */
-#ca-unwatch.icon,
-#ca-watch.icon {
- margin-left:1px;
-}
-#ca-unwatch.icon a,
-#ca-watch.icon a {
- margin: 0;
- padding: 0;
- outline: none;
- display: block;
- width: 26px;
- height: 2.5em;
-}
-#ca-unwatch.icon a {
- background-image: url(images/watch-icons.png);
- background-position: -43px 60%;
-}
-#ca-watch.icon a {
- background-image: url(images/watch-icons.png);
- background-position: 5px 60%;
-}
-#ca-unwatch.icon a:hover {
- background-image: url(images/watch-icons.png);
- background-position: -67px 60%;
-}
-#ca-watch.icon a:hover {
- background-image: url(images/watch-icons.png);
- background-position: -19px 60%;
-}
-#ca-unwatch.icon a.loading,
-#ca-watch.icon a.loading {
- background-image: url(images/watch-icon-loading.gif);
- background-position: center 60%;
-}
-#ca-unwatch.icon a span,
-#ca-watch.icon a span {
- display: none;
-}
-div.vectorTabs ul {
- background-image:url(images/tab-break.png);
- background-position:left bottom;
- background-repeat:no-repeat;
-}
+++ /dev/null
-<noinclude>
-This is the "Annotation" template.
-It should be called in the following format:
-<pre>
-{{Annotation
-|Species Name=
-|Species ID=
-|Gene Symbol=
-|Gene Name=
-|Gene Locus=
-|Gene Type=
-|EC Number(s)=
-|Chromosome=
-|Has Phenotype=
-|Annotation Description=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>__NOTOC__
-<font size=6 color="#67536c">'''[[Has Gene Symbol::{{{Gene Symbol|}}}]] (''[[Has Species Name::{{{Species Name|}}}]]'')'''</font>
-
-{{#get_web_data:
- |url=http://eutils.ncbi.nlm.nih.gov/entrez/eutils//esearch.fcgi?db=taxonomy&term={{{Species Name|}}}
- |format=XML
- |data=species_id=id
-}}
-{{#set:Has Species ID={{#external_value:species_id}} }}
-
-= Annotation =
-
-{| class="wikitable"
-! Species Name
-| [[Has Species Name::{{{Species Name|}}}]]
-|-
-! Species ID
-| NCBI:[[Has Species ID::{{#external_value:species_id}}]]
-|-
-! Gene Symbol
-| [[Has Gene Symbol::{{{Gene Symbol|}}}]]
-|-
-! Gene Name
-| [[Has Gene Name::{{{Gene Name|}}}]]
-|-
-! Gene Synonyms
-| {{#if: {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | {{#ask:[[Category:Gene_Synonyms]][[Is Associated With Annotation::{{PAGENAME}}]]
- | ?is_Gene_Synonym
- | headers=hide
- | mainlabel=-
- | format=list
- }}
- | None available
-}}
-|-
-! Gene Locus
-| [[Has Gene Locus::{{{Gene Locus|}}}]]
-|-
-! Gene Type
-| [[Has Gene Type::{{{Gene Type|}}}]]
-|-
-! EC number(s)
-| {{#arraymap:{{{EC Numbers|}}}|,|x|[[Has EC Numbers::x]]}}
-|-
-! Chromosome
-| [[Exists On Chromosome Number::{{{Chromosome|}}}]]
-|-
-! Has Phenotype?
-| [[Has Phenotype::{{{Has Phenotype|}}}]]
-|}
-
-{| class="wikitable"
-! Description
-| [[Has Annotation Description::{{{Annotation Description|}}}]]
-|}
-
-{{#ifexist: {{PAGENAME}}/Provenance
- | To review the provenance of this data, click [[{{PAGENAME}}/Provenance|here]].
- |
-}}
-
-= External References =
-
-{{#if: {{#ask:[[Category:External_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | {{#ask:[[Is External Reference::~{{PAGENAME}}/External_References]]
- | mainlabel=-
- |? from_External_Source
- |? has_External_Accession_ID
- }}
- | There are no external references available for this annotation.
-}}
-
-= Ontologies =
-
-{{#if: {{#ask:[[Category:Ontological_References]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | {{#ask:[[Is Ontological Reference::~{{PAGENAME}}/Ontologies]]
- | mainlabel=-
- |? from_Ontology
- |? has_Term_ID
- |? has_Term_Name
- |? has_Aspect
- |? has_Evidence_Code
- |? has_Evidence
- }}
- | There are no ontological associations available for this gene annotation.
-}}
-
-= Sequences =
-
-{{#if: {{#ask:[[Category:Sequences]][[Is Associated With Annotation::{{PAGENAME}} ]] }}
- | {{#ask:[[Is Sequence Reference::~{{PAGENAME}}/Sequences]]
- | mainlabel=-
- |? has_Sequence_Type
- |? has_Sequence_Source
- |? has_External_Accession_ID
- }}
- | There is no sequence data available for this gene annotation.
-}}
-
-= Literature =
-
-{{#if: {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] }}
- | {{#ask:[[Category:Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]] OR [[Category:Reference Publications]][[Is Associated With Annotations::~*{{PAGENAME}}* ]]
- |? has First Author
- |? has Publication Title
- |? has Journal Name
- |? has Publication ID
- }}
- | There are no publications associated with this annotation.
-}}
-<headertabs/>
-[[Category:Annotations]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "External Reference Repeater" template.
-It should be called in the following format:
-<pre>
-{{External Reference Repeater
-|External Source=
-|External Accession ID=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{{#set_internal:is_External_Reference
-|from_External_Source={{{External Source|}}}
-|has_External_Accession_ID={{{External Accession ID|}}}
-}}
-
-{| class="wikitable"
-! Source
-| [[From External Source::{{{External Source|}}}]]
-|-
-! Accession ID
-| [[Has External Accession ID::{{{External Accession ID|}}}]]
-|}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "External References" template.
-It should be called in the following format:
-<pre>
-{{External References
-|Annotation Page=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Annotation Page
-| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
-|}
-
-[[Category:External References]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Gene Ontology Reference Repeater" template.
-It should be called in the following format:
-<pre>
-{{Gene Ontology Reference Repeater
-|Term ID=
-|Term Name=
-|Aspect=
-|Evidence Code=
-|Evidence=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{{#get_web_data:
- |url=http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&field={{#if:{{{Term Name|}}}|name|acc}}&type=term_detail&ontology=go&qval={{#if:{{{Term Name|}}}|{{{Term Name|}}}|{{{Term ID|}}}}}&format=json
- |format=JSON
- |data=term_name=name,term_id=id,term_aspect=aspect,term_definition=definition,term_comment=comment
-}}
-{{#set_internal:is_Ontological_Reference
-|from_Ontology=Gene Ontology
-|has_Term_ID={{#external_value:term_id}}
-|has_Term_Name={{#external_value:term_name}}
-|has_Aspect={{#external_value:term_aspect}}
-|has_Evidence_Code#list={{{Evidence Code|}}}
-|has_Evidence#list={{{Evidence|}}}
-}}
-{| class="wikitable"
-! Ontology
-| Gene Ontology
-|-
-! Term Name
-| [[Has Term Name::{{#external_value:term_name}}]]
-|-
-! Term ID
-| [[Has Term ID::{{#external_value:term_id}}]]
-|-
-! Branch
-| {{#external_value:term_aspect}}
-|-
-! Definition
-| {{#external_value:term_definition}}
-{{#if: {{#external_value:term_comment}}
- | {{!}}-
-! Comment
-{{!}} {{#external_value:term_comment}}
- |
-}}
-|-
-! Evidence Code
-| {{#arraymap:{{{Evidence Code|}}}|,|x|[[Has Evidence Code::x]]}}
-|-
-! Evidence
-| {{#arraymap:{{{Evidence|}}}|,|x|[[Has Evidence::x]]}}
-|}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Gene Synonym Repeater" template.
-It should be called in the following format:
-<pre>
-{{Gene Synonym Repeater
-|Gene Synonym=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{| class="wikitable"
-! Gene Synonym
-| [[Is Gene Synonym::{{{Gene Synonym|}}}]]
-|}<nowiki/></includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Gene Synonyms" template.
-It should be called in the following format:
-<pre>
-{{Gene Synonyms
-|Annotation Page=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Annotation Page
-| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
-|-
-! Gene Name
-| {{#show: {{{Annotation Page|}}}|?has_Gene_Name}}
-|}
-
-[[Category:Gene Synonyms]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Ontological Reference Repeater" template.
-It should be called in the following format:
-<pre>
-{{Ontological Reference Repeater
-|Ontology=
-|Term ID=
-|Term Name=
-|Aspect=
-|Evidence Code=
-|Evidence=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{{#set_internal:is_Ontological_Reference
-|from_Ontology={{{Ontology|}}}
-|has_Term_ID={{{Term ID|}}}
-|has_Term_Name={{{Term Name|}}}
-|has_Aspect={{{Aspect|}}}
-|has_Evidence_Code#list={{{Evidence Code|}}}
-|has_Evidence#list={{{Evidence|}}}
-}}
-{| class="wikitable"
-! Ontology
-| [[From Ontology::{{{Ontology|}}}]]
-|-
-! Term Name
-| [[Has Term Name::{{{Term Name|}}}]]
-|-
-! Term ID
-| [[Has Term ID::{{{Term ID|}}}]]
-|-
-! Branch
-| [[Has Aspect::{{{Aspect|}}}]]
-|-
-! Evidence Code
-| {{#arraymap:{{{Evidence Code|}}}|,|x|[[Has Evidence Code::x]]}}
-|-
-! Evidence
-| {{#arraymap:{{{Evidence|}}}|,|x|[[Has Evidence::x]]}}
-|}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Ontological References" template.
-It should be called in the following format:
-<pre>
-{{Ontological References
-|Annotation Page=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Annotation Page
-| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
-|}
-
-[[Category:Ontological References]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Plant Ontology Reference Repeater" template.
-It should be called in the following format:
-<pre>
-{{Plant Ontology Reference Repeater
-|Term ID=
-|Term Name=
-|Aspect=
-|Evidence Code=
-|Evidence=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{{#get_web_data:
- |url=http://dev.planteome.org/w/services/TermSearch_JSON.php?user=paw&field={{#if:{{{Term Name|}}}|name|acc}}&type=term_detail&ontology=po&qval={{#if:{{{Term Name|}}}|{{{Term Name|}}}|{{{Term ID|}}}}}&format=json
- |format=JSON
- |data=term_name=name,term_id=id,term_aspect=aspect,term_definition=definition,term_comment=comment
-}}
-{{#set_internal:is_Ontological_Reference
-|from_Ontology=Plant Ontology
-|has_Term_ID={{#external_value:term_id}}
-|has_Term_Name={{#external_value:term_name}}
-|has_Aspect={{#external_value:term_aspect}}
-|has_Evidence_Code#list={{{Evidence Code|}}}
-|has_Evidence#list={{{Evidence|}}}
-}}
-[[Has Term Search Type::{{{Term Search Type|}}}]]
-{| class="wikitable"
-! Ontology
-| Plant Ontology
-|-
-! Term Name
-| [[Has Term Name::{{#external_value:term_name}}]]
-|-
-! Term ID
-| [[Has Term ID::{{#external_value:term_id}}]]
-|-
-! Branch
-| [[Has Aspect::{{#external_value:term_aspect}}]]
-|-
-! Definition
-| {{#external_value:term_definition}}
-{{#if: {{#external_value:term_comment}}
- | {{!}}-
-! Comment
-{{!}} {{#external_value:term_comment}}
- |
-}}
-|-
-! Evidence Code
-| {{#arraymap:{{{Evidence Code|}}}|,|x|[[Has Evidence Code::x]]}}
-|-
-! Evidence
-| {{#arraymap:{{{Evidence|}}}|,|x|[[Has Evidence::x]]}}
-|}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Provenance" template.
-It should be called in the following format:
-<pre>
-{{Provenance
-|Annotation Page=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Annotation
-| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
-|}
-
-[[Category:Provenance]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Provenance Repeater" template.
-It should be called in the following format:
-<pre>
-{{Provenance Repeater
-|Source=
-|Source Accession ID=
-|Source Category=
-|Source Field or Object=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{{#set_internal:is_Provenance
-|has_Source={{{Source|}}}
-|has_Source_Accession_ID={{{Source Accession ID|}}}
-|is_Associated_With_Field_Or_Object={{{Source Field or Object|}}}
-|is_Associated_With_Category={{{Source Category|}}} }}
-
-{| class="wikitable"
-! Source
-| [[Has Source::{{{Source|}}}]]
-|-
-! Accession ID
-| [[Has Source Accession ID::{{{Source Accession ID|}}}]]
-|-
-! Field
-| [[Is Associated With Field Or Object::{{{Source Field or Object|}}}]] (''Category'': {{{Source Category|}}})
-|}<nowiki/></includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Publication" template.
-It should be called in the following format:
-<pre>
-{{Publication
-|Publication=
-|Publication ID=
-|Publication Title=
-|First Author=
-|Journal Name=
-|Volume=
-|Year=
-|Pages=
-|Annotation References=
-|New Annotation Reference=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Publication
-| [[Has Publication Type::{{{Publication|}}}]]
-|-
-! Publication Identifier
-| [[Has Publication ID::{{{Publication ID|}}}]]
-|-
-! Publication Title
-| [[Has Publication Title::{{{Publication Title|}}}]]
-|-
-! First Author
-| [[Has First Author::{{{First Author|}}}]]
-|-
-! Journal Name
-| [[Has Journal Name::{{{Journal Name|}}}]]
-|-
-! Volume
-| [[Has Publication Volume::{{{Volume|}}}]]
-|-
-! Year
-| [[Has Publication Year::{{{Year|}}}]]
-|-
-! Pages
-| [[Has Publication Pages::{{{Pages|}}}]]
-|-
-! Annotation References
-| {{#arraymap:{{{Annotation References|}}}|,|x|[[Is Associated With Annotations::x]]}}
-|-
-! New Annotation Reference (to be hidden)
-| [[Has New Annotation Association::{{{New Annotation Reference|}}}]]
-|}
-
-[[Category:Publications]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Reference Publication" template.
-It should be called in the following format:
-<pre>
-{{Reference Publication
-|Publication=
-|Publication ID=
-|Publication Title=
-|First Author=
-|Journal Name=
-|Volume=
-|Year=
-|Pages=
-|Annotation References=
-|New Annotation Reference=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-
-{{#get_web_data:
-url=http://dev.planteome.org/w/services/NCBI_eDocSummary.php?pub_id={{{Publication ID|}}}
-|format=XML
-|data=pub_id=Id,year=PubDate,first_author=LastAuthor,journal_name=FullJournalName,title=Title,volume=Volume,pages=Pages
-}}
-
-{| class="wikitable"
-! Publication Catalogue
-| [[Has Publication Type::{{{Publication|}}}]]
-|-
-! Publication Identifier
-| [[Has Publication ID::{{{Publication ID|}}}]]
-|-
-! Publication Title
-| [[Has Publication Title::{{#for_external_table:{{{title}}} }}]]
-|-
-! First Author
-| [[Has First Author::{{#for_external_table:{{{first_author}}} }}]]
-|-
-! Journal Name
-| [[Has Journal Name::{{#for_external_table:{{{journal_name}}} }}]]
-|-
-! Volume
-| [[Has Publication Volume::{{#for_external_table:{{{volume}}} }}]]
-|-
-! Year
-| [[Has Publication Year::{{#for_external_table:{{{year}}} }}]]
-|-
-! Pages
-| [[Has Publication Pages::{{#for_external_table:{{{pages}}} }}]]
-|-
-! Annotation References
-| {{#arraymap:{{{Annotation References|}}}|,|x|[[Is Associated With Annotations::x]]}}
-|}
-
-<!--[[Has New Annotation Association::{{{New Annotation Reference|}}}]]-->
-
-[[Category:Reference Publications]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Sequence Repeater" template.
-It should be called in the following format:
-<pre>
-{{Sequence Repeater
-|Sequence Type=
-|Sequence Source=
-|External Accession ID=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>{{#set_internal:is_Sequence_Reference
-|has_Sequence_Type={{{Sequence Type}}}
-|has_Sequence_Source={{{Sequence Source|}}}
-|has_External_Accession_ID={{{External Accession ID|}}}
-}}
-{| class="wikitable"
-! Sequence Type
-| [[Has Sequence Type::{{{Sequence Type|}}}]]
-|-
-! Sequence Source
-| [[Has Sequence Source::{{{Sequence Source|}}}]]
-|-
-! Accession ID
-| [[Has External Accession ID::{{{External Accession ID|}}}]]
-|}
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Sequences" template.
-It should be called in the following format:
-<pre>
-{{Sequences
-|Annotation Page=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Annotation Page
-| [[Is Associated With Annotation::{{{Annotation Page|}}}]]
-|}
-
-[[Category:Sequences]]
-</includeonly>
-
+++ /dev/null
-<noinclude>
-This is the "Source" template.
-It should be called in the following format:
-<pre>
-{{Source
-|Source Date Stamp=
-|Source Database=
-|Source Version=
-|Source URI=
-|Source File=
-}}
-</pre>
-Edit the page to see the template text.
-</noinclude><includeonly>
-{| class="wikitable"
-! Release Date
-| [[Has Date Stamp::{{{Source Date Stamp|}}}]]
-|-
-! Data Source
-| [[Has Source Database::{{{Source Database|}}}]]
-|-
-! Version
-| [[Has Source Version::{{{Source Version|}}}]]
-|-
-! Web Address
-| [[From Source URI::{{{Source URI|}}}]]
-|-
-! File
-| [[From Source File::{{{Source File|}}}]]
-|}
-
-[[Category:Sources]]
-</includeonly>
-