activist icon indicating copy to clipboard operation
activist copied to clipboard

Create text access functionality for organizations, groups and events

Open andrewtavis opened this issue 1 month ago • 5 comments

Terms

Description

As of #1635 we're accessing all texts in the platform via [0] to get the first text entry (we want to allow entities to eventually localize their texts). We should create a method to access these texts in the stores and remove the instances of [0] from the text access methods. This functionality should check what the locale the user currently is in is and then try to access the corresponding iso. If the ISO does not exist, then we should default to the "default" text value.

[!NOTE] There's going to be a new issue after this to switch "primary" to "default" in the text tables. This issue will be blocked by it.

Contribution

Happy to discuss how best to implement this and support on implementation/review 😊

andrewtavis avatar Oct 26 '25 17:10 andrewtavis

CC @nicki182 for the discussion here and also the issue I'm making after on text database changes :)

andrewtavis avatar Oct 26 '25 17:10 andrewtavis

I think this should be based from the user selection when it selects the language of the website we can put language and based on that check if there is a text with that language or it not default to English

nicki182 avatar Oct 26 '25 18:10 nicki182

But then some organizations won't have English texts and then we wouldn't have a fallback if the user is say on Spanish and the organization has French as the language they have texts for. Don't we need a defined fallback method?

andrewtavis avatar Oct 26 '25 19:10 andrewtavis

I think we should make obligatory to have the texts in English, then add for different languages

nicki182 avatar Oct 26 '25 19:10 nicki182

That would be the fallback method, check if they have Spanish, if they don't then English

nicki182 avatar Oct 26 '25 19:10 nicki182