aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2014-08-25 20:32:05 +0200
committerRobin Krahl <me@robin-krahl.de>2014-08-25 20:32:05 +0200
commit7132b7fbda7e5a140c0992d01e08cbc2f25963b5 (patch)
tree8869367427f01f8329263713e59632cf2c91dff4
parent8deeb71274124b2c93a64b49dc3581cee4453cd9 (diff)
downloadLrMediaWiki-7132b7fbda7e5a140c0992d01e08cbc2f25963b5.tar.gz
LrMediaWiki-7132b7fbda7e5a140c0992d01e08cbc2f25963b5.tar.bz2
Fix #9: Add 'Preview generated wikitext' button to export dialog.
-rwxr-xr-xmediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua12
-rwxr-xr-xmediawiki.lrdevplugin/TranslatedStrings_de.txt1
2 files changed, 13 insertions, 0 deletions
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('<!-- description -->', propertyTable.info_source, '<!-- date -->', propertyTable.info_author, propertyTable.info_license, propertyTable.info_other, propertyTable.info_categories, '<!-- per-file 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"