草庐IT

translate-animation

全部标签

ruby-on-rails - Rails 3 I18 : translation missing: da. datetime.distance_in_words.about_x_hours

我看到这个错误:translationmissing:da.datetime.distance_in_words.about_x_hours我的语言环境文件:http://pastie.org/2944890我的看法:我已将其添加到我的application.rb中:config.i18n.load_path+=Dir[Rails.root.join('my','locales','*.{rb,yml}').to_s]config.i18n.default_locale=:da如果我删除I18配置,帮助程序会处理英语。更新:我在config/enviorments/devolpment

ruby-on-rails - 运行 Heckle 时出错? `current_code' : undefined method `translate' for Ruby2Ruby

我正在尝试运行Heckle,但一直出现错误:>specspec/controllers/my_controller_spec.rb--heckleMyController!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!exception=hasathickskin.There'snothingtoheckle.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(Runsthroughseveralmu

ruby-on-rails - Rails 国际化 : %{record} is not being translated

我的rails.pt-BR.yml上有这个:br:errors:format:!'%{attribute}%{message}'messages:restrict_dependent_destroy:one:"Nãoépossívelexcluiroregistropoisexisteum%{record}dependente"many:"Nãoépossívelexcluiroregistropoisexistem%{record}dependentes"在我的模型中,我有这个:has_many:entities,dependent::restrict_with_error每当res

ruby-on-rails - I18n : How to check if a translation key/value pairs is missing?

我正在使用RubyonRails3.1.0和I18ngem.我(正在实现一个插件)我想在运行时检查I18n是否缺少翻译键/值对,如果是,则使用自定义字符串。也就是说,我有:validates:link_url,:format=>{:with=>REGEX,:message=>I18n.t('custom_invalid_format',:scope=>'activerecord.errors.messages')}如果.yml文件中没有如下代码activerecord:errors:messages:custom_invalid_format:Thisisthetesterrormes

javascript - 错误 : Zeptojs Animate Is Not A Function

zeptojs文档here当我使用$().animate函数时抛出如下错误:TypeError:$(...).animate不是函数而我使用的版本是页面提供的。 最佳答案 $(...).animate在zeptofx模块中。它不再在zepto的基本主要发行版中!http://zeptojs.com/#modules 关于javascript-错误:ZeptojsAnimateIsNotAFunction,我们在StackOverflow上找到一个类似的问题:

javascript - Chrome 开发者工具中是否有 "pause animation"功能的键盘快捷键? (F12)

Chrome的开发者工具中有一个很棒的功能,允许您暂停动画并控制它们的速度,但问题是它们是鼠标控制的按钮。有时我需要暂停动画而不实际移动鼠标光标来检查悬停激事件画中的某些内容,所以我不能真正使用暂停按钮。该动画暂停按钮是否有键盘快捷键,这样无论我在做什么,我都不需要将光标移开? 最佳答案 如前所述,没有用于暂停动画的键盘快捷键,但我发现了下一个最好的方法:当光标位于带有悬停激事件画的元素。这不会停止已经运行的动画,但会阻止在检查时进一步触发鼠标激活的动画,这可能足以检查一个元素。 关于j

javascript - AngularJS 和 i18n : apply ng-repeat filters after translating list items properties

JSFiddle:http://jsfiddle.net/X2fsw/2/我尝试使用angular-translate创建多语言AngularJS应用程序.我的代码中嵌入了一个静态项目列表。此列表的每个项目都有一个标题,该标题必须以当前选择的语言显示。翻译是在翻译服务的帮助下直接在View中完成的。示例:{{myObject.title|翻译}}。我希望使用ng-repeat显示列表,然后按项目标题过滤它。但是,过滤器应用于翻译键,而不是翻译后的字符串。在保持运行时切换语言的能力的同时更正此行为的最佳方法是什么?我可以在每次语言更改时将翻译后的字符串存储为另一个属性(例如myObjec

javascript - 如何在不使用 css 转换的情况下将 jQuery animate 与 css3 属性结合起来?

在这个例子中;我正在尝试使用css3旋转属性创建一个jQuery动画。我可以用css3transition和jQuerycss()来管理这个动画,但我想用jQueryanimate()来根据旋转deg值来做这个到我的jQuery变体。是否可以在jQuery1.8.0中使用带有css3属性值的动画?HereisjsFiddletoinspect.jQuery:varrotateVal=90;//thismethodisn'tworking$('.red').animate({'transform':'rotate('+rotateVal+'deg)'},500);//thiswaywor

javascript - jquery: this.not (':animated' ) && that.is (':visible' ) 不遵守规则,语法问题?只有几行代码

当我点击#button时,它仍在执行'dosomething',即使.wrapper是动画并且.wrapperspan不可见。所以它不遵守规则。怎么了?$('#button').click(function(){if($('.wrapper').not(':animated')&&$('.wrapperspan').is(':visible')){//dosomething}}) 最佳答案 如果没有if语句,这样会更简洁一些。workingdemo$('#button').click(function(){$('.wrapper')

javascript - 闪烁的 jQuery .animation()

我目前正在使用jquery-animate-colors动画边框的闪烁,但我认为我的代码可以使用一些清理。处理以下问题的更好方法是什么?highlightRow=function(row,count){if(count==null){count=0;}$(row).animate({"border-color":"#3737A2"},{duration:250,complete:function(){return$(row).animate({"border-color":"#FFFFFF"},{duration:250,complete:function(){if(count===0