Ticket #22 (assigned enhancement)

Opened 3 years ago

Last modified 6 months ago

Use strftime for month names

Reported by: goeran Assigned to: james (accepted)
Priority: minor Milestone: Translation stuff and i18n
Component: yum Version:
Keywords: Cc:

Description

In output.py, printtime in YumOutput? uses an array of (translatable) month names. But these names are already available in the standard locale categories. Wouldn't it be a good idea to simplify printtime to this:

now = time.localtime(time.time()) ret = time.strftime('%b %d %T ', now) return ret

Yum version I checked was 3.2.19.

Change History

01/27/09 18:46:10 changed by skvidal

So I tested this and it doesn't seem to do the translation. I set my lang to fr_FR.utf-8 and it doesn't output Mai but May - which, afaict, is wrong.

Did I miss something?

01/27/09 19:42:20 changed by goeran

It doesn't? Hm. It works for me when I try it in a standalone python. See a sample transcript below.

I haven't figured out how to verify this within yum. When I grep:ed through the files in the yum package, I couldn't find any invocation of this method, only the definition. (I didn't look deeper than that.) When is this code used?

Sample transcript:

mimmi$ python
Python 2.5.1 (r251:54863, Apr  8 2008, 01:19:33) 
[GCC 4.3.0 20080404 (Red Hat 4.3.0-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strftime("%b",(2009,5,10,0,0,0,0,0,-1))
'May'
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "")
'sv_SE.utf8'
>>> time.strftime("%b",(2009,5,10,0,0,0,0,0,-1))
'maj'
>>> locale.setlocale(locale.LC_ALL, "fr_FR.utf8")
'fr_FR.utf8'
>>> time.strftime("%b",(2009,5,10,0,0,0,0,0,-1))
'mai'

(follow-up: ↓ 4 ) 01/28/09 00:05:35 changed by james

  • owner changed from skvidal to james.
  • status changed from new to assigned.

I tested this (after calling yum.misc.setup_locale()) and it worked ... one problem is that AFAICS printtime() isn't called anywhere in yum/yum-utils ... goeran how did you spot this?

(in reply to: ↑ 3 ) 01/29/09 18:10:59 changed by goeran

Replying to james:

goeran how did you spot this?

I'm working on a Swedish translation for yum, and found all the month names in the list of translatable messages. It made me suspicious, and I took a look how it was used.

(follow-up: ↓ 6 ) 09/10/09 23:41:19 changed by james

  • milestone set to Translation stuff and i18n.

We still haven't done this ... probably because it isn't actually used. I'll put this on my list, if only to make the translators sane :).

(in reply to: ↑ 5 ) 09/11/09 18:42:05 changed by goeran

Replying to james:

... if only to make the translators sane :).

:-)

If you are not going to use it, then maybe you could just remove it instead. The version control system will remember it if you change your mind. :-)

08/19/11 10:51:44 changed by 1000-loan

What should you do when unexpected bills occur to appear? Perhaps a car repair or perhaps an appliance in time breaks down and you could really work with a $1000 loan. Someone close or a friend is your best option. They cannot charge interest and terms are generally quite flexible.

An alternative choice is actually a loan through the employer. Some companies offer this specific repair. An alternative choice could possibly be getting overdraft on your own checking account. If you possess time, you may make application for a credit card, a line of credit or perhaps a personal unsecured loan from a bank. You might pawn or sell your valuables.

If none of them pertain to your position and also you need $1000 fast you could possibly decide on $1000 payday loans. I would personally only accomplish this as a last option as the interest rates are incredibly high. Given that being said the fees and interest aren't that bad when the loan pays back with the payment date.

Which can be usually in 2 weeks but not be stretched for extended. The more you take to repay the financing greater interest you are paying along with the APR of payday cash loans are some of the highest in the industry.

Do you understand why? There's a chance you're pondering. The rationale the APR is really high is the risk factor to the lender's part. They lend out money using no credit checks without any collateral to the people that happen to be inside of a bind. So that you can imagine that there is a pretty high default rate when compared with most other types of loans.

These refinancing options are pretty all to easy to be eligible for a. You'll want work and quite a few lenders will require that you simply gross at the very least $1000 a month. Although some lenders accept people on disability if they have an $800 monthly or more income. Like I pointed out earlier there won't be any credit rating checks no collateral is necessary.

You submit an application with the banking information and address and quite often your Social Security number so they can verify your identity. Many places will issue you in minutes in the event you qualify either by sending an email or by phoning you. In the event you accept the financial loan some companies might have it deposited in your savings account in only a small amount time as an hour.

You can see that they are one of the easiest and the majority of convenient loans you'll be able to take. Generally a $1000 loan when you've got not one other choices. You might want to borrow the minimal amount that you'll require. Pay the money because of the deadline so fees don't snowball upon you. If you follow these pointers you shouldn't possess financial problems caused by using this type of loan.