# Does such a function exist?

I am looking for a function with the following property:

Let $$v_1,v_2$$ be two linearly independent vectors in $$\mathbb{R}^2.$$

I am given a smooth function $$g:(0,1) \rightarrow (0,\infty).$$

I am trying to understand if there exists a smooth (non-constant) function $$f:(0,1) \times \mathbb R^2 \rightarrow \mathbb R^2$$ with the property that for all $$n,m \in \mathbb Z$$ such that $$g(t)=n/m$$, where $$n/m$$ is a reduced fraction, we have for all $$x \in \mathbb R^2$$

$$f(t,mv_1+x)=f(t,x)=f(t,nv_2+x)$$ and $$n,m$$ are the minimal periods of the function $$f$$, i.e. for all natural numbers $$1\le n_0 we do not have

$$f(t,nv_2+x)=f(t,x)$$ and the same for $$m.$$

Define $$f(t,x\mathbf v_1+y\mathbf v_2)=e^{2\pi i(x/g(t)+yg(t))}$$. Then $$f(t,\mathbf x+j\mathbf v_1)=e^{2\pi ij/g(t)}f(t,\mathbf x)$$ and similarly $$f(t,\mathbf y+k\mathbf v_2)=e^{2\pi ikg(t)}f(t,\mathbf x)$$.
Suppose $$t$$ is such that $$g(t)=\frac nm$$ (in lowest terms). Then $$f(t,\mathbf x+j\mathbf v_1)=e^{2\pi ijm/n}f(t,\mathbf x)$$ so that $$f(t,\cdot)$$ is $$j\mathbf v_1$$-periodic if and only if $$n|jm$$ if and only if $$n|j$$. Similarly $$f(t,\mathbf x+k\mathbf v_2)=e^{2\pi ikn/m}$$, so that $$f(t,\cdot)$$ is $$k\mathbf v_2$$-periodic if and only if $$m|k$$.