You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/30 04:18:16 UTC
[GitHub] [apisix-dashboard] liuxiran opened a new pull request #1153: fix: protable search&reset button i18n
liuxiran opened a new pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] Bugfix
___
### Bugfix
- Description
I found that the `Search` and `Reset` button did not change with the locale
![2020-12-30 11-27-11屏幕截图](https://user-images.githubusercontent.com/2561857/103328149-93c87280-4a92-11eb-9212-eeeeeaa94662.png)
![2020-12-30 11-26-51屏幕截图](https://user-images.githubusercontent.com/2561857/103328166-9f1b9e00-4a92-11eb-85f7-9cd050ddbf7e.png)
- How to fix?
Protable search config `searchText` and `resetText` accept `string` value [1], so I just tried to use `${formatMessage({ id: 'component.global.search' })}` , and it worked well
Reference:
[1] https://procomponents.ant.design/components/table/#search-%E6%90%9C%E7%B4%A2%E8%A1%A8%E5%8D%95
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#discussion_r550093071
##########
File path: web/src/pages/Consumer/List.tsx
##########
@@ -22,12 +22,12 @@ import { history, useIntl } from 'umi';
import { PlusOutlined } from '@ant-design/icons';
import { timestampToLocaleString } from '@/helpers';
-import useForceIntl from '@/hooks/useForceIntl';
+// import useForceIntl from '@/hooks/useForceIntl';
Review comment:
please remove the useless comment.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752322244
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=h1) Report
> Merging [#1153](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=desc) (1d74d42) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/3d14164e276eb3c846888f0c2fb4f264f950c816?el=desc) (3d14164) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1153/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1153 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=footer). Last update [3d14164...1d74d42](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io commented on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752322244
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=h1) Report
> Merging [#1153](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=desc) (bb3f036) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/3d14164e276eb3c846888f0c2fb4f264f950c816?el=desc) (3d14164) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1153/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1153 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=footer). Last update [3d14164...bb3f036](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
liuxiran commented on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752409058
> > I check the branch code and found a problem blow. Please have a check when you free. @liuxiran
> > ![image](https://user-images.githubusercontent.com/31329157/103343633-7e217000-4ac7-11eb-9f25-f25e5b307cc1.png)
>
> I just fixed it in #1157
How lucy we are to solve the same issue^_^, just another way to solve the problem, only for your reference @juzhiyuan
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752322244
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=h1) Report
> Merging [#1153](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=desc) (4027491) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/3d14164e276eb3c846888f0c2fb4f264f950c816?el=desc) (3d14164) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1153/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1153 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=footer). Last update [3d14164...4027491](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752398629
> I check the branch code and found a problem blow. Please have a check when you free. @liuxiran
>
> ![image](https://user-images.githubusercontent.com/31329157/103343633-7e217000-4ac7-11eb-9f25-f25e5b307cc1.png)
I just fixed it in #1157
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] LiteSun commented on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
LiteSun commented on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752395457
I check the branch code and found a problem blow. Please have a check when you free. @liuxiran
![image](https://user-images.githubusercontent.com/31329157/103343633-7e217000-4ac7-11eb-9f25-f25e5b307cc1.png)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
liuxiran commented on a change in pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#discussion_r550110123
##########
File path: web/src/pages/Consumer/List.tsx
##########
@@ -22,12 +22,12 @@ import { history, useIntl } from 'umi';
import { PlusOutlined } from '@ant-design/icons';
import { timestampToLocaleString } from '@/helpers';
-import useForceIntl from '@/hooks/useForceIntl';
+// import useForceIntl from '@/hooks/useForceIntl';
Review comment:
fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#discussion_r550175974
##########
File path: web/src/pages/SSL/List.tsx
##########
@@ -109,8 +107,8 @@ const Page: React.FC = () => {
actionRef={tableRef}
request={fetchList}
search={{
- searchText: formatMessage({ id: 'component.global.search' }),
- resetText: formatMessage({ id: 'component.global.reset' }),
+ searchText: `${formatMessage({ id: 'component.global.search' })}`,
+ resetText: `${formatMessage({ id: 'component.global.reset' })}`,
Review comment:
why not use formatMessage({ id: 'component.global.reset' }) directly?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
liuxiran commented on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752402887
> I check the branch code and found a problem blow. Please have a check when you free. @liuxiran
>
> ![image](https://user-images.githubusercontent.com/31329157/103343633-7e217000-4ac7-11eb-9f25-f25e5b307cc1.png)
good catch, already fixed, missed this module
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
liuxiran commented on a change in pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#discussion_r550209314
##########
File path: web/src/pages/SSL/List.tsx
##########
@@ -109,8 +107,8 @@ const Page: React.FC = () => {
actionRef={tableRef}
request={fetchList}
search={{
- searchText: formatMessage({ id: 'component.global.search' }),
- resetText: formatMessage({ id: 'component.global.reset' }),
+ searchText: `${formatMessage({ id: 'component.global.search' })}`,
+ resetText: `${formatMessage({ id: 'component.global.reset' })}`,
Review comment:
yes. you are right.
Infact when I debuged this feature, use `formatMessage({ id: 'component.global.reset' })` directly could not worked well, so I used thie way instead, and I could not figured out why. But now it worked, any way, fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] LiteSun merged pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
LiteSun merged pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1153: fix: protable search&reset button i18n
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1153:
URL: https://github.com/apache/apisix-dashboard/pull/1153#issuecomment-752322244
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=h1) Report
> Merging [#1153](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=desc) (a9a4172) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2d0fcd6e6efd5a5b666099f3b1f5582df34c646b?el=desc) (2d0fcd6) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1153/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
- Coverage 42.32% 42.27% -0.06%
==========================================
Files 31 31
Lines 1928 1928
==========================================
- Hits 816 815 -1
- Misses 1001 1002 +1
Partials 111 111
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1153/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.37% <0.00%> (-0.63%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=footer). Last update [2d0fcd6...a9a4172](https://codecov.io/gh/apache/apisix-dashboard/pull/1153?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org