Skip to content

Added CocoaError messages #2148

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

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

colemancda
Copy link
Contributor

Add missing error messages for known CocoaError codes.

Generated from playground on macOS 10.14.4

@colemancda
Copy link
Contributor Author

CC @millenomi @compnerd

@@ -670,6 +670,43 @@ public struct CocoaError : _BridgedStoredNSError {
}
}

internal extension CocoaError {
static let errorMessages = [
Code(rawValue: 4): "The file doesn’t exist.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you open a bug on https://bugs.swift.org to localize these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@millenomi
Copy link
Contributor

@swift-ci please test

@colemancda
Copy link
Contributor Author

@millenomi Ok, but to be clear, at the moment there is no support for NSLocalizedString() on non-Darwin platforms right?

@millenomi
Copy link
Contributor

NSLocalizedString(…) should work, and bundle resources work as well. We just don't have the string files, or a bundle for the Foundation module.

@millenomi millenomi merged commit 73c2878 into swiftlang:master Apr 22, 2019
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.

2 participants