Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation with Overrides on Program other than AA in TSML #1491

Open
joshreisner opened this issue Mar 21, 2024 · 3 comments
Open

Translation with Overrides on Program other than AA in TSML #1491

joshreisner opened this issue Mar 21, 2024 · 3 comments

Comments

@joshreisner
Copy link
Contributor

discussed in #1394

english french
@BookOfDiscovery
Copy link

Hi, I'm wondering if you'd had any luck with this please? We wanted to link people to specific language meetings where we've given a custom type name - e.g. https://workaholics-anonymous.org/meetings/?type=language-french. But on a French-language machine, the type and therefore the URL changes to https://workaholics-anonymous.org/meetings/?type=francais so the former URL comes up with no meeting matches. It would be good to somehow disable translation for now if there is a way.

@BookOfDiscovery
Copy link

BookOfDiscovery commented Aug 19, 2024

I guess the reason we went with the custom type name for languages was so they were all grouped together in the list e.g. 'Language - ...', in the absence of a separate language picker.

@joshreisner
Copy link
Contributor Author

hi, i'm afraid not @BookOfDiscovery - we're a small team and all allocated to other issues at the moment.

to restate the problem a little, none of the custom meeting types are working in other languages, for example "Grab Bag" does not show up if your browser is set to French.

partly this is a problem in the way our wordpress plugin handles custom types - there's only a way to specify them in one language, when there would need to be a way to specify for each language.

for that reason, i'm starting to think this should be a TSML issue instead of TSML UI.

for example, this is working for me in TSML UI:

      var tsml_react_config = {
        strings: {
          en: {
            types: {
              'CUSTOM': 'My Custom Type',
            },
          },
          fr: {
            types: {
              'CUSTOM': 'Mon type personnalisé',
            },
          },
        },
      };

Screenshot 2024-08-20 at 05-46-07 Rencontres

i see you've made a bunch of customizations on your site, perhaps you could also specify the translations of your custom types in the tsml_react_config object?

this is where you have:

<div id="tsml-ui" data-src="https://workaholics-anonymous.org/wp-content/meetings/sfdc_transformed_json_n8n_no_unscheduled_FINAL.json" data-mapbox="pk.eyJ1IjoiYmFnaXNlbmlvciIsImEiOiJjbHB4ZDZhMjcwdWhjMnBwYnhsYzdleHQ2In0.8HnZ5iIFLxJb1GBbLorXkQ" data-google="AIzaSyCS9M8Dqk5cMFqA7xvUrQEzT1u5IvcbT7c"></div>
<script src="https://workaholics-anonymous.org/wp-content/meetings/app.js" async></script>
<script>
var tsml_react_config = {
    columns: ['time', 'distance', 'name', 'location', 'address', 'region'],
    flags: ['online', 'in-person', 'EN'],
    distance_unit: 'mi',
    conference_providers: {
        'bit.ly': 'Custom',
        't.me': 'Telegram',
        'join.skype.com': 'Skype',
        'sites.google.com': 'Custom',
        'groups.google.com': 'Email Group',
        'workaholics-anonymous.org': 'WA International Numbers',
        'webex.com': 'Webex',
        'tinyurl.com': 'Email',
        'chat.whatsapp.com': 'WhatsApp',
    },
    flags: ['online', 'in-person', 'EN'],
    map: {
        style: 'mapbox://styles/mapbox/streets-v12',
    },
    strings: {
        en: {
            type_descriptions: {
                O: 'Open meetings welcome anyone interested in the Workaholics Anonymous Program of Recovery from workaholism. Non-workaholics may attend open meetings as observers.',
                C: 'Closed meetings are for WA members or for those who desire to recover from their problem with work, activity, and/or work avoidance.',
            },
            types: {
                WA_bilingual: '- Language: Bilingual',
                WA_Book_of_Recovery: 'Book of Recovery',
                WA_business_owners_enetrpreneurs: 'Business Owners/Entrepreneurs',
                WA_Dutch: '- Language: Dutch',
                WA_games_night: 'Games Night',
                WA_general_sharing: 'General Sharing',
                WA_grab_bag: 'Grab Bag',
                WA_non_smoking: 'Non-Smoking',
                WA_other: 'Other',
                WA_topics_rotate: 'Topics rotate',
                WA_work_avoidance_anorexia: 'Work Avoidance/Anorexia',
                WA_WorkAnon_wellcome: 'WorkAnon Welcome',
                DA: '- Language: Danish',
                DE: '- Language: German',
                EL: '- Language: Greek',
                EN: '- Language: English',
                FA: '- Language: Persian',
                FR: '- Language: French',
                HE: '- Language: Hebrew',
                HI: '- Language: Hindi',
                HR: '- Language: Croatian',
                HU: '- Language: Hungarian',
                ITA: '- Language: Italian',
                JA: '- Language: Japanese',
                KOR: '- Language: Korean',
                LT: '- Language: Lithuanian',
                ML: '- Language: Malayalam',
                POL: '- Language: Polish',
                POR: '- Language: Portuguese',
                PUN: '- Language: Punjabi',
                RUS: '- Language: Russian',
                S: '- Language: Spanish',
                SK: '- Language: Slovak',
                SV: '- Language: Swedish',
                TH: '- Language: Thai',
                UK: '- Language: Ukrainian'
            },
        },
    },
};
</script>

you would duplicate the en key for each TSML-UI-supported language (es, fr, ja, nl, pt, sk, sv)

meanwhile, i will shift this issue over to TSML. this will be a big chunk of work though:

  • populate the tsml_react_config object with each translation of the types (for built-in types)
  • devise a way to specify and store custom types in any given language

seems like there are some unknowns associated with this

@joshreisner joshreisner transferred this issue from code4recovery/tsml-ui Aug 20, 2024
@joshreisner joshreisner added front end and removed bug labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants