Skip to content
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

SEP-24: Add lang field to GET /transactions and /transaction #1191

Merged
merged 4 commits into from
May 5, 2022

Conversation

lijamie98
Copy link
Contributor

No description provided.

@@ -663,6 +663,7 @@ Name | Type | Description
`limit` | int | (optional) The response should contain at most `limit` transactions.
`kind` | string | (optional) The kind of transaction that is desired. Should be either `deposit` or `withdrawal`.
`paging_id` | string | (optional) The response should contain transactions starting prior to this ID (exclusive).
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1).
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646](https://datatracker.ietf.org/doc/html/rfc4646) which means it can also accept locale in the format `en-US`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lijamie98 Thanks for opening this PR!

I tried pushing this new change to your branch but seems like I don't have permission. So I created this PR against your branch with a suggestion to update the lang definition in all places of Sep-24: #1192

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing the PR to make all lang definition consistent. 👍 I had merged the #1192.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lijamie98 thanks Jamie, I think you also need to accept the 2 suggestions I've made to your original PR here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind also adding the lang change to the Changelog at the bottom? Thanks!

Copy link
Contributor

@CassioMG CassioMG May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lijamie98 sorry but I think the suggestion from this very comment has not been accepted(pushed) yet ☝️ (seems like only 1 of the suggestions has been accepted)

The PR change for line 666 is still using the old text: "lang | string | (optional) Defaults to en. Language code specified using ISO 639-1."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should read like this:
lang | string | (optional) Defaults to en. Language code specified using [RFC 4646] which means it can also accept locale in the format en-US.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lijamie98 line 666 is still not updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CassioMG I will find out my issue about this git rebase which plays tricks on me. 😠

Updated and checked this time.

@@ -869,6 +870,7 @@ Name | Type | Description
`id` | string | (optional) The id of the transaction.
`stellar_transaction_id` | (optional) string | The stellar transaction id of the transaction.
`external_transaction_id` | (optional) string | The external transaction id of the transaction.
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1).
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646](https://datatracker.ietf.org/doc/html/rfc4646) which means it can also accept locale in the format `en-US`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified.

@lijamie98 lijamie98 changed the title Add lang field to GET /transactions and /transaction SEP-24: Add lang field to GET /transactions and /transaction May 5, 2022
Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three asks:

  1. Since this expands the capabilities of existing lang fields with the change in standard, can you bump the minor version to 2.3.0?

  2. Could you add a changelog entry?

  3. And, could you make the RFC and ISO references footnote references? e.g. do this:

    Language code specified using [RFC4646].
    
    [RFC4646]: https://datatracker.ietf.org/doc/html/rfc4646
    

@lijamie98 lijamie98 force-pushed the 2022-05-05-add-lang branch 4 times, most recently from b65eb28 to 6afb209 Compare May 5, 2022 16:16
@lijamie98
Copy link
Contributor Author

Three asks:

  1. Since this expands the capabilities of existing lang fields with the change in standard, can you bump the minor version to 2.3.0?

👍

  1. Could you add a changelog entry?

Added.

  1. And, could you make the RFC and ISO references footnote references? e.g. do this:
    Language code specified using [RFC4646].
    
    [RFC4646]: https://datatracker.ietf.org/doc/html/rfc4646
    

@CassioMG had added the footnote references in each of the lang definition`.

@@ -935,5 +937,6 @@ There is a small set of changes when upgrading from SEP-6 to SEP-24.
* Solar wallet: https://solarwallet.io

## Changelog
* `v2.3.0`: Add `lang` field to GET `/transactions` and `/transaction`. Make `lang` field definition consistent. ([#1191](https://github.com/stellar/stellar-protocol/pull/1191))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest change to lead with the larger change, and be explicit about what is changing:

Suggested change
* `v2.3.0`: Add `lang` field to GET `/transactions` and `/transaction`. Make `lang` field definition consistent. ([#1191](https://github.com/stellar/stellar-protocol/pull/1191))
* `v2.3.0`: Change `lang` format from [ISO639-1] to [RFC4646] which is a superset of [ISO639-1]. Add `lang` field to GET `/transactions` and `/transaction`. ([#1191](https://github.com/stellar/stellar-protocol/pull/1191))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@leighmcculloch
Copy link
Member

leighmcculloch commented May 5, 2022

@lijamie98 I pushed a change in 840ba3e using footnotes. Feel free to revert the commit if you disagree.

@lijamie98 lijamie98 force-pushed the 2022-05-05-add-lang branch 2 times, most recently from ed64389 to 62accef Compare May 5, 2022 17:03
CassioMG
CassioMG previously approved these changes May 5, 2022
Copy link
Contributor

@CassioMG CassioMG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lijamie98
Copy link
Contributor Author

@lijamie98 I pushed a change in 840ba3e using footnotes. Feel free to revert the commit if you disagree.

LGTM!

(cherry picked from commit 840ba3e)
@leighmcculloch
Copy link
Member

@lijamie98 I pushed a change in 840ba3e using footnotes. Feel free to revert the commit if you disagree.

LGTM!

Looks like the commit got accidentally clobbered in a force-push. Just re-pushed it as d536285.

@leighmcculloch leighmcculloch merged commit 212dd93 into master May 5, 2022
@leighmcculloch leighmcculloch deleted the 2022-05-05-add-lang branch May 5, 2022 23:48
@lijamie98
Copy link
Contributor Author

lijamie98 commented May 6, 2022

@leighmcculloch Thanks for merging the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants