mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
Adding seperate translation files for packages.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
const name = 'coral-plugin-comment-count';
|
||||
|
||||
const CommentCount = ({items, id}) => {
|
||||
@@ -15,9 +16,11 @@ const CommentCount = ({items, id}) => {
|
||||
}
|
||||
}
|
||||
|
||||
return <div className={`${name }-text`}>
|
||||
{`${count } ${ count === 1 ? 'Comment' : 'Comments'}`}
|
||||
return <div className={`${name}-text`}>
|
||||
{`${count} ${count === 1 ? lang.t('comment') : lang.t('comment-plural')}`}
|
||||
</div>;
|
||||
};
|
||||
|
||||
export default CommentCount;
|
||||
|
||||
const lang = new I18n(translations);
|
||||
|
||||
Reference in New Issue
Block a user