Skip to content

Commit 1a737a9

Browse files
committed
Changing gruntfile to template + rebuilding langpack
1 parent f20f4d3 commit 1a737a9

File tree

2 files changed

+47
-40
lines changed

2 files changed

+47
-40
lines changed

Gruntfile.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
/**
2-
* Gruntfile for Twitter
2+
* Sample language Gruntfile.
3+
*
4+
* Copy this to your Known plugin root, rename to Gruntfile.js, and create a package.json
5+
* with an appropriate "name" variable (usually your package namespace).
36
*/
47

58
module.exports = function (grunt) {
9+
610
// Project configuration.
711
grunt.initConfig({
812
pkg: grunt.file.readJSON('package.json'),
913
});
1014

11-
12-
// Build language pack (todo: find a cleaner way)
15+
// Build your language file
1316
grunt.registerTask('build-lang', '', function(){
1417

1518
const { execSync } = require('child_process');
1619

17-
execSync('touch ./languages/twitter.pot'); // Make sure it exists, if we're going to remove (for broken builds)
18-
execSync('rm ./languages/twitter.pot'); // Remove existing
20+
var pot = grunt.config.get('pkg.name').toLowerCase() + '.pot';
21+
22+
console.log("Building language file as ./languages/" + pot);
23+
24+
execSync('touch ./languages/' + pot); // Make sure it exists, if we're going to remove (for broken builds)
25+
execSync('rm ./languages/' + pot); // Remove existing
1926

20-
execSync('find . -type f -regex ".*\.php" | php ../../languages/processfile.php >> ./languages/twitter.pot');
27+
execSync('find . -type f -regex ".*\.php" | php vendor/mapkyca/known-language-tools/buildpot.php >> ./languages/' + pot);
2128

2229
});
2330

24-
};
31+
};

languages/twitter.pot

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
#: ./Pages/Callback.php:18
2-
msgid "Your Twitter credentials were saved."
3-
msgstr ""
4-
5-
#: ./Pages/Callback.php:18
6-
msgid "Your Twitter credentials could not be saved."
7-
msgstr ""
8-
9-
#: ./Pages/Account.php:18
10-
msgid "Your Twitter settings have been removed from your account."
11-
msgstr ""
12-
13-
#: ./Pages/Admin.php:18
14-
msgid "Your Twitter application details were saved."
1+
#: ./Main.php:276
2+
msgid "We couldn't upload your photo to Twitter. Twitter's response: %s."
153
msgstr ""
164

17-
#: ./templates/default/admin/twitter.tpl.php:4
5+
#: ./templates/default/admin/twitter.tpl.php:5
186
msgid "Twitter configuration"
197
msgstr ""
208

@@ -26,71 +14,83 @@ msgstr ""
2614
msgid "The callback URL should be set to:"
2715
msgstr ""
2816

29-
#: ./templates/default/admin/twitter.tpl.php:18
17+
#: ./templates/default/admin/twitter.tpl.php:30
3018
msgid "Once you\'ve finished, fill in the details below:"
3119
msgstr ""
3220

33-
#: ./templates/default/admin/twitter.tpl.php:18
21+
#: ./templates/default/admin/twitter.tpl.php:32
3422
msgid "API key"
3523
msgstr ""
3624

37-
#: ./templates/default/admin/twitter.tpl.php:18
25+
#: ./templates/default/admin/twitter.tpl.php:38
3826
msgid "API secret"
3927
msgstr ""
4028

41-
#: ./templates/default/admin/twitter.tpl.php:18
29+
#: ./templates/default/admin/twitter.tpl.php:46
4230
msgid "After the Twitter application is configured, site users must authenticate their Twitter account under Settings."
4331
msgstr ""
4432

45-
#: ./templates/default/admin/twitter.tpl.php:18
33+
#: ./templates/default/admin/twitter.tpl.php:53
4634
msgid "Save settings"
4735
msgstr ""
4836

49-
#: ./templates/default/account/twitter.tpl.php:18
37+
#: ./templates/default/account/twitter.tpl.php:28
5038
msgid "Easily share updates, posts, and pictures to Twitter."
5139
msgstr ""
5240

53-
#: ./templates/default/account/twitter.tpl.php:18
41+
#: ./templates/default/account/twitter.tpl.php:30
5442
msgid "With Twitter connected, you can cross-post content that you publish publicly on your site."
5543
msgstr ""
5644

57-
#: ./templates/default/account/twitter.tpl.php:18
45+
#: ./templates/default/account/twitter.tpl.php:37
5846
msgid "Connect Twitter"
5947
msgstr ""
6048

61-
#: ./templates/default/account/twitter.tpl.php:18
49+
#: ./templates/default/account/twitter.tpl.php:57
6250
msgid "Your account is currently connected to Twitter. Public content that you publish here can be cross-posted to your Twitter account."
6351
msgstr ""
6452

65-
#: ./templates/default/account/twitter.tpl.php:18
53+
#: ./templates/default/account/twitter.tpl.php:65
6654
msgid "Disconnect Twitter"
6755
msgstr ""
6856

69-
#: ./templates/default/account/twitter.tpl.php:18
57+
#: ./templates/default/account/twitter.tpl.php:85
7058
msgid "You have connected the below accounts to Twitter. Public content that you publish here can be cross-posted to your Twitter account."
7159
msgstr ""
7260

73-
#: ./templates/default/account/twitter.tpl.php:18
61+
#: ./templates/default/account/twitter.tpl.php:101
7462
msgid "Disconnect"
7563
msgstr ""
7664

77-
#: ./templates/default/account/twitter.tpl.php:18
65+
#: ./templates/default/account/twitter.tpl.php:113
7866
msgid "Add another Twitter account"
7967
msgstr ""
8068

81-
#: ./templates/default/account/twitter.tpl.php:18
69+
#: ./templates/default/account/twitter.tpl.php:141
8270
msgid "Before you can begin connecting to Twitter, you need to set it up."
8371
msgstr ""
8472

85-
#: ./templates/default/account/twitter.tpl.php:18
73+
#: ./templates/default/account/twitter.tpl.php:144
8674
msgid "Click here to begin Twitter configuration."
8775
msgstr ""
8876

89-
#: ./templates/default/account/twitter.tpl.php:18
77+
#: ./templates/default/account/twitter.tpl.php:152
9078
msgid "The administrator has not finished setting up Twitter on this site. Please come back later."
9179
msgstr ""
9280

93-
#: ./Main.php:18
94-
msgid "We couldn't upload your photo to Twitter. Twitter's response: %s."
81+
#: ./Pages/Account.php:33
82+
msgid "Your Twitter settings have been removed from your account."
83+
msgstr ""
84+
85+
#: ./Pages/Admin.php:32
86+
msgid "Your Twitter application details were saved."
87+
msgstr ""
88+
89+
#: ./Pages/Callback.php:40
90+
msgid "Your Twitter credentials were saved."
91+
msgstr ""
92+
93+
#: ./Pages/Callback.php:43
94+
msgid "Your Twitter credentials could not be saved."
9595
msgstr ""
9696

0 commit comments

Comments
 (0)