-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move more i18n data translations to Intl plugin #8101
Conversation
I can imagine those strings might be used by a couple of other plugins? Especially Piwik PRO plugins but also other plugins maybe? Would it make maybe sense to deprecate those keys first before completely removing them? Might be overdoing it, just a question. Would be otherwise at least worth mentioning in the developer changelog. Only did a check for three strings. |
The move looks good. For the question of backward compatibility it seems there's a piece of code to handle that in |
I've updated the comment in Translator class and added a note to the changelog |
@tsteur regarding the translations used in Piwik mobile. I've got an idea how to handle that a better way, but I'll create a ticket therefor. See matomo-org/matomo-mobile-2#5343 |
Just wondering: Is it easily possible to automatically generate a list of added and removed translation keys for a certain release? Could be nice for the future |
Should not be that difficult. I'll have a look at that...
|
I'm just wondering where to list them then. Wouldn't want to bloat the changelog with them :) |
@sgiehl FYI in an attempt to clarify, created: #8125 (comment) I suggested |
added to 2.14.0 milestone |
Making some of the translations a "part of the API" sound good. But we should consider which keys to make "permanent", so we do not have to change them frequently. |
I reckon it's good to move more and more translation keys to an For the Piwik specific keys like "Websites", "Super User", ... we could maybe use a different category like This way it would be very clear for core developers and plugin developers when a translation key becomes API and which keys won't change etc. Eg we could just write "All translation keys that start with Intl_ or General_ are considered API, all other ones can change over time even though it is rather unlikely". Or something similar... |
…ranslated strings in non core plugins
I agree with @tsteur |
Hi @sgiehl sounds good. Do you mind create follow up issue, and merge the PR? |
Move more i18n data translations to Intl plugin
----------------------- ## Piwik 2.14.0 ### Breaking Changes * The `UserSettings` API has been removed. The API was deprecated in earlier versions. Use `DevicesDetection`, `Resolution` and `DevicePlugins` API instead. * Many translations have been moved to the new Intl plugin. Most of them will still work, but please update their usage. See matomo-org/matomo#8101 for a full list ### New features * The JavaScript Tracker does now track outlinks and downloads if a user opens the context menu if the `enabled` parameter of the `enableLinkTracking()` method is set to `true`. To use this new feature use `tracker.enableLinkTracking(true)` or `_paq.push(['enableLinkTracking', true]);`. This is not industry standard and is vulnerable to false positives since not every user will select "Open in a new tab" when the context menu is shown. Most users will do though and it will lead to more accurate results in most cases. * The JavaScript Tracker now contains the 'heart beat' feature which can be used to obtain more accurate visit lengths by periodically sending 'ping' requests to Piwik. To use this feature use `tracker.enableHeartBeatTimer();` or `_paq.push(['enableHeartBeatTimer']);`. By default, a ping request will be sent every 15 seconds. You can specify a custom ping delay (in seconds) by passing an argument, eg, `tracker.enableHeartBeatTimer(10);` or `_paq.push(['enableHeartBeatTimer', 10]);`. * New custom segment `languageCode` that lets you segment visitors that are using a particular language. Example values: `de`, `fr`, `en-gb`, `zh-cn`, etc. * Segment `userId` now supports any segment operator (previously only operator Contains `=@` was supported for this segment). ### Commands updates * The command `core:archive` now has two new parameter: `--force-idsegments` and `--skip-idsegments` that let you force (or skip) processing archives for one or several custom segments. * The command `scheduled-tasks:run` now has an argument `task` that lets you force run a particular scheduled task. ### Library updates * Updated pChart library from 2.1.3 to 2.1.4. The files were moved from the directory `libs/pChart2.1.3` to `libs/pChart` ### Internal change * To execute UI tests "ImageMagick" is now required. * The Q JavaScript promise library is now distributed with tests and can be used in the piwik.js tests.
matomo-org/plugin-CustomAlerts#16 needs to be merged afterwards