Giter Site home page Giter Site logo

dasmikko / i18n-editor Goto Github PK

View Code? Open in Web Editor NEW
36.0 3.0 1.0 1.35 MB

A super simple editor for vue-18n by kazupon

Home Page: http://rekna.xyz/i18n-editor/

HTML 0.08% Vue 10.08% JavaScript 89.30% SCSS 0.05% CSS 0.30% TypeScript 0.19%
vuejs vue-i18n javascript i18n

i18n-editor's Introduction

i18n Editor

A super simple editor for vue-18n by kazupon

It is hosted on github pages

Styling is a bit broken, but functionally works.

I'm working on a complete revamped version of this, that ditches my format, and goes back to having seperate files

Screenshot of the editor

What is this?

The goal of the tool is to simplify editing the language files, and not having to hassle with multiple files.

Normally you would have multiple JSON files for each language, like da.json, en.json and so on.

This can be quite tedious to maintain, especially when you have a lot of entries, or even add a whole new language.

Here is an example of my format for language files:

{
  "common": {
    "logoff": {
      "da": "Log af",
      "en": "Logout"
    },
    "saveCurrentView": {
      "da": "Gem nuværende view",
      "en": "Save current view"
    },
    "search": {
      "da": "Søg",
      "en": "Search"
    }
  }
}

In my version, each key contains all the languages, making it easier to edit.

I've made a Gist where I show how to use it in your own Vue.js project.

Don't worry, it's very easy to use my format.

How to use

First time use

git clone [email protected]:dasmikko/i18n-editor.git
cd i18n-editor
npm install
npm run build
npm run serve

After use

npm run serve

How to update

Simply do a git pull and run:

npm install
npm run build

Then you can run the npm run serve as usual

i18n-editor's People

Contributors

dasmikko avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chazgorman

i18n-editor's Issues

when renaming object key

If you want to renaming object key but you cancel and want to open again it will be empty and may cause some issues.

I fixed it in (RenameDialog.vue) by editting these lines.

starting line 54

  watch(
      dialogVisible,
      (val) => {
        if (!val) inputValue.value = props.currentPath[props.currentPath.length - 1]
      }
  )

Support for embedding i18n-editor in other Vue apps

Hi, this project looks awesome!

Was wondering if it's currently possible—or a goal of the project—to be able to embed this entire editor within another Vue app? i.e. npm install @dasmikko/i18n-editor?

I would be interested in a Figma Plugin context, using this editor as a Vue component and passing translation files to it and then saving the resulting translation data back into a Figma frame essentially. If the component usage is already possible, is there documentation on the props and setup methods for people who want to use this as a library component?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.