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

(PUP-7042) Mark strings in type #5566

Merged
merged 2 commits into from Apr 12, 2017
Merged

Conversation

Magisus
Copy link
Contributor

@Magisus Magisus commented Jan 30, 2017

This commit marks user-facing error and info strings in
lib/puppet/type/* for translation.

@puppetcla
Copy link

CLA signed by all contributors.

@Magisus Magisus changed the base branch from 5.0 to master February 2, 2017 17:56
@Magisus Magisus changed the base branch from master to 4.10.x March 2, 2017 19:02
@Magisus
Copy link
Contributor Author

Magisus commented Mar 2, 2017

Closing and reopening to fix Travis.

@Magisus Magisus closed this Mar 2, 2017
@Magisus Magisus reopened this Mar 2, 2017
@Magisus Magisus force-pushed the PUP-7042/type branch 2 times, most recently from cf626fe to 3622a09 Compare March 13, 2017 21:17
This commit marks user-facing error and info strings in
`lib/puppet/type/*` for translation.
@Magisus Magisus changed the base branch from 4.10.x to master March 22, 2017 18:40
@Magisus
Copy link
Contributor Author

Magisus commented Mar 22, 2017

Closing and reopening to fix CI.

@@ -31,7 +31,7 @@ def munge_boolean(value)
def munge_integer(value)
Integer(value)
rescue ArgumentError
fail("munge_integer only takes integers")
fail "munge_integer only takes integers"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this was modified incorrectly

@@ -258,7 +260,7 @@ def generate
end
found_files = files.find_all { |path| tidy?(path) }.collect { |path| mkfile(path) }
result = found_files.each { |file| debug "Tidying #{file.ref}" }.sort { |a,b| b[:path] <=> a[:path] }
notice "Tidying #{found_files.size} files"
notice _("Tidying %{count} files") % { count: found_files.size }
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably worth including note here too re: Tidying

return nil
rescue Errno::EACCES => error
warning "Could not stat; permission denied"
warning _("Could not stat; permission denied")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a note re: stat is a program name?

@@ -391,7 +391,7 @@ def insync?(current)

validate do |value|
if value.intern != :absent and value !~ /^\d{4}-\d{2}-\d{2}$/
raise ArgumentError, "Expiry dates must be YYYY-MM-DD or the string \"absent\""
raise ArgumentError, _("Expiry dates must be YYYY-MM-DD or the string \"absent\"")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think its worth a translator note that YYYY-MM-DD reflects a four digit year two digit month two digit day separated by dashes? Maybe that's self-evident, not sure how/if it translates though

end

return [ "#{home}/.ssh/authorized_keys" ] if value == :true
# value is an array - munge each value
[ value ].flatten.map do |entry|
if entry =~ /^~|^%h/ and not home
raise ArgumentError, "purge_ssh_keys value '#{value}' meta character ~ or %h only allowed for users with a defined home directory"
raise ArgumentError, "purge_ssh_keys value '#{value}' meta character ~ or \%h only allowed for users with a defined home directory"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this line got skipped, maybe as a result of escaping %h ?

Copy link
Contributor

@MosesMendoza MosesMendoza left a comment

Choose a reason for hiding this comment

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

per minor fixups

@Magisus Magisus force-pushed the PUP-7042/type branch 2 times, most recently from efd6c4e to 3a8a582 Compare April 4, 2017 16:40
@Magisus
Copy link
Contributor Author

Magisus commented Apr 10, 2017

Updated.

@MosesMendoza MosesMendoza merged commit 313c616 into puppetlabs:master Apr 12, 2017
@Magisus Magisus deleted the PUP-7042/type branch November 21, 2017 22:18
Iristyle pushed a commit to Iristyle/puppet that referenced this pull request Dec 14, 2017
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

4 participants