Code Monkey home page Code Monkey logo

wp-languages.1815.io's Introduction

wp-languages.1815.io

Features

  • Automatically creates composer packages for WordPress translations from api.wordpress.org.
  • This repo provides custom satis repository for WordPress languages. See more in wp-languages.1815.io.
  • To add more language files please submit a pull request to the src branch.
  • Repos are updated every half hour.

Example configuration with composer

This example adds all translations from finnish and french packages.

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://wp-languages.1815.io",
            "only": [
                "koodimonni-language/*",
                "koodimonni-plugin-language/*",
                "koodimonni-theme-language/*"
            ]
        }
    ],
    "require": {
        "koodimonni-language/fi": "*",
        "koodimonni-language/fr_fr": "*"
    },
    "extra": {
        "dropin-paths": {
            "web/app/languages/": ["vendor:koodimonni-language"],
            "web/app/languages/plugins/": ["vendor:koodimonni-plugin-language"],
            "web/app/languages/themes/": ["vendor:koodimonni-theme-language"]
        },
    }
}

Request packages

If package what you're looking for can't be found look first the response from api:

https://api.wordpress.org/translations/core/1.0/

If your language is not listed in the response we can't help you. You'll need to ask from wp-core translators instead.

This is pretty static repository, and we can't add all possible plugins here.

Manually adding any language zip to your composer.json

There's also manual method of including any translation in WordPress.org. This is useful because we can't include all plugins in this repository. Let's look how to add french (fr_FR) jetpack translations. First search the api for jetpack translations:

$ curl -s 'https://api.wordpress.org/translations/plugins/1.0/?slug=jetpack' | python -m json.tool

Choose your language zip from json output for example for us it was: https://downloads.wordpress.org/translation/plugin/jetpack/3.9.2/fr_FR.zip

Then add it to your composer like this example. You just need to update the version number everytime the package updates.

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "koodimonni-plugin-language/jetpack-fr_fr",
                "type": "wordpress-language",
                "version": "3.9.2",
                "dist": {
                    "type": "zip",
                    "url": "https://downloads.wordpress.org/translation/plugin/jetpack/3.9.2/fr_FR.zip",
                    "reference": "master"
                }
            }
        }
    ],
    "require": {
        "koodimonni/composer-dropin-installer": "*",
        "koodimonni-plugin-language/jetpack-fr_fr": ">=3.9.2"
    },
    "extra": {
        "dropin-paths": {
            "dropin-paths": {
            "web/app/languages/": ["vendor:koodimonni-language"],
            "web/app/languages/plugins/": ["vendor:koodimonni-plugin-language"],
            "web/app/languages/themes/": ["vendor:koodimonni-theme-language"]
        },
        }
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details

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.