定制 oblik/kirby-memsource 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oblik/kirby-memsource

Composer 安装命令:

composer require oblik/kirby-memsource

包简介

Kirby integration for the Phrase (formerly Memsource) TMS service.

README 文档

README

Memsource integration for Kirby

This plugin allows you to translate your entire site content in the powerful TMS Memsource:

  • Create Memsource jobs with great control over what's exported
  • Import Memsource jobs with reports for what has changed
  • Great control over the exported format of fields via kirby-walker
  • Support for the Kirby Editor
Exporting Content Importing Translations
export demo import demo

Note: Currently does not support Kirby 3.6 and above.

Installation

With Composer from oblik/kirby-memsource on Packagist:

composer require oblik/kirby-memsource

Sign up for a developer account in Memsource.

Context notes

You can specify comments to aid translators by adding them in the blueprint:

fields:
    heading:
        type: text
        memsource:
            note: This is the title of the page.

When exported, the JSON will look like this:

{
    "pages": {
        "home": {
            "heading": {
                "$value": "Hello World!",
                "$note": "This is the title of the page."
            }
        }
    }
}

Then, you can configure Memsource's context note functionality to trigger on $note keys.

Settings

You can configure the plugin in your site/config.php:

return [
    'oblik.memsource' => [
        // settings…
    ]
];

Credentials

Add your Memsource account credentials:

return [
    'oblik.memsource' => [
        'login' => [
            'username' => 'john',
            'password' => '1234'
        ]
    ]
];

Remove <br> tags

You might want to put <br> to force text to break at specific positions in order to achieve a certain layout effect. This is pretty much impossible to be achieved in translations because the text will have different word length and overall length.

For this reason, you might want to remove <br> tags from your exports:

return [
    'oblik.memsource' => [
        'walker' => [
            'removeBrTags' => true
        ]
    ]
];

Dynamic context notes

You may generate context notes on the fly:

return [
    'oblik.memsource' => [
        'walker' => [
            'contextNote' => function ($value) {
                if (strpos($value, '{{ year }}') !== false) {
                    return "{{ year }} is the current calendar year.";
                }
            }
        ]
    ]
];

统计信息

  • 总下载量: 90
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固