CodeWithAsheville / court-notifications

GNU General Public License v3.0
9 stars 9 forks source link

Added unsubscribe info to signup text #163

Closed GKosheev closed 1 year ago

GKosheev commented 1 year ago

name: "#Issue #140" about: "I'm ready to check in some code to fix an issue!" title: "[08/06/2022]: Added unsubscribe info to signup text" assignee: colinalford

Closes #<Insert Issue # Here>

Please check if the PR fulfills these requirements

What changes are you introducing?

I've updated en, ru and es translations, added to "unsubscribe" object another field "info", e.g.:

"info": "Reply 'STOP' if you don't want to receive further texts from this Buncombe County Court Reminders system (https://buncombenc.courtdates.org)."

Updated registerSubscription function:

- let msg = Mustache.render(nameTemplate, defendantDetails) + '\n\n' + unsubInfo;

+ const i18next = require("i18next");
...
+ await i18next.changeLanguage(req.language)
+ const unsubInfo = i18next.t('unsubscribe.info')
+ let msg = Mustache.render(nameTemplate, defendantDetails) + '\n\n' + unsubInfo;

I can't be 100% sure about es translation, but with Russian I feel pretty confident.

ejaxon commented 1 year ago

@GKosheev looks good, including the es translation.

BTW let me know if you see any way to shorten the Russian text, especially on the signup page, or to make it simpler - right now it's significantly longer and feels more complex (at least to me) than either English or Spanish. Even little things, for example, would it be ok to change the following?

From: "зарегистрироваться для получения CМС сообщений по поводу предстоящих судебных заседаний, в которых рассматриваются уголовные дела в городском суде округа Банком" To: "зарегистрироваться для получения CМС сообщений о предстоящих заседаниях суда по уголовным делам в округе Банком"

ejaxon commented 1 year ago

Also just FYI I had to make some corrections to get it working. Specifically, we should use req.t to do the translation, but that revealed a bug with the configuration of i18next. I also had to change keySeparator in the i18next configuration call in server.js.

GKosheev commented 1 year ago

@ejaxon, I would shorter it in that way: "зарегистрироваться для получения CМС о предстоящих судах по уголовным делам, рассматривающихся в округе Банком".

I can make an issue regarding that and PR with some other changes in translation on the client side.

ejaxon commented 1 year ago

That would be awesome!

On Sun, Aug 21, 2022 at 13:16 Gleb Koshcheev @.***> wrote:

@ejaxon https://github.com/ejaxon, I would shorter it in that way: "зарегистрироваться для получения CМС о предстоящих судах по уголовным делам, рассматривающихся в округе Банком".

I can make an issue regarding that and PR with some other changes in translation on the client side.

— Reply to this email directly, view it on GitHub https://github.com/CodeForAsheville/court-notifications/pull/163#issuecomment-1221586210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ4X7SCDXHOSKRO76GWJ63V2JP6RANCNFSM55YU3A3A . You are receiving this because you were mentioned.Message ID: @.***>

-- Eric Jackson @.***

"It's OK to live a life no one else understands." -K. LaMotte