initial commit.

This commit is contained in:
Jordan Hewitt
2025-01-22 18:57:32 -08:00
commit e83034cedc
33 changed files with 15892 additions and 0 deletions

View File

@ -0,0 +1,10 @@
import * as React from 'react';
import renderer from 'react-test-renderer';
import { ThemedText } from '../ThemedText';
it(`renders correctly`, () => {
const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON();
expect(tree).toMatchSnapshot();
});

View File

@ -0,0 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<Text
style={
[
{
"color": "#11181C",
},
{
"fontSize": 16,
"lineHeight": 24,
},
undefined,
undefined,
undefined,
undefined,
undefined,
]
}
>
Snapshot test!
</Text>
`;

View File

@ -0,0 +1,21 @@
import { CachedTranslator } from "@/app/i18n/api"
import { language_t } from "@/app/i18n/lang"
type ISpeakButtonProps = {
country: string,
language: string,
}
function iSpeak(language : string) {
return `I speak ${language}.`
}
async function iSpeakTr(targetLang : string, sourceLang = "en") {
const sourceStr = iSpeak(targetLang)
const translator = new CachedTranslator(sourceLang, targetLang);
return await translator.translate(sourceStr)
}
const ISpeakButton = (props : ISpeakButtonProps) => {
}