Skip to content

Commit a12a2ca

Browse files
Tsvetan StoychevTsvetan Stoychev
authored andcommitted
Use Brum Site ID and standardize translations
1 parent e535ce5 commit a12a2ca

21 files changed

Lines changed: 397 additions & 177 deletions

‎.github/workflows/ci.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12+
translations:
13+
name: Translation catalogs
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v5
19+
20+
- name: Setup PHP and WP-CLI
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '8.2'
24+
tools: wp-cli:2.12.0
25+
coverage: none
26+
27+
- name: Regenerate translation catalogs
28+
run: sh tools/update-translations.sh plugins/basicrum
29+
30+
- name: Check for stale translation artifacts
31+
run: git diff --exit-code -- plugins/basicrum/languages
32+
1233
unit:
1334
name: Unit (PHP ${{ matrix.php }})
1435
runs-on: ubuntu-latest

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ make lint-php
3838
make unit
3939
make integration-setup
4040
make integration
41+
make translations
4142
```
4243

4344
Unit tests use Brain\Monkey; integration tests use the WordPress test suite.

‎Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ PHP_SERVICE = php
33
WP_SERVICE = wordpress
44
DB_SERVICE = db
55
WPCLI_SERVICE = wpcli
6+
WPCLI_PLUGIN_WORKDIR = /var/www/html/wp-content/plugins/basicrum
67
PLUGIN_DIR = plugins/basicrum
78
PLUGIN_WORKDIR = /workspace
89
TEST_DB_NAME = wordpress_test
@@ -11,7 +12,7 @@ TEST_DB_PASS = root
1112
TEST_DB_HOST = db
1213
WP_TEST_VERSION ?= latest
1314

14-
.PHONY: help build up down restart logs shell composer-install wp-install lint lint-fix lint-php integration-setup integration test package clean
15+
.PHONY: help build up down restart logs shell composer-install wp-install lint lint-fix lint-php translations integration-setup integration test package clean
1516

1617
help:
1718
@echo "Targets:"
@@ -26,6 +27,7 @@ help:
2627
@echo " lint-php Run PHP syntax lint"
2728
@echo " lint Run PHPCS"
2829
@echo " lint-fix Run PHPCBF"
30+
@echo " translations Update POT, PO, and MO translation catalogs"
2931
@echo " unit Run unit tests"
3032
@echo " integration-setup Install WordPress test suite inside containers"
3133
@echo " integration Run integration tests"
@@ -66,6 +68,9 @@ lint:
6668
lint-fix:
6769
$(COMPOSE) run --rm -w $(PLUGIN_WORKDIR) $(PHP_SERVICE) composer lint:fix
6870

71+
translations:
72+
$(COMPOSE) run --rm --no-deps --user "$$(id -u):$$(id -g)" -e HOME=/tmp -w $(WPCLI_PLUGIN_WORKDIR) $(WPCLI_SERVICE) sh /tools/update-translations.sh .
73+
6974
unit:
7075
$(COMPOSE) run --rm -w $(PLUGIN_WORKDIR) $(PHP_SERVICE) composer unit
7176

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ make unit
2222
make integration-setup
2323
make integration
2424
make lint
25+
make translations
2526
make package
2627
```
2728

‎checklist.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ Acceptance criteria:
123123
- [ ] Record the minifier and its version in a lock file.
124124
- [ ] Make CI regenerate the loaders and fail when the committed output differs.
125125
- [ ] Document the source and version of the bundled Boomerang asset.
126-
- [ ] Add a repeatable command for generating `languages/basicrum.pot`.
127-
- [ ] Add a repeatable command for compiling translation MO files.
128-
- [ ] Make CI detect stale POT or MO files.
126+
- [x] Add a repeatable command for generating `languages/basicrum.pot`.
127+
- [x] Add a repeatable command for compiling translation MO files.
128+
- [x] Make CI detect stale POT or MO files.
129129

130130
Acceptance criteria:
131131

‎docker-compose.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ services:
3636
- ./plugins/basicrum:/var/www/html/wp-content/plugins/basicrum
3737

3838
wpcli:
39-
image: wordpress:cli-php8.2
39+
image: wordpress:cli-2.12.0-php8.2
4040
user: "33:33"
4141
depends_on:
4242
db:
-1.13 KB
Binary file not shown.

‎plugins/basicrum/languages/basicrum-bg_BG.po‎

Lines changed: 180 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,212 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: Basic Rum Wordpress Plugin\n"
44
"Report-Msgid-Bugs-To: \n"
5-
"POT-Creation-Date: 2022-10-31 14:45+0000\n"
6-
"PO-Revision-Date: 2022-11-01 08:23+0000\n"
75
"Last-Translator: \n"
86
"Language-Team: Bulgarian\n"
9-
"Language: bg_BG\n"
10-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
117
"MIME-Version: 1.0\n"
128
"Content-Type: text/plain; charset=UTF-8\n"
139
"Content-Transfer-Encoding: 8bit\n"
10+
"POT-Creation-Date: 2026-07-16T14:01:43+00:00\n"
11+
"PO-Revision-Date: 2026-07-16 14:01+0000\n"
12+
"Language: bg_BG\n"
13+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
1414
"X-Generator: Loco https://localise.biz/\n"
1515
"X-Loco-Version: 2.6.3; wp-6.0.3\n"
16-
"X-Domain: basicrum"
17-
18-
#. Name of the plugin
19-
msgid "Basic Rum Wordpress Plugin"
20-
msgstr "Basic Rum плъгин за Уърдпрес"
16+
"X-Domain: basicrum\n"
2117

22-
#: admin/admin-menu.php:11
23-
msgid "Basicrum"
24-
msgstr "Basicrum"
18+
#. Plugin Name of the plugin
19+
#: basicrum.php
20+
msgid "Basicrum - Real User Monitoring"
21+
msgstr ""
2522

26-
#: admin/admin-menu.php:10
27-
msgid "Basicrum Config"
28-
msgstr "Настройки на Basicrum"
23+
#. Plugin URI of the plugin
24+
#: basicrum.php
25+
msgid "https://www.basicrum.com/"
26+
msgstr "https://www.basicrum.com/"
2927

3028
#. Description of the plugin
31-
msgid "Budget - Open Source - Real User Monitoring system."
32-
msgstr "Budget - Open Source - Real User Monitoring system."
29+
#: basicrum.php
30+
msgid "Budget, open source, Real User Monitoring powered by Boomerang.js. Track page load performance, page types, and Web Vitals."
31+
msgstr ""
32+
33+
#. Author of the plugin
34+
#: basicrum.php
35+
msgid "Tsvetan Stoychev"
36+
msgstr "Цветан Стойчев"
37+
38+
#. Author URI of the plugin
39+
#: basicrum.php
40+
msgid "https://www.basicrum.com/contact/"
41+
msgstr "https://www.basicrum.com/contact/"
3342

34-
#: admin/settings-register.php:43
35-
msgid "Delay Beacon Sending:"
36-
msgstr "Забавяне на изпращаните данни:"
43+
#: src/Admin/Settings/Page.php:51
44+
msgid "Basicrum Settings"
45+
msgstr ""
3746

38-
#: admin/settings-callbacks.php:56
39-
msgid "First Option"
40-
msgstr "Първа опция"
47+
#: src/Admin/Settings/Page.php:52
48+
msgid "Basicrum"
49+
msgstr "Basicrum"
4150

42-
#: admin/settings-register.php:16
51+
#: src/Admin/Settings/Page.php:89
4352
msgid "General Settings"
4453
msgstr "Основни настройки"
4554

46-
#. URI of the plugin
47-
msgid "https://www.basicrum.com/"
48-
msgstr "https://www.basicrum.com/"
55+
#: src/Admin/Settings/Page.php:96
56+
msgid "Enable Basicrum"
57+
msgstr ""
4958

