web-vision/deepl-base
Composer 安装命令:
composer require web-vision/deepl-base
包简介
DeepL Base - Provides shared things across deepl related extensions, for example a shared point when overriding same TYPO3 backend fluid files are required and similar.
README 文档
README
| URL | |
|---|---|
| Repository: | https://github.com/web-vision/deepl-base |
| Read online: | https://docs.typo3.org/p/web-vision/deepl-base/main/en-us/ |
| TER: | https://extensions.typo3.org/extension/deepl_base/ |
Description
This package is a TYPO Extension providing some shared things required by multiple deepl translate or write related extensions, which should work together but must work independent of each other, requiring this shared base extension as common ground.
Note
This extension does not provide anything useful as direct usage, and makes no sense to install it standalone. Should only be a dependency for other extensions.
Compatibility
| Branch | Version | TYPO3 | PHP |
|---|---|---|---|
| main | 2.0.x-dev | v13 | 8.2, 8.3, 8.4, 8.5 (depending on TYPO3) |
| 1 | ^1, 1.0.x-dev | v12 + v13 | 8.1, 8.2, 8.3, 8.4 (depending on TYPO3) |
Installation
Install with your flavour:
- TER
- Extension Manager
- composer
We prefer composer installation:
composer require 'web-vision/deepl-base':'2.*.*@dev'
Note
Until first release you may need to ensure allowing dev versions but preferring stable releases which requires:
composer config minimum-stability "dev" \ && composer config "prefer-stable" true \ && composer require 'web-vision/deepl-base':'2.*.*@dev'
Documentation
Note
For the start, the documentation for developers and integrators is contained here in the README.md file and will be converted into rendered documentation at a later point.
PageLayout module localization model - Translation Modes
ViewHelper
InjectVariablesViewHelper
InjectVariablesViewHelper can be placed in fluid templates and
requires to define a speaking identifier used to dispatch the PSR-14
ModifyInjectVariablesViewHelperEvent event, which can be used to
set or modify variables either in the global current template scope
or for children rendering scope.
Example usage in fluid template
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:deeplbase="http://typo3.org/ns/WebVision/Deepl/Base/ViewHelpers" > <deeplbase:injectVariables identifier="custom-template-variable-inject"> Render {globalOrLocalVariableProviderVariable} only available in children context. </deeplbase:injectVariables> Render {globalOnlyVariableProviderVariable} only ignoring local variable provider changes. </html>
Explicit usage from this extension
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:deeplbase="http://typo3.org/ns/WebVision/Deepl/Base/ViewHelpers" > <deeplbase:injectVariables identifier="languageTranslationDropdown"> <f:for each="{translationPartials}" as="translationPartial"> <f:render partial="{translationPartial}" arguments="{_all}"/> </f:for> </deeplbase:injectVariables> </html>
What does it do?
This part renders partials registered by an EventListener. With this identifier an extension could provide its own translation dropdown for the Backend PageView. The extension must be self-aware registering a partial, which is callable by Fluid.
A working example is provided at Classes/EventListener/DefaultTranslationDropdownEventListener.php
and Resources/Private/Backend/Partials/Translation/DefaultTranslationDropdown.html.
ModifyInjectVariablesViewHelperEvent
getIdentifier(): string: identifier used within the fluid template and shouldgetGlobalVariableProvider(): VariableProviderInterface: provides the fluid variable container of the current context. Modification will be available after the ViewHelper and within the children context unless overridden within thegetLocalVariableProvider.getLocalVariableProvider(): VariableProviderInterface: provides the fluid variable container with children context only variables, overriding global variables. Local variable does not change the variables in the template after the ViewHelper call.
Modified Backend Templates
Note
Modifed backend templates are listed here describing the modification, for example, if one or more InjectVariableViewhelper has been placed along with the identifier and use-case.
Create a release (maintainers only)
Prerequisites:
- git binary
- ssh key allowed to push new branches to the repository
- GitHub command line tool
ghinstalled and configured with user having permission to create pull requests.
Prepare release locally
Set
RELEASE_BRANCHto branch release should happen, for example: 'main'. SetRELEASE_VERSIONto release version working on, for example: '1.0.0'.
echo '>> Create release based on configuration' ; \ RELEASE_BRANCH='main' ; \ RELEASE_VERSION="2.0.4" ; \ DEV_VERSION="2.0.5" ; \ echo ">> Checkout branches" && \ git checkout main && \ git fetch --all && \ git pull --rebase && \ git checkout ${RELEASE_BRANCH} && \ git pull --rebase && \ echo ">> Create release ${RELEASE_VERSION}" && \ git checkout -b release-${RELEASE_VERSION} && \ sed -i "s/^COMPOSER_ROOT_VERSION.*/COMPOSER_ROOT_VERSION=\"${RELEASE_VERSION}\"/" Build/Scripts/runTests.sh && \ sed -i "s/^ RELEASE_VERSION.*/ RELEASE_VERSION=\"${RELEASE_VERSION}\" ; \\\\/" README.md && \ sed -i "s/^ DEV_VERSION.*/ DEV_VERSION=\"${DEV_VERSION}\" ; \\\\/" README.md && \ tailor set-version ${RELEASE_VERSION} && \ composer config "extra"."typo3/cms"."version" "${RELEASE_VERSION}" && \ echo "${RELEASE_VERSION}" > VERSION && \ git add . && \ git commit -m "[RELEASE] ${RELEASE_VERSION}" && \ git push --set-upstream origin release-${RELEASE_VERSION} && \ gh pr create --fill --base ${RELEASE_BRANCH} --title "[RELEASE] ${RELEASE_VERSION}" && \ sleep 10 && \ gh pr checks --watch --interval 2 && \ sleep 10 && \ gh pr merge -rd --admin && \ git remote prune origin && \ git tag ${RELEASE_VERSION} && \ git push origin ${RELEASE_VERSION} && \ echo ">> Post-release - set dev version: ${DEV_VERSION}-dev" && \ git checkout -b set-version-${DEV_VERSION} && \ sed -i "s/^COMPOSER_ROOT_VERSION.*/COMPOSER_ROOT_VERSION=\"${DEV_VERSION}-dev\"/" Build/Scripts/runTests.sh && \ tailor set-version ${DEV_VERSION} && \ composer config "extra"."typo3/cms"."version" "${DEV_VERSION}-dev" && \ echo "${DEV_VERSION}-dev" > VERSION && \ git add . && \ git commit -m "[TASK] Set dev version ${DEV_VERSION}" && \ git push --set-upstream origin set-version-${DEV_VERSION} && \ gh pr create --fill --base ${RELEASE_BRANCH} --title "[TASK] Set dev version \"${DEV_VERSION}-dev\"" && \ sleep 10 && \ gh pr checks --watch --interval 2 && \ sleep 10 && \ gh pr merge -rd --admin && \ git remote prune origin
web-vision/deepl-base 适用场景与选型建议
web-vision/deepl-base 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 132.23k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「extension」 「translate」 「TYPO3 CMS」 「deepl」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 web-vision/deepl-base 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 web-vision/deepl-base 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 web-vision/deepl-base 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy to use i18n translation PHP class for multi-language websites
Store your language lines in the database, yaml or other sources
A custom URL rule class for Yii 2 which allows to create translated URL rules
Set Links with a specific language parameter
An Astrotomic Translatable extension for Laravel Nova.
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
统计信息
- 总下载量: 132.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 35
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-05-16