opral / monorepo Goto Github PK
View Code? Open in Web Editor NEWglobalization ecosystem && change control SDK
Home Page: https://opral.com
License: Apache License 2.0
globalization ecosystem && change control SDK
Home Page: https://opral.com
License: Apache License 2.0
React for example differs vastly from NextJs although it should be identical.
Describe the bug
Rollup polyfills for memfs seem to have a wrong setup. Development works, likely because vite uses esbuild for the dev server, while the build command, which uses rollup, fails.
'extname' is not exported by __vite-browser-external, imported by ../../node_modules/@rollup/pluginutils/dist/es/index.js
@inlang/website:build: file: /Users/samuel/Documents/GitHub.nosync/inlang/node_modules/@rollup/pluginutils/dist/es/index.js:1:9
@inlang/website:build: 1: import { extname, win32, posix, isAbsolute, resolve } from 'path';
To Reproduce
Steps to reproduce the behavior:
npm run build
Expected behavior
The build runs successfully.
Additional context
Add any other context about the problem here.
See #101
Warn the user that local, or remote, translation files are going to be over-written.
Possibilities:
Other systems rely on a framework like React, Svelte, etc. Choosing other systems relies on #142
Source-code-configs contains no source-code. Move config files out of the directory?
Describe the enhancement
A clear and concise description of what the enhancement is about.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Supabase supports row level security on subscriptions now. No need to use the current workaround with the projectStore
anymore + polling (which already lead to bugs.).
// TODO extract tableOfContents to separate file?
I just spent 10 hours on a bug that would have been obvious if implicit any's would cause linting errors. Reminder to myself to add "noImplicitAny" to the typescript config
The html documents language could be used as language detection.
Describe the bug
I can't change the language on the Landing page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Contributing via OAuth flows (see #136) does not work for external contributors or repositories a translator has no access to. An alternative for public repositories could be GitHub's fork functionality. The editor forks a public repository either on behalf of the user or by creating an inlang-fork/repository
fork for all external contributors.
More ideas are welcome.
Extending on #103
Smart extraction of string interpolation:
Allow selecting `Hello, ${userName}`
for extraction.
When extracting it should generate Hello, {$userName}
in the ftl file. And in code it should pass userName
as a parameter.
The ast
package is powering every other package or app of inlang. See #127
The config package powers all apps of inlang. See #127
To ease development in the team, and ease external contributions, have one development environment with https://www.gitpod.io/.
This feature exists in the current vs code extension already but will be re-implemented in anticipation of the architectural changes laid out in #127.
The current implementation relies on Server Side Rendering (SSR) to fetch a JSON file over a network request which contains the translations. This has the severe downside of requiring a server-side framework like NextJS or SvelteKit for inlang to work. Furthermore, the security of fetching the translations is not rigid. Anyone can fetch any translations by using the domain of the app.
TLDR
load()
in svelteKit or getStaticProps
in NextJS.The GitHub repo of a certain app can be used directly as "storage" for the translations. Using the source code directly eliminates the need to make a network request, thus the need for an SSR framework and potential security risks.
Pros
Cons
Describe the bug
On the README, clicking Blog or documentation leads to a 404 on inlang.dev
To Reproduce
Steps to reproduce the behavior:
The VS Code extension looks for the inlang.config.json
file in the first workspace folder (and fails if it is not found there). This makes it difficult to use Inlang in a multi-root workspace if the repo using Inlang is not in the first workspace folder (requires moving or linking the config file to the first folder) and impossible to use Inlang with different configurations in different folders of a multi-root workspace.
Maybe:
could be replaced with something like:
const openedDirectoryPath = vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri).uri.fsPath;
which would look for the inlang.config.json
file in the workspace folder that contains the file opened in the active text editor. That way each workspace folder in a multi-root workspace could have its own config file.
I get the following error if I try to use inlang in my sveltekit project.
500
__vite_ssr_import_1__.loadTranslations is not a function
TypeError: __vite_ssr_import_1__.loadTranslations is not a function
at load (__layout.svelte:9:38)
at load_node (file:///Users/swelsch/Development/b-nova/breedium/frontend/node_modules/@sveltejs/kit/dist/ssr.js:957:30)
at respond$1 (file:///Users/swelsch/Development/b-nova/breedium/frontend/node_modules/@sveltejs/kit/dist/ssr.js:1242:21)
at async render_page (file:///Users/swelsch/Development/b-nova/breedium/frontend/node_modules/@sveltejs/kit/dist/ssr.js:1433:19)
at async resolve (file:///Users/swelsch/Development/b-nova/breedium/frontend/node_modules/@sveltejs/kit/dist/ssr.js:1696:10)
at async Object.handle (/Users/swelsch/Development/b-nova/breedium/frontend/src/hooks.ts:14:24)
at async respond (file:///Users/swelsch/Development/b-nova/breedium/frontend/node_modules/@sveltejs/kit/dist/ssr.js:1675:10)
at async svelteKitMiddleware (file:///Users/swelsch/Development/b-nova/breedium/frontend/node_modules/@sveltejs/kit/dist/chunks/index.js:4531:22)
I did npm install inlang --save
and my __layout.svelte file looks like
<script lang="ts" context="module">
import Header from '$lib/header/Header.svelte';
import { setTranslations, loadTranslations } from 'inlang';
export async function load({ page }) {
if (page.params.lang) {
setTranslations(
await loadTranslations({
projectDomain: 'demo.sveltekit.inlang.dev',
locale: page.params.lang
})
);
}
return {};
}
</script>
One of the big problems of i18n is no existent type safety. https://github.com/ivanhofer/typesafe-i18n is gaining momentum as one of the first solutions that enable typesafety for i18n. It requires setup and continuously watches the translation file to auto-generate type annotations.
Inlang currently posts missing translations via a network request. That is already better than most wide-stream i18n solutions but also has downsides:
t('hrrlo', {id: 'compenent.hello'}
.Regardless of how missing translations are tracked. Typesafety is even better for variables t("Hello {user}", vars: { uset: "Samuel" })
is a runtime error. The type uset
is not statically caught. Neither would be something like t("Hello {userId:number}", vars: {userId: "Samuel"}`
userId is expected to be a number
but a string is passed. As a matter of fact, that will not even be a runtime error.
Exporting statically typed translation files into the source repository instead of json files can greatly improve DX.
Automatically created from Linear (#25)
via LinearSync
Create a documentation site.
looping over all bundles and their resources is a performance bottleneck
const messages = bundle.resources.flatMap((resource) => resource.body);
const message = messages.find((message) => message.id.name === args.id);
Instead, the query function could be created with a const query = createQuery()
function that holds an index (hash table) of messages to speed up querying e.g. instead of looping through resources, a more efficient query would be
bundles[bundleId].resources[resourceId].messages[messageId]
Related RFC:
"surface-100": new TinyColor(neutralColors.neutral[900])
.setAlpha(0.05)
.toHex8String(),
setAlpha well sets the alpha. remove setAlpha and likely TinyColor altogether.
Technically not required for project dog food (https://github.com/orgs/inlang/projects/7) but a landing page with documentation should be available.
The nav bar and editor seem visually too close. Both make use of a horizontal divider and no color difference between them.
Increase visual difference by either changing the nav bar or the "editor nav bar". GitHub only uses color.
We could use surface-100 for the nav bar. I played around with surface-100, a bit too light. The hue likely needs to increase in the color system to make a meaningful difference.
Describe the bug
When trying to install the CLI via NPM, I get an error message that the package is not found.
To Reproduce
Steps to reproduce the behavior:
npm init -y
npm i @inlang/cli -D
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@inlang%2fcli - Not found
npm ERR! 404
npm ERR! 404 '@inlang/cli@*' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ben/.npm/_logs/2022-03-25T08_22_13_677Z-debug-0.log
Expected behavior
The package should be in the registry and install.
Desktop:
The ide extension opens a generic link to the github repo. #151 is done, add correct link.
{/* TODO: use proper text editor instead of input element */}
The pattern editor uses an input element right now. Use an editor like https://github.com/facebook/lexical in the future to render placeholders and not only text.
This feature exists in the current vs code extension already but will be re-implemented in anticipation of the architectural changes laid out in #127.
Hello,
Since the files are all here, it would be nice to have a setup documentation for them. Better yet if you packed the dashboard components under a single docker-compose project.
inlang.config.json
also needs a server host field
The initial version of the inlang editor should use existing git auth workflows. In other words, use OAuth flows to act on the behalf of the user.
This implementation only requires the user to "login" with a git provider and et voila, the user can contribute.
// TODO lazy load layouts
// see https://www.solidjs.com/tutorial/async_lazy
// TODO changes that have been pushed are shown as unpushed
The editor clones a whole repository. Especially for private repositories, file-based access control is desired. A translator should only be able to clone translation relevant files.
It comes in handy if the vscode extension automatically strips quotation marks from patterns/strings.
const x = "hello world"
-> highlighting "hello world"
-> strip ""
-> only extract hello world
This page says translations can be converted with converters when downloading formats other than fluent.
Is there any existing converter? I couldn't find info regarding existing options.
Or is that wip?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.