npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@office_app/oa-poeditor-sync

v1.2.0

Published

A node.js utility to sync poeditor translations with Office App web products

Downloads

8

Readme

npm version

oa-poeditor-sync

oa-poeditor-sync is a simple node.js script to synchronize and post-process internationalization catalogs from POEditor.com

Published on npm at: https://www.npmjs.com/package/@office_app/oa-poeditor-sync

It downloads the JSON files, replaces iOS specific symbols with web symbols (newline to breaks, markdown to href, backslashes etc.) and writes the files to src/locales in your project.

The language catalogs from POEditor are shared amongst the webapp, iOS and Android. For this reason, a common denominator was chosen for translation string markup. iOS is the leading platform for this at Office App.

For web, we have to transform the following tokens:

  • \n (newline): <br /> (break)
  • [description](http://domain.com/) (markdown style link): <a href="http://domain.com/">description</a> (a href)
  • %@ (text placeholder): {1}
  • %d (integer): ??

See: https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-vue-app-with-vue-i18n

Update feb 2021

For vue-18n-next, some changes were required.

Most notably, the '@'-sign is no longer allowed in translations and has to be wrapped.

More info here: https://github.com/intlify/vue-i18n-next/issues/118

This is the reason sync-v2.js was created. This version will need to be called in projects using vue-i18n-next.

Installation

Install from npm:

$ npm i @office_app/oa-poeditor-sync -D

(or use yarn add @office_app/oa-poeditor-sync -D)

Usage

Set POEDITOR_API_TOKEN and POEDITOR_PROJECT_ID as environment variables.

Go to https://poeditor.com/ to get the values for both.

Then run:

$ npx oa-poeditor-sync

It should give output similar to:

Pulling Dutch (nl) with coverage 98% (1214 messages)
Pulling English (en) with coverage 100% (1232 messages)
Pulling French (fr) with coverage 100% (1232 messages)
Pulling German (de) with coverage 98% (1217 messages)
Pulling Italian (it) with coverage 98% (1216 messages)
Pulling Norwegian Bokmål (nb) with coverage 98% (1216 messages)
Locale file downloaded and post-processed: nl.
Locale file downloaded and post-processed: nb.
Locale file downloaded and post-processed: en.
Locale file downloaded and post-processed: de.
Locale file downloaded and post-processed: fr.
Locale file downloaded and post-processed: it.

When it's done, take a look in the src/locales/ directory of your project.

More info

Ask Gijs Nijholt (gijs at getofficeapp com)

https://www.getofficeapp.com/