承接 samuelvi/translator-symfony-demo-googledrive-to-yml 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

samuelvi/translator-symfony-demo-googledrive-to-yml

Composer 安装命令:

composer create-project samuelvi/translator-symfony-demo-googledrive-to-yml

包简介

Spreadsheet Translator. Symfony Demo Application. Takes a Google Drive spreadsheet and creates translation files per locale in YAML format

README 文档

README

Introduction

Lightweight Symfony Demo Application for the Spreadsheet Translator functionality. This demo brings a command that takes a Google Drive spreadsheet and creates translation files per locale in YAML format.

Installation

composer create-project samuelvi/translator-symfony-demo-googledrive-to-yml

This will install the demo application into your computer.

Configuration

Before running the demo, configure your Google Drive spreadsheet URL in config/packages/atico_spreadsheet_translator.yaml:

atico_spreadsheet_translator:
    frontend:
        provider:
            name: 'google_drive'
            source_resource: 'https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit#gid=0'
        exporter:
            format: 'yml'
            prefix: 'demo_'
            destination_folder: '%kernel.project_dir%/translations'
        shared:
            default_locale: 'en'
            name_separator: '_'

Important: Make sure your Google Spreadsheet is publicly accessible for the provider to download it.

Running the demo

Type in your terminal:

bin/console atico:demo:translator --sheet-name=common --book-name=frontend

This command will generate the translation files that will be stored into the translations/ folder.

The generated files will be:

translations/
├── demo_common.en_GB.yml
├── demo_common.es_ES.yml
└── demo_common.fr_FR.yml

demo_common.en_GB.yml will contain:

homepage:
    title: >
        Secured Spreadsheet translator
    subtitle: >
        Translator of web pages from secured spreadsheet

Notes

composer.json includes the following Spreadsheet Translator dependencies:

  "samuelvi/spreadsheet-translator-core": "^8.4",
  "samuelvi/spreadsheet-translator-symfony-bundle": "^8.0",
  "samuelvi/spreadsheet-translator-provider-googledrive": "^8.0",
  "samuelvi/spreadsheet-translator-reader-xlsx": "^8.1",
  "samuelvi/spreadsheet-translator-exporter-yml": "^8.0"

Related

Symfony Bundle:

Symfony Demos:

Requirements

  • PHP >=8.4
  • Symfony >=7.0

Development

Quick Start

Get started quickly with the complete setup:

# Complete setup: build, start Docker, and install dependencies
make setup

# Run the demo
make demo

Available Commands

Run make or make help to see all available commands with descriptions.

Testing

This project includes a comprehensive test suite with unit, integration, and functional tests.

Run all tests:

# Run all tests in Docker
make test

# Run all tests locally (without Docker)
make test-local

# Run tests excluding network-dependent tests (for offline development)
make test-no-network

Run specific test suites:

# Unit tests only
make test-unit

# Integration tests only
make test-integration

# Functional tests only
make test-functional

# Generate coverage report
make test-coverage

Run tests with PHPUnit directly:

bin/phpunit

# Run specific test suite
bin/phpunit --testsuite "Unit Tests"

# Exclude network tests (for offline development)
bin/phpunit --exclude-group network

# Run specific test file
bin/phpunit tests/Unit/Command/TranslatorCommandTest.php

# Run specific test method
bin/phpunit --filter testExecuteWithBothOptions tests/Unit/Command/TranslatorCommandTest.php

Test Structure:

  • tests/Unit/ - Unit tests (isolated component testing with mocks)
  • tests/Integration/ - Integration tests (testing with real services)
  • tests/Functional/ - Functional tests (end-to-end user scenarios)
  • tests/Fixtures/ - Test fixtures and sample data

For detailed testing documentation, see tests/README.md.

Code Quality with Rector

This project uses Rector to maintain PHP 8.4 compliance and code quality standards.

Run Rector to check for potential improvements:

# In Docker
make rector-check

# Locally
make rector-local-check
# or
bin/rector process --dry-run

Apply Rector changes:

# In Docker
make rector-fix

# Locally
make rector-local-fix
# or
bin/rector process

The rector configuration (rector.php) includes:

  • PHP 8.4 compliance rules with modern fluent syntax
  • Code quality improvements
  • Dead code removal and privatization
  • Type declaration enhancements
  • Early return patterns and strict booleans
  • Symfony 7.0 best practices
  • Doctrine code quality rules
  • PHPUnit 11.0 rules
  • Annotations to attributes conversion
  • Parallel processing for faster execution

Quality Checks

Run comprehensive quality checks before committing:

# Run all quality checks (Rector + Tests without network)
make quality-check

# Run all CI checks (includes composer validation)
make ci

Docker Commands

# Build Docker images
make build

# Start services
make up

# Stop services
make down

# Restart services
make restart

# Access PHP container shell
make shell

# View container logs
make logs

Composer Commands

# Install dependencies
make install

# Update dependencies
make composer-update

# Validate composer.json and composer.lock
make composer-validate

Cleanup

# Clean generated files, caches, and test artifacts
make clean

Contributing

We welcome contributions to this project, including pull requests and issues (and discussions on existing issues).

If you'd like to contribute code but aren't sure what, the issues list is a good place to start. If you're a first-time code contributor, you may find Github's guide to forking projects helpful.

All contributors (whether contributing code, involved in issue discussions, or involved in any other way) must abide by our code of conduct.

License

Spreadsheet Translator Symfony Bundle is licensed under the MIT License. See the LICENSE file for full details.

samuelvi/translator-symfony-demo-googledrive-to-yml 适用场景与选型建议

samuelvi/translator-symfony-demo-googledrive-to-yml 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 samuelvi/translator-symfony-demo-googledrive-to-yml 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 samuelvi/translator-symfony-demo-googledrive-to-yml 我们能提供哪些服务?
定制开发 / 二次开发

基于 samuelvi/translator-symfony-demo-googledrive-to-yml 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-26