Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/117677
Change subject: Consistency tweaks ...................................................................... Consistency tweaks * Use single quotes in i18n file * Image -> File * Add FIXME for message documentation * Fix extension type Change-Id: I0ed44a981862df277f7396fbc79b45bbf59b156b --- M PGFTikZ.i18n.php M PGFTikZ.php 2 files changed, 59 insertions(+), 61 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PGFTikZ refs/changes/77/117677/1 diff --git a/PGFTikZ.i18n.php b/PGFTikZ.i18n.php index 2c07773..73539f6 100644 --- a/PGFTikZ.i18n.php +++ b/PGFTikZ.i18n.php @@ -11,78 +11,76 @@ * @author thibault marin */ $messages['en'] = array( - // Description - 'pgftikz-desc' => "Render PGF/TikZ graphs in wiki", + 'pgftikz-desc' => 'Render PGF/TikZ graphs in wiki', // Error messages 'pgftikz-error-title' => 'PGFTikZ parser error:', - 'pgftikz-error-emptyinput' => "Empty input.", - 'pgftikz-error-imagelineparse' => "Could not parse image line, expected something like ([[Image:image_file_name.ext|image link]]).", - 'pgftikz-error-apigetpagecontent' => "Could not get image page content for comparision.", - 'pgftikz-error-apiedit' => "Could not update file wikipage.", - 'pgftikz-error-apidelete' => "Could not delete preview wikipage.", - 'pgftikz-error-nonpgffile' => "Existing file is not PGFTikZ-generated, not overwriting.", - 'pgftikz-error-preambleparse' => "Error parsing LaTeX preamble.", - 'pgftikz-error-tmpdircreate' => "Error creating temporary folder.", - 'pgftikz-error-texfilecreate' => "Error creating LaTeX source file.", - 'pgftikz-error-latexnoout' => "Error when running LaTeX (no output, is latex present?).", - 'pgftikz-error-latexcompil' => "Error when running LaTeX (compilation error).", - 'pgftikz-error-dvipsnoout' => "Error when running dvips (no output, is dvips present?).", - 'pgftikz-error-dvipscompil' => "Error when running dvips (runtime error).", - 'pgftikz-error-epstoolnoout' => "Error when running epstool (no output, is epstool present?).", - 'pgftikz-error-epstoolrun' => "Error when running epstool (runtime error).", - 'pgftikz-error-convertnoout' => "Error when running convert (no output, is convert present?).", - 'pgftikz-error-convertrun' => "Error when running convert (runtime).", + 'pgftikz-error-emptyinput' => 'Empty input.', + 'pgftikz-error-imagelineparse' => 'Could not parse image line, expected something like ([[File:Image file name.ext|file link]]).', + 'pgftikz-error-apigetpagecontent' => 'Could not get image page content for comparision.', + 'pgftikz-error-apiedit' => 'Could not update file wikipage.', + 'pgftikz-error-apidelete' => 'Could not delete preview wikipage.', + 'pgftikz-error-nonpgffile' => 'Existing file is not PGF/TikZ-generated, not overwriting.', + 'pgftikz-error-preambleparse' => 'Error parsing LaTeX preamble.', + 'pgftikz-error-tmpdircreate' => 'Error creating temporary folder.', + 'pgftikz-error-texfilecreate' => 'Error creating LaTeX source file.', + 'pgftikz-error-latexnoout' => 'Error when running LaTeX (no output, is latex present?).', + 'pgftikz-error-latexcompil' => 'Error when running LaTeX (compilation error).', + 'pgftikz-error-dvipsnoout' => 'Error when running dvips (no output, is dvips present?).', + 'pgftikz-error-dvipscompil' => 'Error when running dvips (runtime error).', + 'pgftikz-error-epstoolnoout' => 'Error when running epstool (no output, is epstool present?).', + 'pgftikz-error-epstoolrun' => 'Error when running epstool (runtime error).', + 'pgftikz-error-convertnoout' => 'Error when running convert (no output, is convert present?).', + 'pgftikz-error-convertrun' => 'Error when running convert (runtime).', - 'pgftikz-error-uploadlocal_error_empty' => "Error during upload (empty file).", - 'pgftikz-error-uploadlocal_error_missing' => "Error during upload (filetype missing).", - 'pgftikz-error-uploadlocal_error_badtype' => "Error during upload (bad filetype).", - 'pgftikz-error-uploadlocal_error_tooshort' => "Error during upload (filename too short).", - 'pgftikz-error-uploadlocal_error_illegal' => "Error during upload (illegal filename).", - 'pgftikz-error-uploadlocal_error_overwrite' => "Error during upload (overwrite).", - 'pgftikz-error-uploadlocal_error_verify' => "Error during upload (verification error).", - 'pgftikz-error-uploadlocal_error_hook' => "Error during upload (hook aborted).", - 'pgftikz-error-uploadlocal_error_unknown' => "Error during upload (unknown error)." - + 'pgftikz-error-uploadlocal_error_empty' => 'Error during upload (empty file).', + 'pgftikz-error-uploadlocal_error_missing' => 'Error during upload (filetype missing).', + 'pgftikz-error-uploadlocal_error_badtype' => 'Error during upload (bad filetype).', + 'pgftikz-error-uploadlocal_error_tooshort' => 'Error during upload (filename too short).', + 'pgftikz-error-uploadlocal_error_illegal' => 'Error during upload (illegal filename).', + 'pgftikz-error-uploadlocal_error_overwrite' => 'Error during upload (overwrite).', + 'pgftikz-error-uploadlocal_error_verify' => 'Error during upload (verification error).', + 'pgftikz-error-uploadlocal_error_hook' => 'Error during upload (hook aborted).', + 'pgftikz-error-uploadlocal_error_unknown' => 'Error during upload (unknown error).' ); /** Message documentation * @author thibault marin */ $messages['qqq'] = array( - 'pgftikz' => "PGFTikZ parser", - 'pgftikz-desc' => "{{desc}}", - - 'pgftikz-error-title' => "Generic title message displayed before the actual reported error", + 'pgftikz-desc' => '{{desc}}', + 'pgftikz-error-title' => 'Generic title message displayed before the actual reported error', // Errors - 'pgftikz-error-emptyinput' => "Displayed when parsing input and finding no text between <PGFTikZ> tags.", - 'pgftikz-error-imagelineparse' => "Displayed when extraction of filename from image entry line (e.g. [[Image:filename.png]]) failed.", - 'pgftikz-error-apigetpagecontent' => "Displayed when API call to get existing file failed.", - 'pgftikz-error-apiedit' => "Displayed when API call failed to edit wikipage associated with uploaded image.", - 'pgftikz-error-apidelete' => "Displayed when API call to delete preview wikipage.", - 'pgftikz-error-nonpgffile' => "Displayed when a file with the target name was found, but the PGFTikZ header was not found (possibly a non PGFTikZ-generated file).", - 'pgftikz-error-preambleparse' => "<PGFTikZPreamble> tags not found in input.", - 'pgftikz-error-tmpdircreate' => "Displayed when temporary folder creation failed.", - 'pgftikz-error-texfilecreate' => "Error creating LaTeX source file.", - 'pgftikz-error-latexnoout' => "Error when running LaTeX (no output).", - 'pgftikz-error-latexcompil' => "Error when running LaTeX (compilation error).", - 'pgftikz-error-dvipsnoout' => "Error when running dvips (no output).", - 'pgftikz-error-dvipscompil' => "Error when running dvips (runtime error).", - 'pgftikz-error-epstoolnoout' => "Error when running epstool (no output).", - 'pgftikz-error-epstoolrun' => "Error when running epstool (runtime error).", - 'pgftikz-error-convertnoout' => "Error when running convert (no output).", - 'pgftikz-error-convertrun' => "Error when running convert (runtime).", + 'pgftikz-error-emptyinput' => 'Displayed when parsing input and finding no text between <PGFTikZ> tags.', + 'pgftikz-error-imagelineparse' => 'Displayed when extraction of filename from image entry line (e.g. [[Image:filename.png]]) failed.', + 'pgftikz-error-apigetpagecontent' => 'Displayed when API call to get existing file failed.', + 'pgftikz-error-apiedit' => 'Displayed when API call failed to edit wikipage associated with uploaded image.', + 'pgftikz-error-apidelete' => 'Displayed when API call to delete preview wikipage.', + 'pgftikz-error-nonpgffile' => 'Displayed when a file with the target name was found, but the PGFTikZ header was not found (possibly a non PGFTikZ-generated file).', + 'pgftikz-error-preambleparse' => '<PGFTikZPreamble> tags not found in input.', + 'pgftikz-error-tmpdircreate' => 'Displayed when temporary folder creation failed.', - 'pgftikz-error-uploadlocal_error_empty' => "Error during upload (empty file).", - 'pgftikz-error-uploadlocal_error_missing' => "Error during upload (filetype missing).", - 'pgftikz-error-uploadlocal_error_badtype' => "Error during upload (bad filetype).", - 'pgftikz-error-uploadlocal_error_tooshort' => "Error during upload (filename too short).", - 'pgftikz-error-uploadlocal_error_illegal' => "Error during upload (illegal filename).", - 'pgftikz-error-uploadlocal_error_overwrite' => "Error during upload (overwrite).", - 'pgftikz-error-uploadlocal_error_verify' => "Error during upload (verification error).", - 'pgftikz-error-uploadlocal_error_hook' => "Error during upload (hook aborted).", - 'pgftikz-error-uploadlocal_error_unknown' => "Error during upload (unknown error)." + # FIXME: Replace with real message documentation. Below are copies of the messages +# 'pgftikz-error-texfilecreate' => 'Error creating LaTeX source file.', +# 'pgftikz-error-latexnoout' => 'Error when running LaTeX (no output).', +# 'pgftikz-error-latexcompil' => 'Error when running LaTeX (compilation error).', +# 'pgftikz-error-dvipsnoout' => 'Error when running dvips (no output).', +# 'pgftikz-error-dvipscompil' => 'Error when running dvips (runtime error).', +# 'pgftikz-error-epstoolnoout' => 'Error when running epstool (no output).', +# 'pgftikz-error-epstoolrun' => 'Error when running epstool (runtime error).', +# 'pgftikz-error-convertnoout' => 'Error when running convert (no output).', +# 'pgftikz-error-convertrun' => 'Error when running convert (runtime).', +# 'pgftikz-error-uploadlocal_error_empty' => 'Error during upload (empty file).', +# 'pgftikz-error-uploadlocal_error_missing' => 'Error during upload (filetype missing).', +# 'pgftikz-error-uploadlocal_error_badtype' => 'Error during upload (bad filetype).', +# 'pgftikz-error-uploadlocal_error_tooshort' => 'Error during upload (filename too short).', +# 'pgftikz-error-uploadlocal_error_illegal' => 'Error during upload (illegal filename).', +# 'pgftikz-error-uploadlocal_error_overwrite' => 'Error during upload (overwrite).', +# 'pgftikz-error-uploadlocal_error_verify' => 'Error during upload (verification error).', +# 'pgftikz-error-uploadlocal_error_hook' => 'Error during upload (hook aborted).', +# 'pgftikz-error-uploadlocal_error_unknown' => 'Error during upload (unknown error).' ); + diff --git a/PGFTikZ.php b/PGFTikZ.php index e2186b3..d0a7e4d 100644 --- a/PGFTikZ.php +++ b/PGFTikZ.php @@ -29,14 +29,14 @@ } // Extension credits that will show up on Special:Version -$wgExtensionCredits['validextensionclass'][] = array( +$wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'PGFTikZ', 'version' => '0.1', 'author' => 'Thibault Marin', 'url' => 'http://www.mediawiki.org/wiki/Extension:PGFTikZ', 'descriptionmsg' => 'pgftikz-desc' - ); +); /** * Extension class -- To view, visit https://gerrit.wikimedia.org/r/117677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ed44a981862df277f7396fbc79b45bbf59b156b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PGFTikZ Gerrit-Branch: master Gerrit-Owner: Raimond Spekking <raimond.spekk...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits