Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Merge pull request #100 from zhaofeng-shu33/add-translation-support
Browse files Browse the repository at this point in the history
[WIP] internationalization
  • Loading branch information
hugosolar authored Apr 16, 2020
2 parents 1667a00 + 5ea93cb commit 5dd0c1a
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 6 deletions.
2 changes: 1 addition & 1 deletion creativecommons.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author URI: http://CreativeCommons.org/
* License: GPLv2 or later versions
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*
* Text Domain: CreativeCommons
* @package CC_WordPress_Plugin
*/

Expand Down
9 changes: 4 additions & 5 deletions includes/class-creativecommons.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ private function __construct() {
public function init() {
$this->plugin_url = plugin_dir_url( dirname( __FILE__ ) );

// language setup.
$this->locale = get_locale();
$mofile = plugin_dir_path( dirname( __FILE__ ) )
. '/languages/' . $this->locale . '.mo';
load_textdomain( $this->localization_domain, $mofile );
// language setup.
$lang_dir = dirname( dirname( plugin_basename( __FILE__ ) ) )
. '/languages/';
load_plugin_textdomain( $this->localization_domain, false, $lang_dir );

/*
* add admin.js to wp-admin pages and displays the site
Expand Down
244 changes: 244 additions & 0 deletions languages/CreativeCommons.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
# Copyright (C) 2020 Ahmad Bilal <https://ahmadbilal.dev>, Bjorn Wijers <burobjorn@burobjorn.nl>, Tarmo Toikkanen <tarmo@iki.fi>, Matt Lee <mattl@creativecommons.org>, Rob Myers <rob@creativecommons.org>, Timid Robot Zehta
# This file is distributed under the same license as the Creative Commons plugin.
msgid ""
msgstr ""
"Project-Id-Version: Creative Commons 2020.01.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-plugin-creativecommons\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2020-04-14T23:18:36+08:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.3.0\n"
"X-Domain: CreativeCommons\n"

#. Plugin Name of the plugin
msgid "Creative Commons"
msgstr ""

#. Plugin URI of the plugin
msgid "https://github.com/creativecommons/wp-plugin-creativecommons"
msgstr ""

#. Description of the plugin
msgid "Official Creative Commons plugin for licensing your content. With Creative Commons licenses, keep your copyright AND share your creativity."
msgstr ""

#. Author of the plugin
msgid "Ahmad Bilal <https://ahmadbilal.dev>, Bjorn Wijers <burobjorn@burobjorn.nl>, Tarmo Toikkanen <tarmo@iki.fi>, Matt Lee <mattl@creativecommons.org>, Rob Myers <rob@creativecommons.org>, Timid Robot Zehta"
msgstr ""

#. Author URI of the plugin
msgid "http://CreativeCommons.org/"
msgstr ""

#: includes/class-creativecommons.php:133
msgid "Current License"
msgstr ""

#: includes/class-creativecommons.php:144
msgid "Add additional attribution text"
msgstr ""

#: includes/class-creativecommons.php:156
msgid "Attribution Details"
msgstr ""

#: includes/class-creativecommons.php:168
msgid "Display license as"
msgstr ""

#: includes/class-creativecommons.php:192
msgid "Select the License"
msgstr ""

#: includes/class-creativecommons.php:194
msgid "Select your required default license for your website. Choose a license from Creative Commons licenses. If you are not sure about what license to use, let our "
msgstr ""

#: includes/class-creativecommons.php:196
msgid "License Chooser"
msgstr ""

#: includes/class-creativecommons.php:200
msgid "Appearance > Widgets"
msgstr ""

#: includes/class-creativecommons.php:202
msgid "drag CC License widget to the required area. You can also include the license in footer. We recommend using the widget for better compatibility with your theme. You can use individual licenses in posts or pages using Gutenberg blocks."
msgstr ""

#: includes/class-creativecommons.php:212
msgid "Attribution 4.0 International License"
msgstr ""

#: includes/class-creativecommons.php:225
msgid "Attribution-ShareAlike 4.0 International License"
msgstr ""

#: includes/class-creativecommons.php:238
msgid "Attribution-NonCommercial 4.0 International License"
msgstr ""

#: includes/class-creativecommons.php:251
msgid "Attribution-NonCommercial-ShareAlike 4.0 International License"
msgstr ""

#: includes/class-creativecommons.php:264
msgid "Attribution-NonCommercial-NoDerivatives 4.0 International License"
msgstr ""

#: includes/class-creativecommons.php:277
msgid "Attribution-NoDerivatives 4.0 International License"
msgstr ""

#: includes/class-creativecommons.php:290
msgid "CC0 Universal Public Domain Dedication license"
msgstr ""

#: includes/class-creativecommons.php:369
msgid "Widget"
msgstr ""

#: includes/class-creativecommons.php:370
msgid "(recommended)"
msgstr ""

#: includes/class-creativecommons.php:374
msgid "Footer"
msgstr ""

#: includes/class-creativecommons.php:563
msgid "The network name: %s"
msgstr ""

#: includes/class-creativecommons.php:566
msgid "A site's name"
msgstr ""

#: includes/class-creativecommons.php:570
#: includes/class-creativecommons.php:587
msgid "The author display name"
msgstr ""

#: includes/class-creativecommons.php:574
#: includes/class-creativecommons.php:591
msgid "Something completely differrent"
msgstr ""

#: includes/class-creativecommons.php:584
msgid "The site name: %s"
msgstr ""

#: includes/class-creativecommons.php:626
msgid "Title"
msgstr ""

#: includes/class-creativecommons.php:638
msgid "Title URL"
msgstr ""

#: includes/class-creativecommons.php:648
msgid "Author"
msgstr ""

#: includes/class-creativecommons.php:658
msgid "Author URL"
msgstr ""

#: includes/class-creativecommons.php:923
msgid ""
"is a\n"
"\t\t\tnonprofit organization that enables the sharing and use of\n"
"\t\t\tcreativity and knowledge through free legal tools."
msgstr ""

#: includes/class-creativecommons.php:934
msgid ""
"Our free, easy-to-use copyright licenses\n"
"\t\t\tprovide a simple, standardized way to give the public\n"
"\t\t\tpermission to share and use your creative work — on\n"
"\t\t\tconditions of your choice. CC licenses let you easily\n"
"\t\t\tchange your copyright terms from the default of \"all rights\n"
"\t\t\treserved\" to \"some rights reserved.\""
msgstr ""

#: includes/class-creativecommons.php:948
msgid ""
"Creative Commons licenses are not an\n"
"\t\t alternative to copyright. They work alongside copyright and\n"
"\t\t enable you to modify your copyright terms to best suit your\n"
"\t\t\tneeds."
msgstr ""

#: includes/class-creativecommons.php:958
msgid "Please consider making a "
msgstr ""

#: includes/class-creativecommons.php:958
msgid "donation (tax deductible in the US) to support our work"
msgstr ""

#: includes/class-creativecommons.php:960
msgid "Sign up for our newsletter"
msgstr ""

#: includes/class-creativecommons.php:1121
msgid "Creative Commons License"
msgstr ""

#: includes/class-creativecommons.php:1125
msgid "Except where otherwise noted, "
msgstr ""

#: includes/class-creativecommons.php:1135
msgid "the content "
msgstr ""

#: includes/class-creativecommons.php:1142
msgid "on this site "
msgstr ""

#: includes/class-creativecommons.php:1145
msgid " is licensed under a <a rel=\"license\" href=\"%1$s\">%2$s</a> License."
msgstr ""

#: includes/class-creativecommons.php:1148
msgid "Based on a work at <a xmlns:dct=\"http://purl.org/dc/terms/\" href=\"%s\" rel=\"dct:source\">%s</a>."
msgstr ""

#: includes/class-creativecommons.php:1152
msgid "Permissions beyond the scope of this license may be available at <a xmlns:cc=\"http://creativecommons.org/ns#\" href=\"%s\" rel=\"cc:morePermissions\">%s</a>."
msgstr ""

#: widgets/creativecommons-widget.php:27
msgid "By default, user-specified Creative Commons License will display in the page footer. Alternatively, drag this widget to a sidebar or any other widget area. The license will appear there instead."
msgstr ""

#: widgets/creativecommons-widget.php:38
msgid "CC License"
msgstr ""

#: dist/blocks.build.js:1
#: src/CC-BY-CC0/block.js:104
#: src/CC-BY-NC-ND/block.js:104
#: src/CC-BY-NC-SA/block.js:104
#: src/CC-BY-NC/block.js:104
#: src/CC-BY-ND/block.js:104
#: src/CC-BY-SA/block.js:104
#: src/CC-BY/block.js:104
msgid "This content"
msgstr ""

#: dist/blocks.build.js:1
#: src/CC-BY-CC0/block.js:116
#: src/CC-BY-NC-ND/block.js:117
#: src/CC-BY-NC-SA/block.js:117
#: src/CC-BY-NC/block.js:117
#: src/CC-BY-ND/block.js:117
#: src/CC-BY-SA/block.js:117
#: src/CC-BY/block.js:117
msgid "Custom text/description/links "
msgstr ""

0 comments on commit 5dd0c1a

Please sign in to comment.