Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-core
Commits
f4790068
Commit
f4790068
authored
Dec 06, 2019
by
adrtel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added im_numeric for number formatting,
accepting an empty string.
parent
4f67cd35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
intranet-l10n-procs.tcl
tcl/intranet-l10n-procs.tcl
+24
-0
No files found.
tcl/intranet-l10n-procs.tcl
View file @
f4790068
...
...
@@ -1320,3 +1320,27 @@ ad_proc im_unicode2html {s} {
}
set res
}
ad_proc -public im_numeric
{
num
{
fmt
{}}
{
locale
""
}
}
{
Project-Open version of lc_numeric, returning
""
in case of an
empty string input, instead of returning a hard error.
Given a number and a locale return a formatted version of the number
for that locale.
@param num Number in canonical form
@param fmt Format string used by the tcl format
command
(
should be restricted to the form
"%.Nf"
if present
)
.
@param locale Locale
@return Localized form of the number
}
{
if
{
$num
eq
""
}
{
return
""
}
return
[
lc_numeric
$num
$fmt
$locale
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment