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

insert failed: TAPi18n is not supported #26

Open
seanmiddaugh opened this issue Feb 7, 2016 · 14 comments
Open

insert failed: TAPi18n is not supported #26

seanmiddaugh opened this issue Feb 7, 2016 · 14 comments

Comments

@seanmiddaugh
Copy link

I put together a demo project the other day and things were working. Today, I decided to implement tap-i18n-db into my core project and when trying to seed the database with:

Interests.insertTranslations({slug: "ball-hockey", name: "Ball Hockey"});

I'm getting the error:

insert failed: TAPi18n is not supported

I have no idea what's causing this. I'm following the docs. Any ideas?

@samuelluis
Copy link

Same problem here

@samuelluis
Copy link

samuelluis commented Apr 14, 2016

In my case it works updating tap-i18n and tap-i18n-db to the latest version, 1.8.0 and 0.4.0 respectively.

@louis49
Copy link

louis49 commented Apr 20, 2016

+1

3 similar comments
@teddymeksavanh
Copy link

+1

@maevaD
Copy link

maevaD commented Apr 20, 2016

+1

@AdrienDesola
Copy link

+1

@R0binT
Copy link

R0binT commented Apr 20, 2016

+1337

@lucasprag
Copy link

+1

@ibihim
Copy link

ibihim commented Dec 10, 2016

-1

does not work. even tried to downgrade from 1.8.2, still not working

@thesmooth
Copy link

+1
The same problem

@LiFuPing
Copy link

+1

@mahfuzmohammad
Copy link

mahfuzmohammad commented Mar 24, 2017

Hi, I had the similar problem but I made it work. Here I will try to explain the reason and the solution of the problem. Basically this is an issue of project settings.

I am using tap:[email protected] and tap:[email protected]

Why this problem occurs?
If you check the codes in tap_i18n_db-common.coffee there are two functions verifyI18nEnabled and isSupportedLanguage who check TAPi18n._enabled() and TAPi18n.conf.supported_languages. When I created an empty project TAPi18n._enabled() returned false and TAPi18n.conf.supported_languages was null.

Solution (how it worked for me)
Step 1: I created i18n folder in the project's top directory and created a language file en.i18n.json. Now TAPi18n._enabled() returned true and the error insert failed: TAPi18n is not supported was gone. But there arise another problem. When I insert a translation, nothing was generated in db and the returned id was null. I found that TAPi18n.conf.supported_languages was null.

Step 2: I created another file in the project's top directory project-tap.i18n and added the following lines:

{
	"supported_languages": ["en",  "zh", "ru"]
}

Here I used English, Chinese, and Russian as supported languages but your ones might be different based on your need. Note: If your desired language for translation is not listed in this file you CAN NOT insert the translation in the db.

Summary: You need to have i18n folder with at least one language file in it and set supported languages in project-tap.i18n file.

Hope it helps. Cheers!

@ahmb84
Copy link

ahmb84 commented Apr 19, 2017

Hello,
I've the same problem. I've ever created i18n folder with en.i18n.json file inside and project-tap.i18n file in my project's top directory.
I am using tap:[email protected] and tap:[email protected] and [email protected]
I think the problem is tap:18n-db doesn't support [email protected].
Also I work on Linux Mint 18.1 Serena.
Thanks.

@aadamsx
Copy link

aadamsx commented Apr 9, 2019

Did anyone get this working besides @mahfuzmohammad ? Does this lib work with Meteor 1.8?

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