Skip to content

Commit

Permalink
[change] Added exhausted limit help text
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Dec 29, 2023
1 parent 864d68b commit 63396b5
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 11 deletions.
30 changes: 22 additions & 8 deletions client/components/status/__snapshots__/status.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ exports[`<Status /> interactions should show user's plan when subscription modul
<progress
id="Max-Daily-Session"
max="10800"
value={0}
value={10700}
/>
<p
className="progress"
>
<strong>
00:00:00
02:58:20
</strong>
of
Expand All @@ -62,13 +62,13 @@ exports[`<Status /> interactions should show user's plan when subscription modul
<progress
id="Max-Daily-Session-Traffic"
max="3000000000"
value={0}
value={3000000000}
/>
<p
className="progress"
>
<strong>
0
2.79 GB
</strong>
of
Expand All @@ -77,6 +77,13 @@ exports[`<Status /> interactions should show user's plan when subscription modul
used
</p>
<p
className="exhausted"
>
<strong>
USAGE_LIMIT_EXHAUSTED_TXT
</strong>
</p>
</div>
<p>
<button
Expand Down Expand Up @@ -374,13 +381,13 @@ exports[`<Status /> interactions should show user's plan when subscription modul
<progress
id="Max-Daily-Session"
max="10800"
value={0}
value={10700}
/>
<p
className="progress"
>
<strong>
00:00:00
02:58:20
</strong>
of
Expand All @@ -396,13 +403,13 @@ exports[`<Status /> interactions should show user's plan when subscription modul
<progress
id="Max-Daily-Session-Traffic"
max="3000000000"
value={0}
value={3000000000}
/>
<p
className="progress"
>
<strong>
0
2.79 GB
</strong>
of
Expand All @@ -411,6 +418,13 @@ exports[`<Status /> interactions should show user's plan when subscription modul
used
</p>
<p
className="exhausted"
>
<strong>
USAGE_LIMIT_EXHAUSTED_TXT
</strong>
</p>
</div>
<p>
<button
Expand Down
2 changes: 1 addition & 1 deletion client/components/status/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ progress + p.progress {
.limit-info .button {
margin-top: 5px;
}
.limit-info .exahusted {
.limit-info .exhausted {
color: #ba2121f7;
margin-top: 15px;
line-height: 1.5em;
Expand Down
6 changes: 6 additions & 0 deletions client/components/status/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,12 @@ export default class Status extends React.Component {
)}{" "}
used
</p>
{userPlan.is_free &&
check.value === String(check.result) && (
<p className="exhausted">
<strong>{t`USAGE_LIMIT_EXHAUSTED_TXT`}</strong>
</p>
)}
</div>
))}
{settings.subscriptions && userPlan.is_free && (
Expand Down
4 changes: 2 additions & 2 deletions client/components/status/status.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1819,14 +1819,14 @@ describe("<Status /> interactions", () => {
attribute: "Max-Daily-Session",
op: ":=",
value: "10800",
result: 0,
result: 10700,
type: "seconds",
},
{
attribute: "Max-Daily-Session-Traffic",
op: ":=",
value: "3000000000",
result: 0,
result: 3000000000,
type: "bytes",
},
],
Expand Down
4 changes: 4 additions & 0 deletions i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ msgstr "Plan-Upgrade läuft"
msgid "CURRENT_SUBSCRIPTION_TXT"
msgstr "Aktuelles Abonnement:"

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "Sie haben den verfügbaren Datenverkehr ausgeschöpft. Führen Sie ein Upgrade durch, um den Dienst weiterhin nutzen zu können."

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Aktualisierung"
Expand Down
4 changes: 4 additions & 0 deletions i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ msgstr "Plan upgrade in progress"
msgid "CURRENT_SUBSCRIPTION_TXT"
msgstr "Current subscription:"

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "You have exhausted the traffic available. Upgrade to continue using the service."

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Upgrade"
Expand Down
4 changes: 4 additions & 0 deletions i18n/fur.po
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ msgstr "Aggiornament dal paniere in corse"
msgid "CURRENT_SUBSCRIPTION_TXT"
msgstr "Sotons abonament:"

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "Tu âs consumât il trafic disponibil. Fâ l'aggiornament par continuâ a doprâ il servizi."

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Potenziament"
Expand Down
4 changes: 4 additions & 0 deletions i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ msgstr "Piano di aggiornamento in corso"
msgid "CURRENT_SUBSCRIPTION_TXT"
msgstr "Abbonamento attuale:"

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "Hai esaurito il traffico disponibile. Esegui l'upgrade per continuare a utilizzare il servizio."

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Aggiornamento"
Expand Down
4 changes: 4 additions & 0 deletions i18n/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,10 @@ msgstr "Обновление плана выполняется"
msgid "CURRENT_SUBSCRIPTION_TXT"
msgstr "Текущая подписка:"

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "Вы исчерпали доступный трафик. Обновите версию, чтобы продолжить пользоваться услугой."

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Обновление"
Expand Down
4 changes: 4 additions & 0 deletions i18n/sl.po
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ msgstr "Prebieha aktualizácia plánu"
msgid "CURRENT_SUBSCRIPTION_TXT"
msgstr "Aktuálne predplatné:"

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "Vyčerpali ste dostupnú premávku. Ak chcete službu naďalej používať, inovujte ju."

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Inovovať"
Expand Down

0 comments on commit 63396b5

Please sign in to comment.