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

Tweet translation #64

Closed
gjvnq opened this issue Sep 8, 2021 · 2 comments
Closed

Tweet translation #64

gjvnq opened this issue Sep 8, 2021 · 2 comments

Comments

@gjvnq
Copy link
Contributor

gjvnq commented Sep 8, 2021

I figured out a pretty cool way to allow for translations for the tweets: I set up another JSON file (twitter-i18n.json) that contains the translations and adapted the JS files to properly consider this new data source.

See the code I made in the following two commits:

gjvnq@ef0511f
gjvnq@b5a7b54

@Twipped
Copy link
Contributor

Twipped commented Sep 11, 2021

So a couple notes on the way this is built...
twitter-backup exists to be a raw archive of the tweet data as it arrived from the API. The only time I ever make modifications to it manually is if a tweet is deleted and I want to fix some bad urls. So that's not the right place to be putting language updates. Secondly, my goal with the structure is to have everything language related exist inside that language's directory, so the tweet translations for pt need to exist inside public/pt.

To that end, the approach I was planning to do was have a twitter.json file which be merged onto the twitter-cache data file for that language.

What I think may need to happen is create an actual tweet helper instead of just importing a template. Then the helper can handle both the loading of the tweet info and the language processing, and I can eliminate the tweets metadata import need.

@gjvnq
Copy link
Contributor Author

gjvnq commented Jun 14, 2022

Closed because of #96 was merged.

@gjvnq gjvnq closed this as completed Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants