-
Notifications
You must be signed in to change notification settings - Fork 198
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
Localize more items #680
Localize more items #680
Conversation
Hi, @jpenna. I converted it to a draft PR. Please mark it as ready for review if it's ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the icons for text_direction_right
and left
to text_direction_ltr
and rtl
, respectively. The meaning of the image is clearer this way and they were actually used with the opposite command.
@@ -1,79 +1,42 @@ | |||
{ | |||
"@@locale": "en", | |||
"bold": "Bold", | |||
"@bold": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed these metadatas because they were useless bloat in these situations.
"cmdDontAddNewLineInTableCell": "Don't add new line in table cell", | ||
"cmdMoveToLeftCellIfItsAtStartOfCurrentCell": "Move to left cell if its at start of current cell", | ||
"cmdMoveToRightCellIfItsAtTheEndOfCurrentCell": "Move to right cell if its at the end of current cell", | ||
"cmdMoveToUpCellAtSameOffset": "Move to up cell at same offset", | ||
"cmdMoveToDownCellAtSameOffset": "Move to down cell at same offset", | ||
"cmdNavigateAroundTheCellsAtSameOffset": "Navigate around the cells at same offset", | ||
"cmdNavigateAroundTheCellsAtSameOffsetInReverse": "Navigate around the cells at same offset in reverse", | ||
"cmdStopAtTheBeginningOfTheCell": "Stop at the beginning of the cell" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will be useful for AppFlowy-IO/AppFlowy#4426
? AppFlowyEditorL10n.current.colAddBefore | ||
: AppFlowyEditorL10n.current.rowAddBefore, | ||
dir == TableDirection.col | ||
? Icons.last_page | ||
: Icons.vertical_align_bottom, () { | ||
TableActions.add(node, position + 1, editorState, dir); | ||
? Icons.first_page | ||
: Icons.vertical_align_top, () { | ||
TableActions.add(node, position, editorState, dir); | ||
dismissOverlay(); | ||
}), | ||
_menuItem( | ||
context, | ||
dir == TableDirection.col | ||
? AppFlowyEditorL10n.current.colAddBefore | ||
: AppFlowyEditorL10n.current.rowAddBefore, | ||
? AppFlowyEditorL10n.current.colAddAfter | ||
: AppFlowyEditorL10n.current.rowAddAfter, | ||
dir == TableDirection.col | ||
? Icons.first_page | ||
: Icons.vertical_align_top, () { | ||
TableActions.add(node, position, editorState, dir); | ||
? Icons.last_page | ||
: Icons.vertical_align_bottom, () { | ||
TableActions.add(node, position + 1, editorState, dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the order of these two, so "add before" comes before "add after", which makes more sense.
@@ -251,7 +251,7 @@ class _TableBlockComponentWidgetState extends State<TableBlockComponentWidget> | |||
} | |||
|
|||
SelectionMenuItem tableMenuItem = SelectionMenuItem( | |||
name: AppFlowyEditorL10n.current.table, | |||
getName: () => AppFlowyEditorL10n.current.table, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better way to achieve this same thing would be to rebuild everything if Intil
changes, but then it would require a long refactor of many classes to use Localizations.of(context)
or add some listener to rebuild everything. Probably something to be thought about later?
I'll send another PR with the translations of commands. It will be quite large, so we can merge this one first. |
@jpenna One test failed. Please check it. |
f962696
to
0a3a92e
Compare
* main: fix: pasting keeps current node type (AppFlowy-IO#689) chore: localize more items (AppFlowy-IO#680) fix: windows chinese ime issue (AppFlowy-IO#682) fix: upgrade markdown to 7.2.1 (AppFlowy-IO#686)
This is related to the PR AppFlowy-IO/AppFlowy#4426
It should be merged before the one in the app is merged.
I'm also doing the PT-BR translation in this PR to verify all texts are correctly replaced.