From 7132b7fbda7e5a140c0992d01e08cbc2f25963b5 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 25 Aug 2014 20:32:05 +0200 Subject: Fix #9: Add 'Preview generated wikitext' button to export dialog. --- mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua | 12 ++++++++++++ mediawiki.lrdevplugin/TranslatedStrings_de.txt | 1 + 2 files changed, 13 insertions(+) (limited to 'mediawiki.lrdevplugin') diff --git a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua index bd903f5..4eb1491 100755 --- a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua +++ b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua @@ -233,6 +233,18 @@ MediaWikiExportServiceProvider.sectionsForTopOfDialog = function(viewFactory, pr title = LOC '$$$/LrMediaWiki/Section/Licensing/Categories/Details=separate with ;', }, }, + + viewFactory:row { + spacing = viewFactory:control_spacing(), + + viewFactory:push_button { + title = LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext', + action = function(button) + local wikitext = MediaWikiInterface.buildFileDescription('', propertyTable.info_source, '', propertyTable.info_author, propertyTable.info_license, propertyTable.info_other, propertyTable.info_categories, '') + LrDialogs.message(LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext', wikitext, 'info') + end, + }, + }, }, } end diff --git a/mediawiki.lrdevplugin/TranslatedStrings_de.txt b/mediawiki.lrdevplugin/TranslatedStrings_de.txt index a2b574e..7be208a 100755 --- a/mediawiki.lrdevplugin/TranslatedStrings_de.txt +++ b/mediawiki.lrdevplugin/TranslatedStrings_de.txt @@ -32,6 +32,7 @@ "$$$/LrMediaWiki/Section/Licensing/Categories=Kategorien" "$$$/LrMediaWiki/Section/Licensing/License=Lizenz" "$$$/LrMediaWiki/Section/Licensing/Other=Andere Felder" +"$$$/LrMediaWiki/Section/Licensing/Preview=Vorschau des generierten Wikitexts" "$$$/LrMediaWiki/Section/Licensing/Source=Quelle" "$$$/LrMediaWiki/Section/Licensing/Title=Upload-Informationen" "$$$/LrMediaWiki/Section/User/ApiPath/Details=Pfad zur api.php-Datei" -- cgit v1.2.3