Skip to content

Commit

Permalink
www + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwig-pro authored and danstepanov committed Feb 21, 2024
1 parent 729e76b commit 738ca1b
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-bags-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-expo-stack': minor
---

i18next for internationalization
4 changes: 2 additions & 2 deletions cli/src/commands/create-expo-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const command: GluegunCommand = {
if (options.i18next) {
cliResults.packages.push({
name: 'i18next',
type: 'internalization'
type: 'internationalization'
});
}

Expand Down Expand Up @@ -313,7 +313,7 @@ const command: GluegunCommand = {
const navigationPackage = packages.find((p) => p.type === 'navigation') || undefined;
// if there is no styling package, add the stylesheet package
const stylingPackage = packages.find((p) => p.type === 'styling');
const internalizationPackage = packages.find((p) => p.type === 'internalization');
const internalizationPackage = packages.find((p) => p.type === 'internationalization');

let files: string[] = [];

Expand Down
2 changes: 1 addition & 1 deletion cli/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type Internalization = 'i18next';

export type AvailablePackages = {
name: (typeof availablePackages)[number];
type: 'navigation' | 'styling' | 'authentication' | 'internalization';
type: 'navigation' | 'styling' | 'authentication' | 'internationalization';
options?: { type?: NavigationTypes };
};

Expand Down
10 changes: 5 additions & 5 deletions cli/src/utilities/runCLI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,21 @@ export async function runCLI(toolbox: Toolbox, projectName: string): Promise<Cli
success(`No problem, skipping authentication for now.`);
}

// Ask about internalization
// Ask about internationalization
const askInternalization = {
type: 'select',
name: 'internalizationSelect',
message: 'What would you like to use for internalization?',
message: 'What would you like to use for internationalization?',
choices: ['i18next', 'None']
};

const { internalizationSelect } = await prompt.ask(askInternalization);

if (internalizationSelect === 'i18next') {
cliResults.packages.push({ name: 'i18next', type: 'internalization' });
success(`You'll be using i18next for internalization.`);
cliResults.packages.push({ name: 'i18next', type: 'internationalization' });
success(`You'll be using i18next for internationalization.`);
} else {
success(`No problem, skipping internalization for now.`);
success(`No problem, skipping internationalization for now.`);
}

if (!cliResults.flags.packageManager) {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/utilities/showHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function showHelp(info, highlight, warning) {
info(' --stylesheet Use StyleSheet for styling');
info('');
highlight(' Styling Package Options');
info(' --i18next Use i18next for internalization');
info(' --i18next Use i18next for internationalization');
info('');
highlight(' Opinionated Stacks');
info(' -i, --ignite Use Ignite to create an opinionated stack');
Expand Down
1 change: 1 addition & 0 deletions docs/src/components/Docs/FolderStructureDiagram.astro
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"restyle",
"supabase",
"firebase",
"i18next",
];
}

Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ bun create expo-stack myapp --expo-router --nativewind --bun
| `--tamagui` | Use Tamagui for styling |
| `--restyle` | Use Restyle for styling |
| `--stylesheet` | Use StyleSheet for styling, used by default |
| `--i18next` | Use i18next for internationalization |
| `-i`, `--ignite` | Initialize an opinionated starter using Infinite Red's Ignite |
17 changes: 17 additions & 0 deletions www/src/components/landing/stack/i18next.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
---

<a
target="_blank"
rel="noreferrer noopener"
href="https://www.i18next.com/"
class="group hover:no-underline relative overflow-hidden shadow-[inset_0_0_3rem_#7AB55C44] hover:shadow-[inset_0_0_8rem_#7AB55C44,0_0_2rem_#7AB55C44] border-[#7AB55C]/80 hover:border-[#7AB55C] bg-[#7AB55C]/20 backdrop-blur-sm border text-lime-300 p-4 flex-grow rounded-3xl flex flex-col items-start duration-500"
>
<h1 class="text-2xl mt-2">i18next</h1>
<span
class="font-thin max-w-[28ch] mt-1 opacity-70 group-hover:opacity-100 duration-1000"
>
internationalization-framework written in and for JavaScript
</span>
</a>

0 comments on commit 738ca1b

Please sign in to comment.