Skip to content

Commit

Permalink
Add text domain for dataviews
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeyGuyDylan committed Jan 30, 2025
1 parent 37eaa07 commit c1fe1db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,8 @@ div.dataviews-view-list {
justify-content: space-between;
}

&:not(.is-selected).is-hovered,
&:not(.is-selected):hover {
.dataviews-view-list__fields {
color: #757575;
}
}
&:not(.is-selected).is-hovered {
background-color: transparent;

.dataviews-view-list__fields {
Expand Down
4 changes: 4 additions & 0 deletions projects/packages/my-jetpack/src/products/class-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ public static function has_trial_support() {
* @return ?string
*/
public static function get_purchase_url() {
$status = static::get_status();
if ( $status === Products::STATUS_NEEDS_FIRST_SITE_CONNECTION ) {
return null;
}
// The returning URL could be customized by changing the `redirect_uri` param with relative path.
return sprintf(
'%s#!/stats/purchase/%d?from=jetpack-my-jetpack%s&redirect_uri=%s',
Expand Down
14 changes: 14 additions & 0 deletions projects/packages/my-jetpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ module.exports = [
includeNodeModules: [ '@automattic/jetpack-' ],
} ),

// Add textdomains (but no other optimizations) for @wordpress/dataviews.
jetpackWebpackConfig.TranspileRule( {
includeNodeModules: [ '@wordpress/dataviews/' ],
babelOpts: {
configFile: false,
plugins: [
[
require.resolve( '@automattic/babel-plugin-replace-textdomain' ),
{ textdomain: 'jetpack-my-jetpack' },
],
],
},
} ),

// Handle CSS.
jetpackWebpackConfig.CssRule( {
extensions: [ 'css', 'sass', 'scss' ],
Expand Down

0 comments on commit c1fe1db

Please sign in to comment.