50-
#. Author URI of the plugin
51-
msgid "https://www.basicrum.com/contact/"
52-
msgstr "https://www.basicrum.com/contact/"
59+
#: src/Admin/Settings/Page.php:102
60+
msgid "Enable real user monitoring on your site."
61+
msgstr ""
5362

54-
#: admin/settings-callbacks.php:82
55-
msgid "Insert script in header"
56-
msgstr "Вмъкване на скрипта в хед таг-а на сайта"
63+
#: src/Admin/Settings/Page.php:108
64+
msgid "Beacon URL"
65+
msgstr ""
5766

58-
#: admin/settings-callbacks.php:83
59-
msgid "Insert script in the footer"
60-
msgstr "Вмъкване на скрипта във футъра на сайта"
67+
#: src/Admin/Settings/Page.php:114
68+
msgid "URL where Boomerang beacons are sent. Example: https://www.example.com/beacon/catcher"
69+
msgstr ""
6170

62-
#: admin/settings-register.php:53
63-
msgid "Script Insert Options:"
64-
msgstr "Опции за вмъкване на скрипт кода:"
71+
#: src/Admin/Settings/Page.php:121
72+
msgid "Brum Site ID"
73+
msgstr "Brum Site ID"
6574

66-
#: admin/settings-register.php:68
67-
msgid "Select options"
68-
msgstr "Изберете опция"
75+
#: src/Admin/Settings/Page.php:127
76+
msgid "Copy the Brum Site ID from the Basicrum backoffice."
77+
msgstr "Копирайте Brum Site ID от административния панел на Basicrum."
6978

70-
#: admin/settings-register.php:57
71-
msgid "Select where to insert script."
72-
msgstr "Изберете къде да бъде вмъкнат скрипта"
79+
#: src/Admin/Settings/Page.php:134
80+
msgid "Track Admin Users"
81+
msgstr ""
7382

74-
#: admin/settings-register.php:32
75-
msgid "Send Data to:"
76-
msgstr "Изпращане на данните към:"
83+
#: src/Admin/Settings/Page.php:140
84+
msgid "Track logged-in administrators (users with manage_options capability)."
85+
msgstr ""
7786

78-
#: admin/settings-register.php:47
79-
msgid "Set delay in milliseconds (For example 5000)"
80-
msgstr "Задайте забавяне в милисекунди (например 5000)"
87+
#: src/Admin/Settings/Page.php:146
88+
msgid "Boomerang Version"
89+
msgstr ""
8190

82-
#: admin/settings-register.php:36
83-
msgid "Set the URL, where data from Boomerang script should be send"
84-
msgstr "Задайте URL, където да бъдат изпращани данните от скрипта"
91+
#: src/Admin/Settings/Page.php:161
92+
msgid "Privacy / GDPR"
93+
msgstr ""
8594

86-
#. Author of the plugin
87-
msgid "Tsvetan Stoychev"
88-
msgstr "Цветан Стойчев"
95+
#: src/Admin/Settings/Page.php:168
96+
msgid "Require Consent"
97+
msgstr ""
98+
99+
#: src/Admin/Settings/Page.php:174
100+
msgid "When enabled, Boomerang only loads after user gives consent."
101+
msgstr ""
102+
103+
#: src/Admin/Settings/Page.php:180
104+
msgid "Consent Mode"
105+
msgstr ""
106+
107+
#: src/Admin/Settings/Page.php:186
108+
msgid "How consent is obtained from the user."
109+
msgstr ""
110+
111+
#: src/Admin/Settings/Page.php:188
112+
msgid "Explicit Consent"
113+
msgstr ""
89114

