Question: On a learning site I asked how I could translate this sentence into German.

I offered my own version of it, as I thought it could be grammatically correct:

> 
> Alles, was ich tat, war dank deiner.
> 
> 
> 

`Alles, ... , war dank deiner` meaning *Everything ... was thanks to you*.

`... was ich tat ...` meaning *... what I did ...*

But I was told that my translation was not grammatically correct *even though* all the words were correctly chosen; so I was offered a paraphrase instead: 

> 
> Alles was ich erreicht habe, verdanke ich dir.
> 
> 
> 

But I don't understated why my translation is not correct when the pattern `Alles, was + Subject + Predicate` is so common in German, as Google [so amply shows](http://context.reverso.net/%C3%BCbersetzung/deutsch-englisch/alles+was+ich+tat).

Answer: 
In your first translation almost everything is correct except for "deiner". "Deiner" is a possessive pronoun and not an indirect object or "Dativ". The expression "thanks to you" translates to "Dank + Dativ ".

You can say "Dank deiner Hilfe / Unterstützung" = thanks to your help / Support.
I have researched a little bit about your suggestion and I have found that the usage of the personal pronouns with Dank + Genitive case combination is also possible but not popular anymore. The [corresponding text](http://hypermedia.ids-mannheim.de/call/public/fragen.ansicht?v_kat=&v_id=69), which claims what I have written here, is;

> 
> In aktuellen Texten findet man fast nur Beispiele mit Dativ: dank mir,
>  dank dir, dank ihr, dank ihm, dank uns, dank euch/Ihnen, dank ihnen .
>  Dennoch ist dank mit einem Personalpronomen im Genitiv nicht
>  unmöglich, aber sehr selten belegt. Dank mit einem Personalpronomen im
>  Genitiv beschränkt sich heute auf die Formen dank meiner; dank deiner;
>  dank seiner. Dank mit Personalpronomen im Genitiv wirkt gehoben,
>  gelegentlich aber auch ironisch oder spöttisch.
> 
> 
> 

Basically, the author of the text means that it is possible to say **dank meiner** or **dank deiner** etc. However, it will be more perceived as ironic or mocking than gratitude.

That is to say, the person, who said that your translation is not correct even if the individual words are correct, may think that it is not suitable to the specific context.