定制 m2mtech/weblate-translation-provider 二次开发

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

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

m2mtech/weblate-translation-provider

最新稳定版本:v1.2.0

Composer 安装命令:

composer require m2mtech/weblate-translation-provider

包简介

Symfony Weblate Translation Provider Bridge

README 文档

README

Author Software License

This bundle provides a Weblate integration for Symfony Translation.

Installation

composer require m2mtech/weblate-translation-provider

If you are not using Flex enable the bundle:

// config/bundles.php

return [
    // ...
    M2MTech\WeblateTranslationProvider\WeblateTranslationProviderBundle::class => ['all' => true],
];

Enable the translation provider:

# config/packages/translation.yaml
framework:
    translator:
        providers:
            weblate:
                dsn: '%env(WEBLATE_DSN)%'
                locales: ['en', 'de']

and set the DSN in your .env file:

# .env
WEBLATE_DSN=weblate://PROJECT_NAME:API_TOKEN@WEBLATE_URL

If you are using a local weblate instance, you can disable the usage of https and/or the verification of the used certificate:

# config/packages/weblate.yaml
weblate_translation_provider:
    https: false
    verify_peer: false

Usage

bin/console translation:push [options] weblate
bin/console translation:pull [options] weblate

Testing

This package has been developed for php 7.4 with compatibility tested for php 7.2 to 8.2RC2.

composer test

For compatibility tests with Symfony 5.3 to 6.0 including a local weblate instance please use the symfony-weblate-tests package.

Changelog

Please see CHANGELOG for more information about recent changes.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 25.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 3
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-15