90-
#: admin/settings-register.php:64
91-
msgid "What do you want to monitor:"
92-
msgstr "Какво желаете да наблюдавате:"
115+
#: src/Admin/Settings/Page.php:189
116+
msgid "Implicit Consent"
117+
msgstr ""
118+
119+
#: src/Admin/Settings/Page.php:190
120+
msgid "Cookie Banner"
121+
msgstr ""
122+
123+
#: src/Admin/Settings/Page.php:191
124+
msgid "GDPR Banner"
125+
msgstr ""
126+
127+
#: src/Admin/Settings/Page.php:213
128+
msgid "Performance"
129+
msgstr ""
130+
131+
#: src/Admin/Settings/Page.php:220
132+
msgid "Wait After Onload"
133+
msgstr ""
134+
135+
#: src/Admin/Settings/Page.php:226
136+
msgid "Delay beacon sending until after page load completes."
137+
msgstr ""
138+
139+
#: src/Admin/Settings/Page.php:232
140+
msgid "Delay (milliseconds)"
141+
msgstr ""
142+
143+
#: src/Admin/Settings/Page.php:238
144+
msgid "Milliseconds to delay the beacon after onload. Leave 0 to disable the delay."
145+
msgstr ""
146+
147+
#: src/Admin/Settings/Page.php:253
148+
msgid "Developer Settings"
149+
msgstr ""
150+
151+
#: src/Admin/Settings/Page.php:260
152+
msgid "Script Position"
153+
msgstr ""
154+
155+
#: src/Admin/Settings/Page.php:266
156+
msgid "Where to insert the monitoring script."
157+
msgstr ""
93158

94-
#: admin/settings-register.php:23
95-
msgid "What would you like to monitor?"
96-
msgstr "Какви данни желаете да събирате?"
159+
#: src/Admin/Settings/Page.php:268
160+
msgid "Header (wp_head)"
161+
msgstr ""
162+
163+
#: src/Admin/Settings/Page.php:269
164+
msgid "Footer (wp_footer)"
165+
msgstr ""
166+
167+
#: src/Admin/Settings/Page.php:276
168+
msgid "Use Unminified Loaders"
169+
msgstr ""
170+
171+
#: src/Admin/Settings/Page.php:282
172+
msgid "Load unminified JavaScript loaders for debugging."
173+
msgstr ""
174+
175+
#: src/Admin/Settings/Page.php:468
176+
msgid "~30 KB gzipped"
177+
msgstr ""
178+
179+
#: src/Admin/Settings/Page.php:482
180+
msgid "Consent JavaScript API"
181+
msgstr ""
182+
183+
#: src/Admin/Settings/Page.php:483
184+
msgid "When consent mode is enabled, Boomerang will not load until the user gives consent. Use the following JavaScript API in your consent banner or cookie notice:"
185+
msgstr ""
186+
187+
#: src/Admin/Settings/Page.php:484
188+
msgid "Call this to grant consent and start monitoring. Sets a BRUM_CONSENT cookie (1 year, Strict, Secure)."
189+
msgstr ""
190+
191+
#: src/Admin/Settings/Page.php:485
192+
msgid "Call this to revoke consent. Disables Boomerang and removes tracking cookies."
193+
msgstr ""
194+
195+
#: src/Admin/Settings/Page.php:486
196+
msgid "Example:"
197+
msgstr ""
198+
199+
#: src/Admin/Settings/Validate.php:127
200+
msgid "Beacon URL was automatically upgraded to HTTPS."
201+
msgstr ""
202+
203+
#: src/Admin/Settings/Validate.php:136
204+
msgid "Invalid Beacon URL. The default URL has been restored."
205+
msgstr ""
206+
207+
#: src/Admin/Settings/Validate.php:162
208+
msgid "Invalid Brum Site ID. Copy it from the Basicrum backoffice and try again."
209+
msgstr "Невалиден Brum Site ID. Копирайте го от административния панел на Basicrum и опитайте отново."
210+
211+
#: src/Admin/Settings/Validate.php:189
212+
msgid "Delay cannot exceed 30000 milliseconds. It has been capped at 30000."
213+
msgstr ""

0 commit comments

Comments
 (0)