I see that you’ve already contributed some translations here:
https://translate.www.ads-software.com/projects/wp-plugins/post-views-for-jetpack/stable/ro/default/
First of all, thank you! That is indeed the right way to go. I would recommend submitting more translations; as soon as 95% of the strings of any plugin are translated into a language, those translations are then sent to all WordPress sites that use that plugin in this language.
Until the translations you’ll submit are validated and land on your site, you can use a functionality plugin to customize the output of the plugin, like so:
/**
* customize the output of the Views shortcode.
*
* @param string $view Phrase outputting the number of views.
* @param array $views Number of views.
* @param string $post_id Post ID.
*/
function jeherve_ro_views( $view, $views, $post_id ) {
if ( isset( $views ) && ! empty( $views ) ) {
$view = sprintf(
esc_html(
_n(
'%s vizualiz?ri',
'%s de vizualiz?ri',
$views['total'],
'default'
)
),
number_format_i18n( $views['total'] )
);
} else {
$view = esc_html__( 'Nicio vizualizare', 'default' );
}
return $view;
}
add_filter( 'jp_post_views_output', 'jeherve_ro_views', 10, 3 );