Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cl-l10n.unix-locale-files
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cl-l10n
cl-l10n.unix-locale-files
Commits
60578002
Commit
60578002
authored
17 years ago
by
levente.meszaros
Browse files
Options
Downloads
Patches
Plain Diff
Better missing-resource reporting.
darcs-hash:09040bcaab3afcf76177a784731b4c69a95b056b
parent
b5b2f520
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
i18n.lisp
+7
-2
7 additions, 2 deletions
i18n.lisp
with
7 additions
and
2 deletions
i18n.lisp
+
7
−
2
View file @
60578002
...
...
@@ -26,7 +26,12 @@ implementation of that function
(
if
(
stringp
name
)
(
string-downcase
name
)
(
string-downcase
(
symbol-name
name
)))))
(
define-condition
resource-missing
(
warning
)
((
name
:accessor
name-of
:initarg
:name
)))
((
locale
:accessor
locale-of
:initarg
:locale
)
(
name
:accessor
name-of
:initarg
:name
))
(
:report
(
lambda
(
condition
stream
)
(
format
stream
"The resource ~S is missing for ~A"
(
name-of
condition
)
(
locale-of
condition
)))))
(
defun
ensure-resource-lookup-function
(
name
)
(
unless
(
get
name
'cl-l10n-entry-function
)
...
...
@@ -78,7 +83,7 @@ and call the lambda resource registered for the current locale."
(
defun
resource-not-found
(
name
warn-if-missing
fallback-to-name
)
(
if
warn-if-missing
(
warn
'resource-missing
:name
name
))
(
warn
'resource-missing
:locale
*locale*
:name
name
))
(
values
(
if
fallback-to-name
(
string-downcase
(
string
name
)))
nil
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment