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

feat: Allow external (absolute) file paths #22

Open
phillipmohr opened this issue Jun 27, 2024 · 3 comments
Open

feat: Allow external (absolute) file paths #22

phillipmohr opened this issue Jun 27, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@phillipmohr
Copy link

It would be great if the langDir would also allow absolute paths.

I'd like to host my CSV on Supabase so people in my team can easily edit it without the need to build a UI in my application.

@samk-dev samk-dev self-assigned this Jul 1, 2024
@samk-dev samk-dev added the enhancement New feature or request label Jul 1, 2024
@samk-dev samk-dev removed their assignment Jul 1, 2024
@samk-dev
Copy link
Owner

samk-dev commented Jul 1, 2024

Hey thank you Philip. Do you mean to host the csv file on Supabase storage? Please could you past here an example of how would the url look like?

For the time being the teams I collaborate with the edit the csv in google docs or any CSV editor they have and they send me the file and I just drop it in the langDir

@phillipmohr
Copy link
Author

Yes, it would be nice if the CSV can be hosted basically anywhere.

The URL in Supabase can look like this:
https://mysupabaseproject.supabase.co/storage/v1/object/public/myfolder/anotherfolder/translations.csv

In the meantime I have just build the UI for the CSV upload but I believe it could become handy if the CSV could also be hosted somewhere else

@phillipmohr
Copy link
Author

phillipmohr commented Oct 30, 2024

Hi, I just wanted to add something: I'm hosting on Vercel and it seems like Vercel doesn't allow writing files, meaning this doesn't work

const filePath = path.join(process.cwd(), 'public', 'locales', 'translations.csv');
fs.writeFileSync(filePath, csvFile.data);

It is recommended to use an external provider but unfortunately I can't specify an absolute external URL.

So for me, this is unfortunately not a "nice to have" but a must have because otherwise I can't use the nuxt translation manager on my prod environment (Vercel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants